Layout issues when adding toolbar to preference screen - Design, Prototyping, UI, Graphics

I try to built a preference screen with a toolbar, but I got some issues:
- There is a word "main". How can I remove it?
- The status bar is white. I want it to look like my main screen (same theme). Somehow it does not apply the color
- The toolbar overlays the content. I tried a a layout_marginTop on the list view, but it does not change anything.
Here is the code of my activity_settings.xml:
Code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/colorPrimary"
app:navigationIcon="?attr/homeAsUpIndicator"
app:title="@string/action_settings"
android:theme="@style/ThemeOverlay.AppCompat.Dark" />
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize"/>
</LinearLayout>
This is the AndroidManifest entry:
Code:
<activity
android:name=".activities.SettingsActivity"
android:label="@string/activity_settings"
android:theme="@style/AppTheme.NoActionBar" />
Can anybody help me?

Why don't you link the manifest of the 2 activities to the same style theme?
--------------------------
I keep track of your replies with my android devices using the app "Tapatalk".

What do you mean? Can you please give me a short example? Thank you!

He wants both of the activity to have the same theme. You have to do it in the manifest. Also to remove main, you have to set android:label=""

To change the status bar color, change color for colorPrimaryDark in color.xml

Related

All You XML Buffs Out There!!!!!

