My actionbar does not use an icon or a title, this makes the click area of the "up" button very small. How can I have a larger click area without a title and icon in the actionbar?
Asked
Active
Viewed 324 times
2 Answers
1
You can put an image where the app icon would be. Just make a transparent image to the width and height for each drawable size you need and put it in the drawable folder, call the image logo (@drawable/logo). You then need to tell the activity to use the logo, it's not hard and these links should help.
http://developer.android.com/guide/topics/ui/actionbar.html
http://developer.android.com/guide/topics/manifest/application-element.html#logo

The Fish
- 113
- 1
- 8
-
the logo can be any width? I just assumed it would be transformed into a square. What about blank text in the title? " " , maybe in HTML.text – CQM Apr 28 '14 at 16:36
-
1No I don't think so, what i meant was the width and height for each drawable size. The solution could work though, try \u00A0 as well, thats the Unicode no-break space character and I think that should work. – The Fish Apr 28 '14 at 16:42
-
I did the blank text with multiple "\u00A0" instead, but I'm going to go ahead and accept this answer – CQM Apr 28 '14 at 17:54
0
One way to do it would be to set a custom icon for the "up" button in your app theme as so:
<item name="android:homeAsUpIndicator">@drawable/your_drawable</item>

Nyx
- 2,233
- 1
- 12
- 25