[Q] Overlaying different packages' resources on CM Themes - Android Q&A, Help & Troubleshooting

Hi, First of all i know i shouldn't post question here,anyways i checked out Q/A section and its like a noob trash.So if i write it there i don't think i can get an answer.
So let me tell you what i want to do..
Let's look that code snip
--------------------
<style name="TextAppearance.Holo.Widget.Switch" parent="@android:style/TextAppearance.Holo.Small">
<item name="android:textColor">#00ffffff</item>
</style>
---------------
you know red text is like getting that style from framework-res.apk and blue one is overwriting to red one's specific parts.
So,you didn't lose main stuff from red part...
That's okay for framework-res styling...
but how about working on another app packages' styles
The code snip below is from original Settings app's styles.xml
-----------------
<style name="Theme.Settings" parent="@*android:style/Theme.Holo">
<item name="android:actionBarStyle">@*android:style/Widget.Holo.ActionBar.Solid</item>
<item name="apnPreferenceStyle">@style/ApnPreference</item>
<item name="ic_menu_add">@drawable/ic_menu_add_dark</item>
<item name="ic_menu_moreoverflow">@*android:drawable/finger_print_arrow_019</item>
<item name="ic_wps">@drawable/ic_wps_dark</item>
<item name="wifi_signal">@drawable/wifi_signal_dark</item>
</style>
------------
The code below is my code which i used on cm11 theme
-------------
<style name="Theme.Settings" parent="@*android:style/Theme.Holo">
<item name="android:actionBarStyle">@style/MyActionBar</item>
</style>
------------
if i use that changed code it correctly changes things on Settings app..
But when i enter into Wifi settings app crashes because of these things
<item name="apnPreferenceStyle">@style/ApnPreference</item>
<item name="ic_menu_add">@drawable/ic_menu_add_dark</item>
<item name="ic_menu_moreoverflow">@*android:drawable/finger_print_arrow_019</item>
<item name="ic_wps">@drawable/ic_wps_dark</item>
<item name="wifi_signal">@drawable/wifi_signal_dark</item>
everything else in app works good.
So theme's wifi part will be broken if i use like above.
Let me tell you the another way,
hmm @*android:style/Theme.Holo comes from framework-res so i can easily create overlay for it but if i do that for Theme.Holo , it will change the Settings app correctly but it also will broke all other Theme.Holo used apps
I don't want both of these things.
How about overlaying settings's Theme.Settings
like that
So app won't crash and it will be themed only the settings app
-------------
<style name="Theme.Settings" parent="THEMES SETTINGS STYLE RESOURCE FROM SETTINGS APP">
<item name="android:actionBarStyle">@style/MyActionBar</item>
</style>
------------
I couldn't find something like this.
What am i supposed to do??

Related

[REQ] Gingerbread popup menus

