Color Icon in the Bottom Navigation Activity - android

Question
how Can I use colored icon in the Bottom Navigation Activity? I have a logo which I placed in the drawable folder but in the navigation bar its showing in black and white color instead of regular color as I copied in the drawable folder. Please share your thoughts. I am using kotlin language.

You can try using bottomNavigationView.setItemIconTintList(null);. This may work. But still, I'll suggest using a different library as mentioned in my comment.

You have to provide color in onClick listener using
window.navigationBarColor = Color.GREEN
Use Color.parseColor() to set some custom color to Navigation Bar

Related

Android floating action button with custom background

Is it possible to set a custom background to a floating action button? For example, I'd like the fab to have background color with a gradient, and the "plus" icon on top of that. I've only seen simple background color so far. I'd like to keep using the design support library from Google.
You set background color to Floating Action Button through this property:
android:backgroundTint= "#color/colorPrimary"
and this does not accept #drawable. Which means you can not apply any drawable so my answer is NO, you cannot apply gradient to fab.
According to Google Buttons: Floating Action Button documentation, Google suggests to avoid such designs.:
Have a custom xml for the background and have a drawable for the src. With this you might be able to solve your problem. Hope this helps.

How to create a custom ActionBar with a background and a pattern image?

I have to create an ActionBar with a background and another image on top of the background (with opacity) which displays like a pattern.
I have found the way to set the background image for my ActionBar, by using setBackgrounddrawable().
But how can I set the pattern image on top of background image?
Can anyone please suggest?
A great SO Post for making a custom action bar. To set the opacity, use View.setAlpha(float) 0f to 1f.
This may help you "http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/"
,this example having types of action bars.

Styling Android ActionBar

The image will explain everything i need ;)
I'm looking for the exactly same style ( with the thin line also that is near to their logo) (keep in mind i have the logo drawable file )
UPDATE
Now i'm getting exactly what i want but i have one bug yet.
How to remove the arrow highilited in red? keep in mind i'm extending Sliding Menu
Have you tried getActionBar().setLogo( R.drawable.logo );
you can use getActionbar().setDisplayUseLogoEnabled(false); to remove the icon from the actionbar and then getActionBar().setDisplayShowHomeEnabled(true) to enable the arrow but the image you show looks like they created an image with an arrow and replaces the icon with that arrow image.
so in other words you would use this
getActionBar().setIcon();

How do I change the style of the Android Actionbar Stackedbar's tab at runtime?

How can I change the Android StackedActionBar's Tab text color, Tab divider color, and selected navigation Tab selector color dynamically at runtime using java? I have not been able to find solutions for this without having to alter my XML each time. I have however been able to change the StackedActionBar's background color using the method for the ActionBar class:
setStackedBackgroundDrawable(Drawable drawable)
Thanks for any help in advance.
If you are adding Stacked Tabs to the Actionbar pragmatically, then you can do the styling stuff via Java. If you are declaring the Actionbar's components in XML, then you cannot highly modify the styling stuff via Java.
Here is a detailed link for dealing with Action bar.

Android ActionBar (Sherlock) - Changing menu icon color / transparency

Is there a way to make to change the color of the 3 dots of the menu icon?
I'd like to make them completely white without any transparency but haven't found anything in the android styles/themes?
FYI: I'm using actionbarsherlock.
Thanks in advance :)
this is because they aren't made in the code just search the image com_actionbarsherlock/res/drawable-hdpi/abs__list_divider_holo_light.9.png in your drawable directory there you can change the color of this image.

Categories

Resources