I need to display a separator between the logo and text on the action bar. Is it possible to set this via styles?
P.S: My minSdk is 14, so I use system Holo elements.
I am not sure you can achieve this with the style. Generally the dividers are made for the MenuItem. A simplest way to do it, it's to add manually your divider inside your icon app and keep the width unchanged.
Related
Im making an app for android, without actionbar.
What is best practice for showing titles without actionbar?
The best practice is basically never using an action bar. This gives you a complete device screen to play with.
You can use images or different text styles for showing the title. You can also use interesting icons.
To remove action bar -
Go to res > values > styles.xml
Here is an illustration of styles file -
You can use the Toolbar (it's like the action bar, but more flexible). For example, action bar needs to be on top of the screen, but toolbar can have place anywhere in the layout.
You title can be shown as text or a beautiful asset.
If, for some reason, you don't want to use the toolbar, you can think about something like having a scrollView with the title on top of it.
Use a regular LinearLayout with a TextView inside. Style according to your needs, and set the text in the xml, or programmaticaly using TextView's setText() method.
I am modifying an three year ago app from my company.
As you see on picture, there is a very ugly gray thin action bar on the top.
I want to modify it, but I couldn't find it anywhere in the packages.
This is an API 14 Android 4.0 app.
You should change the style of the app (or activity) with something like:
#android:style/Theme.NoTitleBar
You can find more here:
How disable / remove android activity label and label bar?
And create your own layout or use the action bar. If you just want to change the text, change the label
I want to remove (or change color) to the horizontal teal line splitting the action bar and the activity.
Any help would be apreciated,
Best regards.
You need to change the background of the actionbar.
getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor("#000")));
If you want to change the color you can put any drawable that you want. This tool can even generate a lot of stuff for you : ActionBar Style Generator.
I have an Android app which allows the user to change the color of a background based on the selection they choose.
This is the line that changes the color:
appBackground.setBackgroundColor(Color.rgb(inRed, inGreen, inBlue));
How do I also change the menu bar color as well the notification bar to change to that color of the user's choice?
I know it's only possible in KitKat but can someone point me to the way...
If you would like an effect like the image below, have a look here:
Why can't we use a Translucent system bars with and ActionBar
As you can see, the background color can be changed programatically (so it's not defined in the xml).
My app uses Theme.Holo. When I instantiate an ExpandableListView, it uses white icons for the group rows. (in the image, the icon is visible in the first row because I am pressing this row to highlight it, the other rows have invisibly white icons).
I know I can set the group icon with ExpandableListView.setGroupIndicator(), but I would rather specify to use a dark version of the OS icon, if this is possible?
You will need to change the default group indicator in this case. A light or dark indicator are just different icons anyway. Without changing the theme, the only way is to change the icons/drawables for the indicator.