Is there a way to have the "Startbar" "Deskbar" a shiny black hue, similar to using Base Hue/greyscale, but having it pre-coded in the respective "scheme.xml"?
I would guess it would require changing some of the below values or adding new ones, but all i can get thus far is a medium grey. :-(
<colorscheme><title>N15H_HUD</title>
<scheme>
<color name="COLOR_HOMETEXT" value="#FFFFFF" />
<color name="COLOR_HOMERULE" value="#000000" />
<color name="COLOR_HIGHLIGHT" value="#0066CC" />
<color name="COLOR_TRAYGRADLEFT" value="#000000" />
</scheme>
</colorscheme>

(Q) black menu popup

Was wondering where the png or the xml file is to change it to black like gingerbread when u press the menu button. Or even slightly black transparent. Where in the framework res is it located? Thanks!
Its in the gb theme. Its a .9.png that needs to be edited in the framework. Then you have to replace all the icons that show up in that menu with lighter icons our colorfull ones. You also need to edit a couple xmls to show the text right
Android Creative Syndicate- From spontaneous ingenuity, comes creative brilliance
mysteryemotionz said:
Its in the gb theme. Its a .9.png that needs to be edited in the framework. Then you have to replace all the icons that show up in that menu with lighter icons our colorfull ones. You also need to edit a couple xmls to show the text right
Android Creative Syndicate- From spontaneous ingenuity, comes creative brilliance
Click to expand...
Click to collapse
Mystery, seeing as you're a theme dev, you'd probably know the answer better than I would, could someone just extract some of the images from one theme and replace them in another theme to get the look they want? (Sorry to derail the thread.)
Thanks for the quick reply. What's. The .9png file name. And xml located for the text?
063_XOBX said:
Mystery, seeing as you're a theme dev, you'd probably know the answer better than I would, could someone just extract some of the images from one theme and replace them in another theme to get the look they want? (Sorry to derail the thread.)
Click to expand...
Click to collapse
You are correct but the xml edits are gonna have to be done in a decompiled apk. You can't decompile a custom framework and the recompile it. You have to start with a stock framework. Your best bet is to ask your theme dev if this is something he's willing to do
Android Creative Syndicate- From spontaneous ingenuity, comes creative brilliance
hugo87 said:
Thanks for the quick reply. What's. The .9png file name. And xml located for the text?
Click to expand...
Click to collapse
I'm not sure of .9 off of the top of my head I would have to look at my files. All I can tell you is its in framework-res.apk/res/drawable-hpi.
As far as the xml goes I would have to check my notes that the dev of the gb theme have me.
Android Creative Syndicate- From spontaneous ingenuity, comes creative brilliance
all credit goes to amosher13
here is the xmls i edited to deal with dark menu images. make sure you link me to wherever you post this bad boy:
Set menu text to white
In /res/values/style.xml change the following:
Code:
style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">?textColorPrimaryInverse</item>
</style>
TO:
Code:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">@color/bright_foreground_dark</item>
</style>
--------------------------------------------------
and (for the "more" menu lists)
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">?textAppearanceLargeInverse</item>
<style>
TO
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">?textAppearanceLarge</item>
<style>
---------------------------------------------------
Fix menu button dividers
Also in /res/values/style.xml:
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/divider_horizontal_bright</item>
<item name="verticalDivider">@drawable/divider_vertical_bright</item>
<item name="itemBackground">@drawable/menu_selector</item>
<item name="itemIconDisabledAlpha">?disabledAlpha</item>
<item name="moreIcon">@drawable/ic_menu_more</item>
</style>
TO
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/divider_horizontal_dark</item>
<item name="verticalDivider">@drawable/divider_vertical_dark</item>
<item name="itemBackground">@drawable/menu_selector</item>
<item name="itemIconDisabledAlpha">?disabledAlpha</item>
<item name="moreIcon">@drawable/ic_menu_more</item>
</style>
---------------------------------------------------
Change secondary text in settings from blue to whatever
In /res/color/zzz_tw_secondary_text_sub.xml change the colors in the following two lines to ffffffff (for white):
Code:
<item android:state_window_focused="false" android:color="#ffffffff" />
<item android:color="#ffffffff" />
---------------------------------------------------
change notification text on pulldown
There are three text color settings in
/res/layout/status_bar_latest_event_content.xml.
Change all three of them. ff000000 is black.[/QUOTE]
the menu is popup_top_bright.9.png and popup_bottom_medium.9.png i believe
Freakin sweet!!! Mystery you are the man! Realy appreciate it. Thanks!
hugo87 said:
Freakin sweet!!! Mystery you are the man! Realy appreciate it. Thanks!
Click to expand...
Click to collapse
Don't forget to thank asmopher13 got the xml edits. I just copied and posted what he gave me
Android Creative Syndicate- From spontaneous ingenuity, comes creative brilliance
Will do man thanks again man!
MysteryEmotionz said:
all credit goes to amosher13
here is the xmls i edited to deal with dark menu images. make sure you link me to wherever you post this bad boy:
Set menu text to white
In /res/values/style.xml change the following:
Code:
style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">?textColorPrimaryInverse</item>
</style>
TO:
Code:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">@color/bright_foreground_dark</item>
</style>
--------------------------------------------------
and (for the "more" menu lists)
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">?textAppearanceLargeInverse</item>
<style>
TO
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">?textAppearanceLarge</item>
<style>
---------------------------------------------------
Fix menu button dividers
Also in /res/values/style.xml:
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/divider_horizontal_bright</item>
<item name="verticalDivider">@drawable/divider_vertical_bright</item>
<item name="itemBackground">@drawable/menu_selector</item>
<item name="itemIconDisabledAlpha">?disabledAlpha</item>
<item name="moreIcon">@drawable/ic_menu_more</item>
</style>
TO
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/divider_horizontal_dark</item>
<item name="verticalDivider">@drawable/divider_vertical_dark</item>
<item name="itemBackground">@drawable/menu_selector</item>
<item name="itemIconDisabledAlpha">?disabledAlpha</item>
<item name="moreIcon">@drawable/ic_menu_more</item>
</style>
---------------------------------------------------
Change secondary text in settings from blue to whatever
In /res/color/zzz_tw_secondary_text_sub.xml change the colors in the following two lines to ffffffff (for white):
Code:
<item android:state_window_focused="false" android:color="#ffffffff" />
<item android:color="#ffffffff" />
---------------------------------------------------
change notification text on pulldown
There are three text color settings in
/res/layout/status_bar_latest_event_content.xml.
Change all three of them. ff000000 is black.
Click to expand...
Click to collapse
[/QUOTE]
hello mystery, do you mind taking a look at my screenshots?, your advice will be highly appreciated.
hello mystery, do you mind taking a look at my screenshots?, your advice will be highly appreciated.[/QUOTE]
This is something i haven't done or looked into. From what I have seen I believe the widget picker text is controlled in styles.xml. The compressed calender image looks like a .9.png error. The input text I haven't seen at all and I'm getting a feeling that would be controlled from app 2 app
Sent from my SPH-D700 using Tapatalk
MysteryEmotionz said:
hello mystery, do you mind taking a look at my screenshots?, your advice will be highly appreciated.
Click to expand...
Click to collapse
This is something i haven't done or looked into. From what I have seen I believe the widget picker text is controlled in styles.xml. The compressed calender image looks like a .9.png error. The input text I haven't seen at all and I'm getting a feeling that would be controlled from app 2 app
Sent from my SPH-D700 using Tapatalk[/QUOTE]
Firstly, thank you for your reply..
1)In moto milestone,(CM6 to be specific) the styles.xml is not available in framework-re.apk/res/color. I had attached the content of res/color folder below for your viewing.
2)".9.png error" thank you so much for clarifying this..now i know where to go..
p/s: this only happens in landscape. in potrait, it is perfect.;
Let me know if you still need help with the text color,,,Its the Primary_text_Light.xml,thats the only one that need to be changed.
Sent from my MyFrankenstein E=Bee13² ROM using XDAP App...
THANKS ecooce, i am trying it out now..wwill update soon
here the orginal content of Primary_text_light.xml
<?xml version="1.0" encoding="UTF-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="@color/bright_foreground_light_disabled" />
<item android:state_window_focused="false" android:color="@color/bright_foreground_light" />
<item android:state_pressed="true" android:color="@color/bright_foreground_light" />
<item android:state_selected="true" android:color="@color/bright_foreground_light" />
<item android:color="@color/bright_foreground_light" />
</selector>
and heres the modified version
<?xml version="1.0" encoding="UTF-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="@color/bright_foreground_light_disabled" />
<item android:state_window_focused="false" android:color="@color/bright_foreground_light" />
<item android:state_pressed="true" android:color="@color/bright_foreground_light" />
<item android:state_selected="true" android:color="@color/bright_foreground_light" />
<item android:color="@color/bright_foreground_dark" />
</selector>
THANK YOU SOOO MUCH TO ecoocemystery emotions!! im as happy as (god knows what!!) thank you to so so much!!
vesparados150 said:
This is something i haven't done or looked into. From what I have seen I believe the widget picker text is controlled in styles.xml. The compressed calender image looks like a .9.png error. The input text I haven't seen at all and I'm getting a feeling that would be controlled from app 2 app
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
Firstly, thank you for your reply..
1)In moto milestone,(CM6 to be specific) the styles.xml is not available in framework-re.apk/res/color. I had attached the content of res/color folder below for your viewing.
2)".9.png error" thank you so much for clarifying this..now i know where to go..
p/s: this only happens in landscape. in potrait, it is perfect.;[/QUOTE]
1)Styles.xml should be in framework-res.apk/res/values
(this is where it is on my phone. Idk if cm6 Is any different)
2)those ticker buttons are .9s and something went wrong. Your gonna have to redo that ticker button
Sent from my SPH-D700 using Tapatalk

