This question already has answers here:
How to set ActionBar logo to Text (TextView)?
(2 answers)
Closed 9 years ago.
I have an app and I have managed to add an image for the home button in the action bar.
I did this using the actionbar.setIcon() method.
The image is essentially a blank button image. I want to be able to add the text "exit" on top of the image. Is there a way to do something like this ?
so far i know no. But you can make an image button direct with your text "exit"
I did a workaround.
I made the home button hidden using :
Actionbar.setDisplayShowHomeEnabled(false);
and then added a button to the action bar, with the image
and the text on the button.
Related
I recently got into android development. I just started on my first app and was wondering how to move the app title right next to the drawer icon instead of it being in the middle like this.Example
Is there anyway to do this at all? Thanks.
Normally,the app title is right next to the drawer icon. I think your layout file may have a problem, can you show you layout code?
I've been wondering about this question quite long time. How do they do that? Is the title just disabled and the HomeAsUp button is custom and contains the logo, arrow and text?
Do you know any other ways how to accomplish this?
You can achieve this by making a single image that contain both
- arrow.
- text.
- icon.
And the work on this single image action
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Creating a sliding drawer with menu items
As shown in the screen shot attached i need to show a menu in my application. How it is possible ?
I guess you are using action bar sherlock library,If so, first enable homebutton which is on left side of an actionbar
mActionbar.setHomeButtonEnabled(true);
Then, Set Icon for that button
mActionbar.setIcon(R.drawable.image_name);
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Hiding Title in a Fullscreen mode?
I am making a app that need to be in full screen. i want the notification bar to show, but not a titlebar or icon (my build target is 4.0.3). I have tried to put it in full screen but it stays the same.
Is there any alternative to get full screen app layout / view?
Any help would be greatly appreciated!
i want to hide the hello android text and icon
here is a example:
In the Manifest file, under each activity tab you want to be without a title bar, place:
android:theme="#android:style/Theme.NoTitleBar"
If you wanted no notification bar as well, then use:
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" >
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Android: How to create slide (on/off) button
I want to create sliding button in my Android application such that it will look like the following:
How can I do that?
Use ToggleButton for creating this sliding button
see this tutorial for Creating Custom ToggleButton in Android
Sexily Styled Toggle Buttons for Android (archive.org mirror)
EDIT : if you are using Android API LEVEL 14 or above then you can also use Switch Widget for creating sliding button see this example :
Creating a Switch