I know it sounds tedious, but I just want the menus black. To be more specific, the menus that popup if you were to hit the menu button while looking at the homescreen. It was just improve my blackfroyo theme experience. Ha, if anyone knows how to, or how I could use one of the existing themes to apply only this mod, I'd appreciate it. Obviously I'd want the text altered too so it wasn't black on black.
I have that working, however I am having trouble loacting the file to change the text from black to white
The graphics part is easy. You can just copy over the appropriate files from gingerbread drawable-hdpi to your framework file.
The test and item separator references need to be changed in framework-res.apk, /res/values/styles.xml
At work right now and can't tell you exactly, but you have to change the text for both the popup and the extended menus.
If you find the locations in styles/xml that refer to the text style they say something like PrimaryTextColorInverse or similar. just remove the inverse. This needs to be done in two places for both the popup and the extended menus.
The separators need to be changed from divider_horizontal_dark and divider_vertical dark. these will be in the same places as the text.
Once recompiled the changes will be in the resources file. make sure all of your xml files and the resource file is compiled together.
Updated with more specifics:
when you decompile framework-res there is a folder /res/values that contains a bunch of xml files. You will need to edit styles.xml.
Below changes the menu item text color to light:
Code:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">?[COLOR="red"]textColorPrimary[/COLOR]</item>
Below changes the dividers to light:
Code:
<style name="Theme.IconMenu" parent="@style/Theme">
<item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
<item name="background">@null</item>
<item name="itemTextAppearance">@style/TextAppearance.Widget.IconMenu.Item</item>
<item name="horizontalDivider">@drawable/[COLOR="red"]divider_horizontal_dark[/COLOR]</item>
<item name="verticalDivider">@drawable/[COLOR="Red"]divider_vertical_dark[/COLOR]</item>
<item name="itemBackground">@drawable/menu_selector</item>
<item name="itemIconDisabledAlpha">?disabledAlpha</item>
<item name="moreIcon">@drawable/ic_menu_more</item>
Below Changes the expanded menu text appearance:
Code:
<style name="Theme.ExpandedMenu" parent="@style/Theme">
<item name="listViewStyle">@style/Widget.ListView.Menu</item>
<item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
<item name="background">@null</item>
<item name="itemTextAppearance">?[COLOR="red"]textAppearanceLarge[/COLOR]</item>
cgrunner said:
The graphics part is easy. You can just copy over the appropriate files from gingerbread drawable-hdpi to your framework file.
The test and item separator references need to be changed in framework-res.apk, /res/values/styles.xml
At work right now and can't tell you exactly, but you have to change the text for both the popup and the extended menus.
If you find the locations in styles/xml that refer to the text style they say something like PrimaryTextColorInverse or similar. just remove the inverse. This needs to be done in two places for both the popup and the extended menus.
The separators need to be changed from divider_horizontal_dark and divider_vertical dark. these will be in the same places as the text.
Once recompiled the changes will be in the resources file. make sure all of your xml files and the resource file is compiled together.
Updated with more specifics:
when you decompile framework-res there is a folder /res/values that contains a bunch of xml files. You will need to edit styles.xml.
Below changes the menu item text color to light:
Code:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">?[COLOR="red"]textColorPrimary[/COLOR]</item>
Below changes the dividers to light:
Code:
<style name="Theme.IconMenu" parent="@style/Theme">
<item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
<item name="background">@null</item>
<item name="itemTextAppearance">@style/TextAppearance.Widget.IconMenu.Item</item>
<item name="horizontalDivider">@drawable/[COLOR="red"]divider_horizontal_dark[/COLOR]</item>
<item name="verticalDivider">@drawable/[COLOR="Red"]divider_vertical_dark[/COLOR]</item>
<item name="itemBackground">@drawable/menu_selector</item>
<item name="itemIconDisabledAlpha">?disabledAlpha</item>
<item name="moreIcon">@drawable/ic_menu_more</item>
Below Changes the expanded menu text appearance:
Code:
<style name="Theme.ExpandedMenu" parent="@style/Theme">
<item name="listViewStyle">@style/Widget.ListView.Menu</item>
<item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
<item name="background">@null</item>
<item name="itemTextAppearance">?[COLOR="red"]textAppearanceLarge[/COLOR]</item>
Click to expand...
Click to collapse
good job)

[Q] app editing

I can just edit the pngs and the .9.pngs and everything goes fine. I can install and everything works perfectly except the font is too dark on the widget so you cant see it. I am wanting to change the font on the venues widget to white not black. If you look at the styles.xml there are 3 instances that are there and they are as follows:
HTML:
<style name="TextViewStyleVenueActivityTodoHere">
<item name="android:textSize">14.0dip</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">@color/black_end</item>
</style>
<style name="TextViewStyleAddTipTodoActivityBold">
<item name="android:textSize">16.0dip</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">@color/black_end</item>
</style>
<style name="TextViewStyleAddTipTodoActivityNormal">
<item name="android:textSize">14.0dip</item>
<item name="android:textColor">@color/black_end</item>
</style>
I am changing black_end to white. that is all I am changing. Anyone offer any assistance with this? Attached in the zip is the original apk and the pngs (yes I ran the 9patch on the .9.pngs) that I have edited and the styles.xml file is in res/values
The app compiles, signs, and installs fine, but will FC as soon as I try to open it. I also attached the adb log from trying to open the app if anyone can decipher that. lol
Any help would be GREATLY appreciated.
No one has an idea?

[SOLVED][Q] change font colors at notification row