Background of Theme.Light

prejudice would like to change a simple setting png as a background but I do not know how to do .... the value of style.xml is simply this
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="@android:style/Theme.Light" />
</resources>
how can I do ?
massinegro204 said:
prejudice would like to change a simple setting png as a background but I do not know how to do .... the value of style.xml is simply this
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="@android:style/Theme.Light" />
</resources>
how can I do ?
Click to expand...
Click to collapse
I'm not really sure what or how you're trying to do this, but if i'm following you right you could do something like this
Code:
<style name="AppTheme" parent="@android:style/Theme.Light">
<item name="windowBackground">@drawable/app_theme_background</item>
</style>
app_theme_background being your xml in drawable that defines the drawable/s
Here's the original xml from framework drawable (screen_background_selector_light.xml)
Code:
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/screen_background_light" android:state_accelerated="false" />
<item android:drawable="@drawable/background_holo_light" />
</selector>
'screen_background_light' or whatever you wish to name it...being your alternative hex color in values/drawables (guessing that's for slower devices or something)
'background_holo_light' or whatever you wish to name it being your alternative background image.

[GUIDE] [HOW-TO] Full Statusbar Brightness Android 4.3

[GUIDE] [HOW-TO] Full Statusbar Brightness Android 4.3
This will give back full brightness to 4.3 TW statusbar on ENTIRE statusbar (left and right notification areas).
SystemUI/res/statusbar.xml edit:
Search for two occurrences of alpha and delete that part of the statement out of both lines. Example:
Delete code highlighted in RED.
Code:
<LinearLayout android:orientation="horizontal" android:id="@id/notification_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" [COLOR='RED']android:alpha="@dimen/notification_icon_area_alpha"[/COLOR]>
<LinearLayout android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="wrap_content" android:layout_height="fill_parent" [COLOR='RED']android:alpha="@dimen/system_icon_area_alpha"[/COLOR]>
Edit: An alternate method requires editing the alpha values in res/values/dimens.xml. I took the easy way out on this one.
tdunham said:
[GUIDE] [HOW-TO] Full Statusbar Brightness Android 4.3
This will give back full brightness to 4.3 TW statusbar on ENTIRE statusbar (left and right notification areas).
SystemUI/res/statusbar.xml edit:
Search for two occurrences of alpha and delete that part of the statement out of both lines. Example:
Delete code highlighted in RED.
Code:
<LinearLayout android:orientation="horizontal" android:id="@id/notification_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" [COLOR='RED']android:alpha="@dimen/notification_icon_area_alpha"[/COLOR]>
<LinearLayout android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="wrap_content" android:layout_height="fill_parent" [COLOR='RED']android:alpha="@dimen/system_icon_area_alpha"[/COLOR]>
Click to expand...
Click to collapse
Excellent, never noticed how dim it was before. Curious, what's the name of the battery widget in the screen shot?
Ramer84015 said:
Excellent, never noticed how dim it was before. Curious, what's the name of the battery widget in the screen shot?
Click to expand...
Click to collapse
I can't recall. It is one of the several battery mods included with MOAR Rom.
Ramer84015 said:
Excellent, never noticed how dim it was before. Curious, what's the name of the battery widget in the screen shot?
Click to expand...
Click to collapse
It's battery monitor widget by 3c
Is the brightness that noticeable? It's difficult to tell the difference between the screenshots on my phone.
metalfan78 said:
Is the brightness that noticeable? It's difficult to tell the difference between the screenshots on my phone.
Click to expand...
Click to collapse
Nice observation.
Yes it is fairly noticeable but it's not easy to see from the mobile app. View the screenshots with a pc browser and toggle between them quickly and you will see how it brightens up the entire statusbar and the associated icons.
Wow, there is a difference. I can't decide if I like dim or bright though.

[GUIDE] Color the status bar according to your app.

Add this code to your styles.xml in res>values (API 21+ only)
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light">
<!-- This controls status bar color -->
<item name="android:colorPrimaryDark">#B86E00</item>
<item name="android:colorAccent">#FF9800</item>
</style>
</resources>
Add the color you want the status bar to display in place of #B86E00.
Keep in mind that status bar looks better if it is a bit darker than your app theme.

Categories

Resources