How to change the limit of items in an action bar - android

I have an app that utilizes Action Bar Sherlock and has 5 icons at the bottom(split when narrow). On most devices, the 5 icons are visible but on Motorola RazR or in emulator with long screen ratio and xhdpi(540x960), only 4 icons are visible and I guess that's what they call an overflow.
What I can't understand is that even if I set the icons to very small images, enough for 5 to fit on the screen, the RazR only shows 4 with wide spaces in between.
Is there a limit that can be changed so that I can forceably display all 5 icons on the bottom? Thanks!
(I don't want to post long unrelated junk of codes here so just tell me what part do you want to see)

After some more research, looks like It is impossible to change. On this document link
The number of icons is dependent to its screen density.
Looks like the best solution is to have your custom made bottom menu bar.

Related

Action Bar with centered logo

I would like an ActionBar where I place an image/logo in the center of the bar, rather than the default left end. I'm using the standard android classes building with level 18, no compatibility classes and no ABS. I've looked at this solution which seems to be the most popular answer:
ActionBar logo centered and Action items on sides
... but it simply doesn't work for me. I'm using various devices including HTC One with 4.2.2, Nexus 7 with 4.2.1. However much I play with the solution, the text or image still appears left aligned, plus the layout file only takes effect for the width of the image, and does not span the entire ActionBar.
My request is just for the solution to centering the logo, I'm not interested in any left or right home/menu buttons.
A centered logo on the ActionBar actually violates the Android Application Design Guidelines unfortunately, you can find a comprehensive guide here:
http://developer.android.com/design/get-started/ui-overview.html
The accepted norm is to have the logo to the left hand side.

android actionbar button sizing issues

I'm having sizing issues with my action bar buttons on Android 4.2.2. On all other versions, the sizes are acceptable (thought it's still maddening that I can't get one standard size). Android 4.2 appears to be constraining the widths of the buttons (which are rectangular and not squares) down to fit within the width of whatever 4.2 feels that the action bar buttons ought to be. Is there a way to instruct the program how wide action bar buttons ought to be, or how wide my specific buttons ought to be?
I've created a test project that has my action bar background and one of my buttons, in order to try to track down the problem. Here is how it appears in the emulator for the problematic 4.2:
http://i1364.photobucket.com/albums/r728/jasonjtyler/ScreenShot2013-06-27at110115AM_zps9b1bd09a.png?t=1372349904
Here it is in 4.0, which is basically representative of the other versions also (besides 4.2):
http://i1364.photobucket.com/albums/r728/jasonjtyler/ScreenShot2013-06-27at110951AM_zpsa5734a91.png?t=1372349914
Thanks for any help.
Jason
Um... What I see in a picture in not in line with design guides and doesn't look good.
My guess is that you are trying to do something the way you shouldn't do it.
Make your button standrard sizes and in a shape of a square not a rectangle.
For cancel option there exists standard image of a cross.
I think you should use this image, but customised it to your desing.
Action bar icon size in Android 4.2

Android - size (and names) of screen componants

I'm sure this will have been asked before, but I don't know how to look it up because I don't know the names of the things I'm looking for...
I'm making a live wallpaper and have a canvas which covers the whole screen. At the top of the screen, there is a bar containing tiny icons and I need to know how many pixels this is occupying because I want to avoid having the top of my displayed image being chopped off. What is this bar called, and how tall is it?
Also at the bottom of the screen there is another bar containing bigger icons - it can be scrolled sideways. What is this called and how tall is it?
After further investigation, I have seen the top bar described as a title bar, a status bar and a notification bar! I still don't know which is correct... but I did find this question which answers the most important part of my question.

Android 4.0.3 keyboard exceeds bottom display border

In my own AOSP build on target and emulator I have the issue that the Android keyboard exceeds the display boarder on the bottom side. The 4th row with the space bar is only displayed half and cut by the bottom boarder of the screen.
The same issue can be seen on the standard google emulator. Just press on the search bar to reproduce it.
I'm using a 320x480 mdpi display layout, for the emulator e.g. the predefined defintion for the "3.2" HVGA slider (ADP1)"
It seems to be an issue for Android 4.0.3 as with Android 4.2.2 I cannot reproduce it.
Is this known and is there a solution avialable?
Any help is highly appreciated.
Thanks!
Meanwhile found a solution by myself. Probably it is useful for someone else:
see packages/inputmethods/LatinIME/java/res/values/dimens.xls
Android 4.0.3/4 uses a 240dip height for the key_preview_backing_height (6 preview rows maximum with 40dip each). Together with the more_suggestions_row_height of 40dip already 280dips of the display are used.
Together with the status bar (~25dip) a 3,2" display with 320x480 pix does not offer enought height to display the entire keyboard.
Reducing the number of preview rows to 5 solves the issue for me. This reduces key_preview_backing_height to 200dip and gives enough space for the keybaord.
BR,
klo ZwoFünf

Android Graphic designing

I'm developing a simple app with a customized background and a button in the middle.
I've got the whole different resolutions for different screens down, but do all the versions of the background need to be 9patches? How do I take into consideration the always there android top navigation bar and the possible use of advertisements at the bottom? Do they just cover the design or do they change the resolution?
I've got the whole different resolutions for different screens down
that's not how it works on android. see this:
http://developer.android.com/guide/practices/screens_support.html
do all the versions of the background need to be 9patches?
no . you decide . normally, buttons and views use the 9 patch images, but it can be useful for many other things. more info:
http://android10.org/index.php/articlesother/279-draw-9-patch-tutorial
http://radleymarx.com/blog/simple-guide-to-9-patch/
How do I take into consideration the always there android top
navigation bar and the possible use of advertisements at the bottom?
you can put a linear layout which has the ad on the bottom , and once it will be shown , the upper view will shrink its size.
about the action bar on the top, it doesn't matter , since the layout is below it anyway.
if you wish, you can also hide the top bar. however , if you have the bottom navigation bar (as on honeycomb and some ice-cream sandwich devices ) , you can't just hide it , since the end user must be able to press the back and home buttons .
Do they just cover the design or do they change the resolution?
you (and also those components) can't change resolution just like on a PC . everything takes space depending on your code and layout.
it seems that you need some guidelines of how to design for android. may i suggest checking out those links:
http://developer.android.com/design/index.html
http://www.google.com/events/io/2011/sessions/designing-and-implementing-android-uis-for-phones-and-tablets.html
http://www.google.com/events/io/2011/sessions/honeycomb-highlights.html

Categories

Resources