I am using ActionBar (Compat) version of PullToRefresh library (https://github.com/chrisbanes/ActionBar-PullToRefresh) in my Holo Light application.
See https://dl.dropboxusercontent.com/u/10057117/ns_bnp_dev/styles.png to see my basic layout.
Now my customer asked me to change the blue color of selected tab in action bar and blue color of indeterminate progress bar that is shown by pulling the list down (part of PullToRefresh component).
I failed to find some easy way to do so.
I am able to change the background of tabs in actionbar by creating new drawable resource for whole background. I believe there must be some more easy way just specifying the color.
I am not able to change the color of the progress bar, PullToRefresh's ptrProgressBarColor attribute applies only to progress shown when in pulling gesture.
Anyone has the experience with re-styling any of these?
Thanks a lot
If you want to change the color of the indeterminate progress bar,
change the
<color name="default_progress_bar_color"> #FF33B5E5 </color>
in the colors.xml of the PullToRefresh library.
Related
I have created 2 fragments and made them overlap using bottom sheet. First one fragment opens, then the second framgment opens, but when the 2nd fragment is closed,the colour of the status bar icons change to white if the status bar background is white and same for dark.
How do I fix this? Or how do I change the colour of status bar icons?
I have read the docs and read about WindowInsetsController but this will do it for android R only. My issue persists for all versions.
Please help.
You can't change the icons with a specific color but with that in your styles.xml file you can make it light or dark. Keep in mind that it only works API 23 and above.
<item name="android:windowLightStatusBar">true</item>
More references or ways of individual solutions you can find at this post.
I have an action bar that has a specific theme to it(some sort of color) that I want to apply to all activities/fragments that looks something like the attached picture.
Then once I click the dropdown, I'd like the dropdown background to be a different color. How would I go about styling that background.
Right now this is theme I have
<item name="toolbarTheme">#style/ThemeOverlay.AppCompat.Dark.ActionBar.WhiteDropDown</item>
Once I click the dropdown menu, the background of the dropdown appears to be black. What should I do to change that?
I've tried creating a subclass of #style/ThemeOverlay.AppCompat.Light and change the entire toolbarTheme to that style. But at the same time, the actionBar texts now all appear in black since its style is Light, and to contrast that, the texts will be black in default. Therefore, I'm wondering if there's any other attribute I can modify just to change the background of the dropdown menu.
I've tried, actionMenuTextColor, actionBarPopupTheme, spinnerDownItemStyle, actionBarItemBackground, actionDropDownStyle, and everything I can think of. Someone please help out!
Thanks!
I am a noob on android graphics and I would like to change the appearance of a seek bar without creating a completely new custom view. I noticed that if I change the android:theme="#android:style/theme..." of the activity in the android manifest the style of the seek bar change. But what if I want a particular style for the seek bar only and keep unchanged the style of the activity? How can I see all possible precompiled styles?
Obviously, the question is for all other views also...
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 am trying to find the method to change the underline color or background of the tabs in action bar through some code but can't find the answer? Please help
Per the Android Documentation on customizing the tabs of an Action Bar:
"To change the indicator used for the navigation tabs, create an
activity theme that overrides the actionBarTabStyle property. This
property points to another style resource in which you override the
background property that should specify a state-list drawable."
You may also want to look at this style generation tool that I've found helpful. It will auto generate the Action Bar style based on you GUI selections. Might be a bit overkill for some basic things. But, you can also pull out just the styles you need from the generated code.