hi there
ive been searching alot just get this figured out, but must through the towel in the ring, and ask
the problem is that a cant seem too find the place that where the font color/style is loaded, at the notification row events in the expanded status bar.. ive looked at tw_status_bar_expanded.xml, status_bar_latest_event_content.xml and colors.xml, but cant seem to find it.. if anyone is able to help me out, i would be really gratefull..
thx in advance..
screenshot attached, for better showing what im talking about..
EDIT: nevermind, think ive found it myself, in the styles.xml at framework-res.apk...
<style name="TextAppearance.DeviceDefault.StatusBar.EventContent" parent="@style/TextAppearance.StatusBar.EventContent">
<item name="textSize">15.0dip</item>
<item name="textColor">#ff9b9b9b</item>
</style>
<style name="TextAppearance.DeviceDefault.StatusBar.EventContent.Title" parent="@style/TextAppearance.StatusBar.EventContent.Title">
<item name="textSize">20.0dip</item>
<item name="textStyle">normal</item>
<item name="textColor">#ffe6e6e6</item>
</style>
<style name="TextAppearance.DeviceDefault.StatusBar.EventContent.Time" parent="@style/TextAppearance.StatusBar.EventContent.Time">
<item name="textSize">15.0dip</item>
<item name="textStyle">normal</item>
<item name="textColor">#ff9b9b9b</item>
</style>
Click to expand...
Click to collapse
havent tested it yet, but will try it later, and update this thread
EDIT2: yes, that did the trick, works now

[Q] Android ListView does not take custom style from theme

So the application uses Holo.Light as default. And i want to use the Holo theme to all listviews inside the application, so im doing something like this
Code:
<style name="myAppTheme" parent="@android:style/Theme.Holo.Light">
<item name="android:listViewStyle">@style/CustomListView</item>
</style>
<style name="CustomListView" parent="@android:style/Widget.Holo.ListView">
</style>
317
LinkOut said:
So the application uses Holo.Light as default. And i want to use the Holo theme to all listviews inside the application, so im doing something like this
Code:
<style name="myAppTheme" parent="@android:style/Theme.Holo.Light">
<item name="android:listViewStyle">@style/CustomListView</item>
</style>
<style name="CustomListView" parent="@android:style/Widget.Holo.ListView">
</style>
Click to expand...
Click to collapse
Does anyone have any suggestions?

[Q] Theming An APP From Gingerbread Style to Material Design?!

Hey Guys!
I have An App which i want to theme. The App Is currently with Gingerbread stlye which is really awful. So i decided to theme it To Material Design it....
But i don't know how i theme it. Could someone give me some tipps or Help Me Whatsever
Greeting
Adam!
You have to decompile the apk and then rewrite the code for it to match colors. You will not be able to more then a color change.
zelendel said:
You have to decompile the apk and then rewrite the code for it to match colors. You will not be able to more then a color change.
Click to expand...
Click to collapse
Hmmmmmmmmmmmm Will give a try. head painkillers Are on the Table if it starts
After some days/weeks i just started again to do this. Well i decompiled the APK I have the Classes and the XML files i read that i can use The Styles.xml for styling but there seems to be nothing :/ .... Here is my styles.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="com_facebook_loginview_default_style" parent="@android:style/Widget.Button">
<item name="android:textSize">@dimen/com_facebook_loginview_text_size</item>
<item name="android:textColor">@color/com_facebook_loginview_text_color</item>
<item name="android:gravity">center</item>
<item name="android:background">@drawable/com_facebook_loginbutton_blue</item>
<item name="android:paddingLeft">@dimen/com_facebook_loginview_padding_left</item>
<item name="android:height">@dimen/com_facebook_loginview_height</item>
<item name="android:width">@dimen/com_facebook_loginview_width</item>
</style>
<style name="com_facebook_loginview_silver_style" parent="@android:style/Widget.Button">
<item name="android:textSize">18.0sp</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">#ff4b5164</item>
<item name="android:gravity">center</item>
<item name="android:background">@drawable/com_facebook_loginbutton_silver</item>
<item name="android:height">44.0dip</item>
<item name="android:width">205.0dip</item>
</style>
<style name="Animations" />
<style name="Animations.GrowFromBottom" parent="@style/Animations">
<item name="android:windowEnterAnimation">@anim/grow_from_bottom</item>
<item name="android:windowExitAnimation">@anim/shrink_from_top</item>
</style>
<style name="Animations.PopDownMenu" parent="@style/Animations">
<item name="android:windowEnterAnimation">@anim/grow_from_topright_to_bottomleft</item>
<item name="android:windowExitAnimation">@anim/shrink_from_bottomleft_to_topright</item>
</style>
<style name="menu_dialog_theme" parent="@android:style/Theme.Dialog">
<item name="android:windowBackground">@drawable/menu_background</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
</style>
</resources>

Categories

Resources