[Q]Help for simple digital clock widget - Java for Android App Development

Hi,
I am triying to build a simple numeric clock widget but i have some issues :
-The widget isn't appearing in widget section of 4.0+ launchers
-The time is not refresh (but i set up refresh value to 1000ms)
-Widget dosn't respect the size i set in the xml
Code:
android:minWidth="294dp"
android:minHeight="72dp"
android:updatePeriodMillis="1000"
If someone can help me, would be awesome
See app sources here
I'm sorry if i am in the wrong place

you should add this in the manifest:
Code:
<receiver android:name=".WidgetProvider" android:label="yourAppName">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="@xml/widget_info" />
</receiver>
then create the meta-data file (widget_info):
Code:
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="294dp"
android:minHeight="72dp"
android:updatePeriodMillis="1000"
android:initialLayout="@layout/widget">
</appwidget-provider>
ok, you did it... i didn't view the source

Thanks but done
Envoyé depuis mon CINK SLIM avec Tapatalk

I think that the update intervall needs to be 30 minutes or more.
You could create a service and refresh the widget from that.
---------- Post added at 12:06 PM ---------- Previous post was at 12:03 PM ----------
And you need to start your app at least once on Android 4+. Then it will be shown in the app drawer.
So create a launcher activity.
(http://stackoverflow.com/questions/8794952/android-4-0-widgets-not-appearing)

Related

TF3D problem with right virtual soft menu key in SMS tab

I have problem with right virtual soft menu key in SMS (Messages) tab in Touchflo 3D. There is no problem with this right menuin other tabs of tf3d and I can open menu for all the tabs except messages. Does somebody know what do I need to change to make it work ?
I've the same problem, somebody knows how to fix ?
fix
install new theme ... this helped me ...
Done, i solved the problem, in my 26948339_manila i add this
<SimpleDialog Name="MessagesGizmoResponse_Forward.dialog" PackageName="HTC">
<ComponentReference Name="dialogItem" Mode9Path="HTC\simpledialog.mode9" Component="SimpleDialog" SmartComponent="true" />
<DialogItem Name="Menu">
<DialogItem Name="New" Title="[[IDS_MESSAGING_NEW]]" />
<DialogItem Name="Reply" Title="[[IDS_MESSAGING_REPLY]]" />
<DialogItem Name="Forward" Title="[[IDS_MESSAGING_FORWARD]]" />
<DialogItem Name="Delete" Title="[[IDS_MESSAGING_DELETE]]" />
</DialogItem>
</SimpleDialog>
for more information you can see this:
http://forum.xda-developers.com/showthread.php?p=2695679#post2695679
thank you sir
antonhio said:
Done, i solved the problem, in my 26948339_manila i add this
<SimpleDialog Name="MessagesGizmoResponse_Forward.dialog" PackageName="HTC">
<ComponentReference Name="dialogItem" Mode9Path="HTC\simpledialog.mode9" Component="SimpleDialog" SmartComponent="true" />
<DialogItem Name="Menu">
<DialogItem Name="New" Title="[[IDS_MESSAGING_NEW]]" />
<DialogItem Name="Reply" Title="[[IDS_MESSAGING_REPLY]]" />
<DialogItem Name="Forward" Title="[[IDS_MESSAGING_FORWARD]]" />
<DialogItem Name="Delete" Title="[[IDS_MESSAGING_DELETE]]" />
</DialogItem>
</SimpleDialog>
for more information you can see this:
http://forum.xda-developers.com/showthread.php?p=2695679#post2695679
Click to expand...
Click to collapse
I was about to hard reset again because of this problem...but this worked like a charm...(and relieves me from a headache...) thanks
Same for me, i'm gonna try this! thank you
thanks a lot for help.it works, finally I solved this issue

Manilla 2D XML - Trouble Adding a New Tab!

Does anyone know where ive gone wrong and why it doesnt work?
Ive done the follwoing
Under Tabs i have added the following
<HomeWidget enable="1" tab_bg_icon="7,8" tab_icon="69,70" big_icon="29,30" />
<CalenderWidget enable="1" tab_bg_icon="23,24" tab_icon="172,173" big_icon="63,64" />
<OperatorWidget enable="0" tab_bg_icon="120,129" tab_icon="145,147" big_icon="200,218" />
This shows up as an option under the manilla 2d customizer by Mpenguin14
And also i have added this in teh main body of the xml as coding for the tab itself
<CalenderWidget>
<Property name="IDHMWG_CALENDARBTN1_RECT" id="40" value="12,177,228,207" />
<Property name="IDHMWG_CALENDARBTN1_IMG" id="41" value="46" />
<Property name="IDHMWG_CALENDARBTN1_IMGPOS" id="42" value="29,184" />
<Property name="IDHMWG_CALENDARBTN1_TEXT_RECT" id="43" value="55,178,213,206" />
<Property name="IDHMWG_CALENDARBTN1_TEXT_TIME_RECT" id="44" value="29,178,213,192" />
<Property name="IDHMWG_CALENDARBTN1_TEXT_SUBJECT_RECT" id="45" value="29,192,213,206" />
<Property name="IDHMWG_CALENDARBTN1_IMG_FOCUS" id="46" value="181" />
<Property name="IDHMWG_CALENDARBTN1_IMG_FOCUS_DN" id="47" value="182" />
<Property name="IDHMWG_LINE_IMG" id="100" value="180" />
<Property name="IDHMWG_LINE1_IMGPOS" id="101" value="28,148" />
<Property name="IDHMWG_LINE2_IMGPOS" id="102" value="28,177" />
<Property name="IDHMWG_LINE3_IMGPOS" id="103" value="28,206" />
<Property name="IDHMWG_DATE_RECT" id="104" value="28,127,212,148" />
</CalenderWidget>
However when i try and reload m2d it wont load so i think there is an error somewhere but i dont know if i have missed a bit out!!
Any Ideas?????
Please ask questions in the right forum, or under the correct thread relating to your developed program.

New LEO Advanced for WP7 v2.6.57.0 (14 languages)

http://forum.xda-developers.com/showthread.php?p=24489201
New LEO Advanced for WP7 v2.6.57.0 (14 languages)
Hd2 Leo wp7<br />
<br />
<font color="blue"><b>Old versions </b></font>
<br />
<font color="Blue"><b>In other ROMs New Installation Fix:<br />
1. Install File WPfix.xap Run (Fix Button) Click......
oboy
thank you very much

[GUIDE][MOD]Adding custom ROM image in Settings.apk

Custom ROM Image in Settings.apk​
Featured in Cosmic v2, I was searching for this for a long time, I happened to ask for help to some people, but, it didn't work out.
I knew the code to be added, but I was adding it in wrong file, then i figured it out and mod was complete
I looked back and remembered that Sniper Killer suggested me to try custom layout and smali editing. I knew, it was nothing to do with smalis, duh. Just a simple ImageView Tag it was. But the Custom Layout thing was true.
Guide​
1. Download the SettingsSource.zip
2. Decompile your Settings.apk
3. Extract contents of SettingsSource.zip to respective folders in Settings.apk
4. Open /res/xml/device_info_settings.xml
You'll see several <Preference android:title tags
Add this just a line above the first Preference tag:
Code:
<PreferenceCategory android:layout="@layout/areebisawesome" android:key="blah" android:title="" />
Finally, it will look like this.
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/about_settings"
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:layout="@layout/areebisawesome" android:key="blah" android:title="" />
<Preference android:title="@string/model_number" android:key="device_model" android:summary="@string/device_info_default" style="?android:preferenceInformationStyle" />
Save the file
5. Now,go to /res/drawable/
There, you'll see cosmic.png Change it to any png of size 320x200 You can change this size description in /res/layout/areebisawesome.xml
6. Recompile the apk
7. Enjoy
And if you want a method for changing the image on clicking, my buddy abhi922 has found a very easy to follow way for that :
And if you want a method for changing the image on clicking, my buddy abhi922 has found a very easy to follow way for that :
http://forum.xda-developers.com/show...1&postcount=36
XDA:DevDB Information
[GUIDE][MOD]Adding custom ROM image in Settings.apk, Device Specific App for all devices (see above for details)
Contributors
AdvaitT17, iamareebjamal
Version Information
Status: Beta
Current Stable Version: 1.0
Stable Release Date: 2015-12-23
Current Beta Version: 1.0
Beta Release Date: 2015-12-23
Created 2015-12-23
Last Updated 2015-12-23
Guys this is guide for "ANY DEVICE"
If this post is useful.....pls hit thx button..
AdvaitT17 said:
If this post is useful.....pls hit thx button..
Click to expand...
Click to collapse
The SettingsSource.zip download link would be helpful.
Double check your link to post about clicking image to change. It brings up a blank page.
Sorry sir the link which I have posted is not incorrect but it is mixed with other lines that's why it show about.blank in browser
Regards,
AdvaitT17
AdvaitT17 said:
Sorry sir the link which I have posted is not incorrect but it is mixed with other lines that's why it show about.blank in browser
Regards,
AdvaitT17
Click to expand...
Click to collapse
Where is the link? I cant find it.
*quoted by mistake
Here is the SettingsSource.zip http://www.mediafire.com/download/lkybr2ijle6qryc/SettingsSource.zip

[GUID] Light Color SystemUI for Xperia Oreo FW

Hi
Sony released Oreo firmware for same xperia devices. But the Quick Settings panel not changed (old N and M style)
with this easy tutrial you can make your systemui like official oreo (AOSP, Nexus, Pixel)
lets start...
All you need:
- knowlage about decompile and compile APK (apktool)
- Stock framework-res.apk
- Stock SystemUI.apk
- xml editor (notepad++ or Atom or emmac. etc)
Step 1: play with SystemUI.apk
decompile your apk file.
inside /res/layout find "qs_footer.xml" and open that. change:
Code:
<com.android.systemui.qs.QSFooter android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/header" android:paddingTop="0.0dip" android:clickable="false" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="48.0dip" android:baselineAligned="false"
TO:
Code:
<com.android.systemui.qs.QSFooter android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/header" [COLOR="Blue"]android:background="#00000000"[/COLOR] android:paddingTop="0.0dip" android:clickable="false" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="48.0dip" android:baselineAligned="false"
inside /res/layout find "qs_panel.xml" and open that. change:
Code:
<com.android.systemui.qs.QSContainerImpl android:id="@id/quick_settings_container" android:background=[COLOR="Red"]"@drawable/qs_background_primary"[/COLOR] android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="wrap_content" android:elevation="4.0dip"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.android.systemui.qs.QSPanel android:id="@id/quick_settings_panel" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="28.0dip" android:layout_marginBottom="48.0dip" />
TO:
Code:
<com.android.systemui.qs.QSContainerImpl android:id="@id/quick_settings_container" android:background=[COLOR="Blue"]"?android:colorPrimaryDark"[/COLOR] android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="wrap_content" android:elevation="4.0dip"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.android.systemui.qs.QSPanel android:id="@id/quick_settings_panel" [COLOR="Blue"]android:background="#00000000"[/COLOR] android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="28.0dip" android:layout_marginBottom="48.0dip" />
inside /res/layout find "quick_status_bar_expanded_header.xml" and open that. change:
Code:
<com.android.systemui.qs.QuickStatusBarHeader android:layout_gravity="@integer/notification_panel_layout_gravity" android:id="@id/header" android:paddingTop="0.0dip" android:clickable="false" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_header_height" android:baselineAligned="false" android:paddingStart="0.0dip" android:paddingEnd="0.0dip"
TO:
Code:
<com.android.systemui.qs.QuickStatusBarHeader android:layout_gravity="@integer/notification_panel_layout_gravity" android:id="@id/header" [COLOR="Blue"]android:background="#00000000"[/COLOR] android:paddingTop="0.0dip" android:clickable="false" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_header_height" android:baselineAligned="false" android:paddingStart="0.0dip" android:paddingEnd="0.0dip"
Okey... re-compile your SystemUI.apk
Step 2: play with framework-res.apk
decompile your apk file.
All you need are inside this path /res/values/styles.xml. Open that xml file.
Search for: "Theme.DeviceDefault.QuickSettings"
Code:
[COLOR="Red"]<style name="Theme.DeviceDefault.QuickSettings" parent="@style/Theme.DeviceDefault">[/COLOR]
[COLOR="red"]<item name="dialogTheme">@style/Theme.DeviceDefault.QuickSettings.Dialog</item>[/COLOR]
<item name="colorControlNormal">?textColorPrimary</item>
<item name="colorPrimary">@color/primary_device_default_settings_light</item>
<item name="colorPrimaryDark">@color/primary_dark_device_default_settings_light</item>
<item name="colorAccent">@color/accent_device_default_settings_light</item>
<item name="colorSecondary">@color/secondary_device_default_settings_light</item>
</style>
TO:
Code:
[COLOR="Blue"]<style name="Theme.DeviceDefault.QuickSettings" parent="@style/Theme.DeviceDefault.Light">[/COLOR]
<item name="colorControlNormal">?textColorPrimary</item>
<item name="colorPrimary">@color/primary_device_default_settings_light</item>
<item name="colorPrimaryDark">@color/primary_dark_device_default_settings_light</item>
<item name="colorAccent">@color/accent_device_default_settings_light</item>
<item name="colorSecondary">@color/secondary_device_default_settings_light</item>
</style>
Search for: "Theme.DeviceDefault.QuickSettings.Dialog"
Code:
<style name="Theme.DeviceDefault.QuickSettings.Dialog" parent="@style/Theme.DeviceDefault.Dialog">
<item name="colorPrimary">@color/primary_device_default_settings</item>
<item name="colorPrimaryDark">@color/primary_dark_device_default_settings</item>
<item name="colorAccent">@color/accent_device_default_settings[COLOR="Red"]_dark[/COLOR]</item>
<item name="colorSecondary">@color/secondary_device_default_settings</item>
</style>
TO:
Code:
<style name="Theme.DeviceDefault.QuickSettings.Dialog" parent="@style/Theme.DeviceDefault[COLOR="blue"].Light[/COLOR].Dialog">
<item name="colorPrimary">@color/primary_device_default_settings[COLOR="blue"]_light[/COLOR]</item>
<item name="colorPrimaryDark">@color/primary_dark_device_default_settings[COLOR="blue"]_light[/COLOR]</item>
<item name="colorAccent">@color/accent_device_default_settings[COLOR="blue"]_light[/COLOR]</item>
<item name="colorSecondary">@color/secondary_device_default_settings[COLOR="Blue"]_light[/COLOR]</item>
</style>
Search for: "Theme.DeviceDefault.Settings.Dialog"
Code:
<style name="Theme.DeviceDefault.Settings.Dialog" parent="@style/Theme.Material.Settings.Dialog">
<item name="colorPrimary">@color/primary_device_default_settings</item>
<item name="colorPrimaryDark">@color/primary_dark_device_default_settings</item>
[COLOR="Red"]<item name="colorAccent">@color/accent_device_default_settings_light</item>[/COLOR]
<item name="colorSecondary">@color/secondary_device_default_settings</item>
</style>
TO:
Code:
<style name="Theme.DeviceDefault.Settings.Dialog" parent="@style/Theme.Material.Settings.Dialog">
<item name="colorPrimary">@color/primary_device_default_settings</item>
<item name="colorPrimaryDark">@color/primary_dark_device_default_settings</item>
[COLOR="Blue"] <item name="colorAccent">@color/accent_device_default_light</item>[/COLOR]
<item name="colorSecondary">@color/secondary_device_default_settings</item>
</style>
find: "Theme.DeviceDefault.Settings.Dialog.Alert"
Code:
<style name="Theme.DeviceDefault.Settings.Dialog.Alert" parent="@style/Theme.Material.Settings.Dialog.Alert">
<item name="colorPrimary">@color/primary_device_default_settings</item>
<item name="colorPrimaryDark">@color/primary_dark_device_default_settings</item>
[COLOR="Red"]<item name="colorAccent">@color/accent_device_default_settings_light</item>[/COLOR]
<item name="colorSecondary">@color/secondary_device_default_settings</item>
</style>
TO:
Code:
<style name="Theme.DeviceDefault.Settings.Dialog.Alert" parent="@style/Theme.Material.Settings.Dialog.Alert">
<item name="colorPrimary">@color/primary_device_default_settings</item>
<item name="colorPrimaryDark">@color/primary_dark_device_default_settings</item>
[COLOR="Blue"]<item name="colorAccent">@color/accent_device_default_light</item>[/COLOR]
<item name="colorSecondary">@color/secondary_device_default_settings</item>
</style>
find: "Theme.DeviceDefault.Settings.Dialog.NoActionBar"
Code:
<style name="Theme.DeviceDefault.Settings.Dialog.NoActionBar" parent="@style/Theme.DeviceDefault.Light.Dialog.NoActionBar"[COLOR="Red"]>[/COLOR]
[COLOR="Red"]<item name="colorPrimary">@color/primary_device_default_settings</item>[/COLOR]
[COLOR="Red"]<item name="colorPrimaryDark">@color/primary_dark_device_default_settings</item>[/COLOR]
[COLOR="Red"]<item name="colorAccent">@color/accent_device_default_settings_light</item>[/COLOR]
[COLOR="Red"]<item name="colorSecondary">@color/secondary_device_default_settings</item>[/COLOR]
</style>
TO:
Code:
<style name="Theme.DeviceDefault.Settings.Dialog.NoActionBar" parent="@style/Theme.DeviceDefault.Light.Dialog.NoActionBar"[COLOR="blue"] />[/COLOR]
NOTE: every thing change in lates code is meaning close the style method in first line and remove there items. change > to /> and remember input space befor the slash!
Okey... re-compile your framework-res.apk
NOW, PUSH YOUR FILES TO SYSTEM, SET PERMISSIONS AND REBOOT​
...end of the post!
For awsome look, replace Noto fonts with google pixel Official Noto fonts....
Update 1: So sorry for forgot add this two style to my tutrial
Guid updated with add that stylies
1- "Theme.DeviceDefault.QuickSettings"
2- "Theme.DeviceDefault.QuickSettings.Dialog"
Update 2: For users problem with re-compile SystemUI.apk:
a bad patched file inside /res/drawable-xxhdpi called "pip_dismiss_scrim.9.png"
This is Sony problem... but don't cry!!!
I edited 9.png true patch side file fix your problem!
place attached file inside /res/drawable-xxhdpi and try again. after apktool ask you do you want to keep untoched file say yes
Inside keep folder don't touch orginal "pip_dismiss_scrim.9.png"... after compile finished, the sony orginal 9.png back to your apk.
(do this every time you re-compile your SystemUI)
I found also soke interesting lines in the SystemUI, Settings and Framework, by all the 3 apk files in strings.xml stand Reboot_Change_Theme or similar, but dunno howto activate it or add in bools.xml, it have sure todo with white and black changing for Systemui...
Nice guide btw and plese post some screenshots
Verstuurd vanaf mijn G8231 met Tapatalk
Pandemic said:
I found also soke interesting lines in the SystemUI, Settings and Framework, by all the 3 apk files in strings.xml stand Reboot_Change_Theme or similar, but dunno howto activate it or add in bools.xml, it have sure todo with white and black changing for Systemui...
Nice guide btw and plese post some screenshots
Verstuurd vanaf mijn G8231 met Tapatalk
Click to expand...
Click to collapse
Here you are... I themed my settings too and use pixel fonts too.
I try to add accent colors option to appearance settings (Like OnePlus OOS)
Can you change it on Nougat , sir ?
Can someone upload the modified files for xz as I am unable to recompile anything after modifying them
Thanks in advance
Hoang.hpump said:
Can you change it on Nougat , sir ?
Click to expand...
Click to collapse
I am on Oreo but try that in Nougat
@GenomeX Will this work on odex ?
korom42 said:
@GenomeX Will this work on odex ?
Click to expand...
Click to collapse
Yes
You don't need touch any smali files... Means you don't need have a deodex ROM.
is pushing modified systemui and framework breaks OTA updates ?
also can someone with XZ1 compact share its modified files (FW 47.1.A.5.51) ?
sheraro said:
is pushing modified systemui and framework breaks OTA updates ?
also can someone with XZ1 compact share its modified files (FW 47.1.A.5.51) ?
Click to expand...
Click to collapse
If you have unlocked bl then yes but how you wanna push it if you dont have root ?
Verstuurd vanaf mijn G8231 met Tapatalk
@GenomeX Unfortunately I'd no success trying to recompile the apk :crying:
I uploaded framework-res.apk and SystemUI.apk for xz oreo odex
If you or someone can help please edit and share the modifed apk :fingers-crossed:
https://mega.nz/#!LdxRSDrB!Ex6OZoi8y1JJHEC2ykxa_bhYwvLTfujOxOx-ciRYKX0
korom42 said:
@GenomeX Unfortunately I'd no success trying to recompile the apk :crying:
I uploaded framework-res.apk and SystemUI.apk for xz oreo odex
If you or someone can help please edit and share the modifed apk :fingers-crossed:
Click to expand...
Click to collapse
@korom42
Try this (not flashable zip/ push to system manual)
And for notic: sony system ui and settings and some other apks is deodexed (odex folder only for faster boot! you can keep odex file for some apps or deleting!)
2nd POST updated...
Update 1) for my mistake
Update 2) for guys problem with recompile SystemUI.apk with sony bad patched NINE.PNG
My next try for add adaptive icons to some sony apps like Album,Contacts, Dialer, Massage, Camera, Music and ... (must be re-engining some apps and add forground icon and background mask and some method to java codes)
@GenomeX
about update 2... you can remove that png and also the line in public.xml without issue, i struggled earlier with that and when i deleted it, succesfully compiled
Pandemic said:
@GenomeX
about update 2... you can remove that png and also the line in public.xml without issue, i struggled earlier with that and when i deleted it, succesfully compiled
Click to expand...
Click to collapse
That Png work with picture-in-picture mode, do you test pip work without that?
For safe compileing i patched that file with draw9patcher inside android studio, now is true patched
For better UI i change some classic png with vector graphics (xml format)
For example see my screen recorder! Now more harmony to other UI elements.
I do this with settings, and want do for systemui signal and wifi (aosp style) too
GenomeX said:
That Png work with picture-in-picture mode, do you test pip work without that?
For safe compileing i patched that file with draw9patcher inside android studio, now is true patched
Click to expand...
Click to collapse
What is that abd how you do picture in picture ? Sorry still investigate Oreo ^^
Verstuurd vanaf mijn G8231 met Tapatalk
Pandemic said:
What is that abd how you do picture in picture ? Sorry still investigate Oreo ^^
Verstuurd vanaf mijn G8231 met Tapatalk
Click to expand...
Click to collapse
You must be a YouTube Red user, then can use it in youtube.
But work nice in chrome when play online video
Play video (switch video to full screen mode), then hold home button and back to home screen and video playing inside a mini floating window!
GenomeX said:
@korom42
Try this (not flashable zip/ push to system manual)
And for notic: sony system ui and settings and some other apks is deodexed (odex folder only for faster boot! you can keep odex file for some apps or deleting!)
Click to expand...
Click to collapse
wow thanks works perfectly :good:
Pandemic said:
If you have unlocked bl then yes but how you wanna push it if you dont have root ?
Verstuurd vanaf mijn G8231 met Tapatalk
Click to expand...
Click to collapse
I'm trying to stay away from root/ub on oreo, I installed substratum and Andromeda so themes can apply without root, but until now I didn't find any theme that gives white systemui on xperia's oreo, if someone find it plz share

Resources