How to prevent TalkBack from randomly calling out the app's name? - android

I am testing my app with TalkBack and have noticed that at some points in the app for e.g. if I click a dropdown spinner, and select an item, it will call out the item's name (which is expected), but right after that it will call out the app's name as well.
I know this is coming from the android:label for the application in the Manifest, and I have tried removing it, and setting it null; but in that case it just reads out 'Untitled'. I am sure it is coming from there because when I change the label to another string it starts saying that.
Not sure, how to fix this and have not found any solid solutions for this online. Any help would be appreciated!

Related

How do you toggle between Dimens/Strings id vs their actual value?

This question is kind of difficult to put in words, but I want to know how to toggle between the dimens/strings id's vs their actual values. The IDE is IntelliJ. An image should make it a bit more clear what I'm asking:
Upper image is actual values, lower image is with full id displayed. If you click on the 60dp, it will then display the full id. I'm interested in how to then revert it back to the original 60dp. I've spent some time trying to find it online and but couldn't find anything. I know that I could always just do a "go to declaration" on the id and find the actual value in strings.xml, but it would be significantly faster to just read it on the spot. Any other useful IntelliJ/Android tips someone could think of would be welcome too. If you could help me I'd be very happy.
On Windows press Ctrl+> to both expand and collapse when the cursor is within the value/code you want to perform Folding on or just use Ctrl++ or Ctrl+-.
This is called code folding and can also be found under the contextual menu (when you right click on the code) then Folding (See image below)

Android Studio auto complete keeps previous text residue after carret

Wherever your carret on a name that you want to change is
if you call for autocomplete (ctrl + space)
you will get a new full name instead of the only the part after carret(which is needed in this example)
The only possible way to choose another name in a clean way is to place carret at the end of the previous name
but when you want to change a name from the middle of the previous name
you have no choice other than accept the suggested name
and then delete the residue text from the previous name
Comparing previous text with new selected text from autocomplete suggestion box is implemented on many code editors. Is there any specific reason that Android Studio team decided to not to implement this feature? or may be this feature exist but is turned off by default for some reason and if this is the case how could we turn it on?
Just use TAB instead of ENTER to autocomplete changing the old value. It also works for methods.

How to hide saved keyword lists from SearchView?

As you can see below, whenever I am about to enter something to SearchView, it displays a suggested list of keywords. Actually these are the saved keywords I entered long time ago.
On Nexus 4, I see this list. But on Samsung Galaxy series, the list doesn't show up.
How can I make sure that the list doesn't show up?
I read the doc here
http://developer.android.com/reference/android/widget/SearchView.html
but couldn't find a method like setSuggestionEnabled() or so..
Any suggestions? Thanks!
You need to create a SearchRecentSuggestionsProvider, the Android documentation describes how to do it, it is pretty fast to setup:
http://developer.android.com/guide/topics/search/adding-recent-query-suggestions.html
They also describe how to add the possibility to clear the history.
EDIT:
From the documentation:
Prevent the suggestion from being copied into a shortcut at all.
Provide a value of SUGGEST_NEVER_MAKE_SHORTCUT in the SUGGEST_COLUMN_SHORTCUT_ID column. In this case, the suggestion is never copied into a shortcut. This should only be necessary if you absolutely do not want the previously copied suggestion to appear. (Recall that if you provide a normal value for the column, then the suggestion shortcut appears only until the refresh query returns.)
From here: http://developer.android.com/guide/topics/search/adding-custom-suggestions.html#ManagingShortcuts

Android: What to set contentdescription to so talk back doesn't say anything

I have some images that are impossible for visually impaired users to use at all. I want to be consistent in my code so I have content descriptions. Is there a specific string that will make it so Talkback doesn't say anything when the user touches the images.
EDIT: Previous answer was to not add the tag in XML. The correct answer is to add the value "#null". This prevents a string from being spoken (same as an adding the attribute), but #null will also prevent the LINT tool from yelling at you about a missing attribute.

Android: Button representing "get my position!"

I have a EditBox, and on right side of this EditBox I wan't to put a Button representing "Get My Position".
User clicks on this button, and my application get his position and fills EditBox with it.
I found a Compass and added on a ImageButton, but I don't know if this really represent the idea.
Anyone knows a better button to represent "Get My Position"?
Thanks
Your Button looks ok, and will be recognized by most users. If you want to get the System-default (the picture of the Drawalbe may differ on roms from HTC, Samsung Motorola etc) you can get it with
getResources.getDrawable(android.R.drawable.ic_menu_location)
Always check for non-Null here. You can download the standart Android location Button here, (ic_menu_location), as a fallback, if the getDrawable() call fails
I used a 'globe' in my application. If the EditBox is blank until the user requests their location, why not use the put some default text inside it requesting the user to click the button?

Categories

Resources