Android Action Bar Title Text not clickable on certain phones - java

I have a project that I am currently updating. In previous versions I have been able to select the title text, and it would react as part of the back button in the action bar. I currently have no icon in the actionbar by design and in previous versions the text was still interactive.
I tried implementing different layouts for varying screen sizes, however, since then on normal and small screen sized phones (tested: Samsung Galaxy S III Mini and Sony Xperia tipo) now only the back button ("<") reacts to touch.
The title text is still clickable on an Samsung Galaxy S4 and a Nexus 4. I have reverted the code back to how it was before I made those changes, along with trying code from last week to make sure nothing has changed, and the bug still occurs. I have tried other apps on the Samsung Galaxy S III Mini and the text in RedReader is clickable, so it's definitely app side, but I am not sure what has changed that will cause this.
I am currently at a loss as to why it is doing it. I've also attempted to update ActionBarSherlock to see if that may have caused an issue, but I am not sure what to try next.

Title on ActionBar is clickable from 4.2.2 version of Android. Before only < or icon.

If you have the need to implement this functionality in previous versions (including versions 2.x), you can use the ActionBarSherlock.
The library will automatically use the native action bar when appropriate or will automatically wrap a custom implementation around your layouts. This allows you to easily develop an application with an action bar for every version of Android from 2.x and up.
Visit http://actionbarsherlock.com/

Related

Android Menu Overflow

My Problem is that in some cases the overflow menu dosent work on some phones. First i thought it is the android version and designed 2 different menu xml.
But a Samsung Mini S4 with 4.2.2 doesnt show the overflow and Samsung S5 with 4.2.2 shows the overflow menu.
It seem maybe something to be with the hardware buttons, i dont figure it out.
Can anyone help me how to detect when the menu overflow is shown?
I use following: Com.android.support:appcompat-v7:21.0.3
Thanks Malte
Yes, it is the hardware menu button. So on devices that have the hardware menu button, the overflow menu will not display since the user can use the hardware button (it reduces redundancy). However, IMO it also reduces usability since most users do not think to hit that button (at the least, they do not in my apps).
So you can detect the hardware button: Android: Programmatically detect if device has hardware menu button
And then display a menu item that looks like the "***" menu button and have it activate the menu if you like.

Is it possible to prevent the navigation bar on Android <4.4?

In my application I want to prevent the display of the navigation bar. In Android 4.4 it's easy to implement (see here: How to hide navigation bar permanently in android activity?), but lower versions can't do this.
I saw a similar mechanism in some players which hide navigation bar in fullscreen without any possibility to display it when the screen is touched.
I would be grateful for tips or code samples as it can be done.
Thank you.
SYSTEM_UI_FLAG_HIDE_NAVIGATION is available since API level 16.
So it works since Android 4.1+. You have to remember to reset this flag every time the user makes the NavigationBar show up again.
Only the immersive mode is only available since 4.4

android google maps button on popup

Okay. What I have so far is an Android app with a Google map on which I've placed a bunch of icons that, when clicked on, create a popup with some text on it. Is there any way to place a button on that popup? If this is not possible, is there some way to make a button appear when an icon on Google Maps is selected?
In case you're wondering, the code I'm using now looks like this.
itemizedOverlay.addOverlay(new OverlayItem(point, title, text));
//actually a whole bunch of OverlayItems, each with their own location and text
//but this is the general shape of it.
mapOverlays.add(itemizedOverlay);
Edit:
There are different kinds of popups used with different versions (check yourself in the emulator versions) of the GoogleMaps app. The first popup simple displays the title of the location (Android 2.3.3).
The second popup shows the title and arrow indicator. (Android 4.0.3)
Interesting enough: I noticed that both popups are clickable and start another activity that shows details about the location.
The mapviewballon project https://github.com/jgilfelt/android-mapviewballoons/ allows you to use your own custom layout for these popup.
I did not test with buttons on it but I do not see why I would not work.
The example projects shows the following types of popup balloons.
Here is another project that creates a custom popup balloon. The project can be downloaded at the end of the article.

Buttons darker on Galaxy Android 3.2

I have a Samsung Galaxy Tab, Android version 3.2, that is displaying the default Button control much much darker. Android 3.2 doesn't do this in the emulator, it doesn't do it on a newer ICS tablet, it doesn't do it on any of our phones or in any version of the Android emulator. Has anyone encountered this? We are not doing anything to the button controls display wise. They are completely out of the box controls.
Is there a fix that doesn't require custom coloring all our button controls? We're kind of stuck, because we can't reproduce it anywhere but the tablet it's happening on is our final QA approver, and she's a stickler for this sort of thing (it's an enterprise app we're trying to get going).
Edit: Looks for sure like it's setting a transparency on the buttons that none of the other devices are, rather than using a different color.
Edit: Here is a screen shot. Specifically, the Submit Shipping Selection.

EditText cropping characters while editing

I'm working on an application for Samsung Galaxy 5 with Android 2.2-update1 that has various EditText fields and I noticed that all EditText fields below the middle of the screen is not repainted correctly when the user is typing: all the characters appear chopped, leaving their half top plain white. I've tested this on other devices and this problem does not happen on them.
Any clues on why this happen and/or any workaround for this for the Galaxy 5?
EDIT: This issue happens with the API Demos that comes with the Android SDK. To reproduce this error execute the demo and then follow: App-> Search-> Invoke Search -> click on App Data and start writing, only the lower half of each character will be rendered on screen.
Thanks!

Categories