Im trying to change the icon to TextView and color it's background.
Actually i have icon on the left side of item, and the text with colored background on the right, using android:actionLayout.
And i want to delete the icon on the left side, and place there a text with colored background which i have currently on right side.
Any possibility?
I think you might need to create your own Navigation drawer adapter. Check answers in this thread to understand how to do it.
How to create a custom navigation drawer in android
Related
I want to add title under the icon that as default appears when i create the navigation drawer .
like in red border
Its not possible if you use normal ActionBarToggle, you can provide your own custom layout in toolbar and add menu icon to it but back animation will not work. Also you will have to handle click events on the menu your self
I am new to Android development I am building an app but from last three days, I am stuck while making toolbar I am very confused. I want to make toolbar like this
The widget elements in your design are the following from left to right:
Navigation Drawer Indicator
ImageView
SearchView
Toggle
Overflow Menu
These can all be implemented using default widgets. It is not common to put a profile image to the right of the title, but you could do this by putting a custom layout inside the toolbar view.
It is also not common to place a toggle in the action bar, but it is possible using an ActionLayout.
Instead of continuing the search on how to do this I thought I would pose the question here and see if I had any luck. I am working on an Android app that uses a navigation drawer and I want a custom color when the user touches one of the items in the drawer (not the default light blue). I have three XML files, one for shape/color when not pressed, one for when pressed, and a selector. All of these work great and when a touch on an item in the navigation drawer takes place it shows red like I want. But when the navigation drawer is slid out again the selected item once again shows the default color of light blue. Does anyone know how to keep this custom color selection persistent?
Thank you very much. I certainly appreciate any help!
I have been trying to figure out how to make an actionbar tab menu like the one pictured below. How can I make my tabs display the icon above the text as shown here? When I implement it, it displays the icon to the left of the text. Is there something akin to the compund drawable feature of TextView (android:drawableTop) I can use for the tab?
I am using a custom XML for the Main bar, and actionbarsherlock.
that is the old android tabs view, the new ones have the text on the side next to the image
I have a SlidingDrawer menu in my app, and when the drawer is open I want the name for each button on the drawer to display as the buttons go pass it.
Do you all have any ideas to whether this is possible or not? I have been searching for about an hour and I can't find any answers.
Assuming I understood what you want correctly (adding text from the drawer on top of buttons on the main layout) you can try this. I don't know how accurate it would be:
Place the sliding drawer as the topmost element in your layout with a transparent background.
Use exactly the same layout you're using for your "main" layout (where the buttons are) and use a textView where your buttons are.
When your sliding drawer opens, the text from its content will appear on top of the button