I'm implementing talkback descriptions in my app, and I want to know if is posible add content description in this button.
I'm searching information, but I don't know how to looking for exactly.
TalkBack should already say "Back Button" whenever you focus on the button you highlighted above.
As for changing the contentDescription to whatever you want, I don't think this is possible especially since not all devices have this button anymore -- See some of the new Pixel devices as an example.
Related
Is there a way to set a progress indicator inside a button (preferably using the native Material Button from Material Components - Android)? There is a video on the website showing exactly what I need, but there's nothing in the documentation about it. Here is a screenshot of the same. Wanted to use it on a login button.
I also though of using a CircularProgressDrawable, which I've used before on a chip (as a chip icon), but in case of a button, I don't think there's a way to centre an icon horizontally on a button (my button width matches parent).
If anyone knows how to do this via either of the two ways, I'd be thankful.
I looked for the question everywhere on the Internet but can't find the answer. What I found is to hide the whole button tray all together.
When the keyboard is down, the button is shown as in the picture.
But when the keyboard is showing the icon changes to -
My problem is to change the button (as in the second image), when my emoticons are showing. So, is there any way by which I can programatically change the button on an event and change it back on another event?
I'm afraid this is not possible yet. Perhaps this will be implemented in later versions of Android.
Not all devices have an onscreen navigation bar, a lot of devices still have hardware buttons.
Nevertheless, you'll might find this article interesting: http://arpitonline.com/blog/2014/07/27/improving-androids-navigationbar/
Hello and thanks for taking the time!
I'm somewhat new to Android, and working on an app that has a basic search field and some search results. Below the search field I'd like to add more options in a sliding down box, in such way that this box would be expanded to be placed above the elements below the search box, as can be seen here:
http://bit.ly/13Ynw5V (click on the menu icon to slide down the box).
What would you say be the most elegant way to implement this sliding box?
It's worth noting, that the sliding effect would be really nice, but it's not the main issue here - I'm more interested in the open/close functionality, and correctly placing the box OVER the results box.
Thanks!
I’ve created a search activity in my app, in the standard Android way, without custom suggestions. When a user starts typing text or presses the search button, they get a search dialog with search box, something like figure 1 from here:
http://developer.android.com/guide/topics/search/search-dialog.html
You’ll notice in the background is the previous activity, the words “abide”, etc.
My problem is that the previous activity is shown clear as day behind the search dialog, and its confusing for users, because users think all that is still active, and they try to press on it, but it just cancels the search dialog. And it distracts the user from the search task (are those search results, they may wonder?).
Question: how to blur (make out of focus) or darken the previous activity?
I actually see this in some app’s search screens.
I found a simple way to blur the background of the search dialog:
Basically it's just adding a (half) transparent view over the ListView (or what is under the dialog) and hide it by default. If the search dialog appears (calling onSearchRequested()) it is set to visible, if it disappears it's set back to gone (invisible).
Check out the details at my blog: http://mavistechchannel.wordpress.com/2011/08/13/blur-background-android-search-dialog/
Assuming you got dialog from a Dialog.Builder, use the following:
dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
I have a button that says "Sort" and when a user normal/short presses the button, I want a menu to appear with the various sort options. Looking around online there doesn't seem to be a straight forward answer to which route is considered best practice. I'm looking to have a menu that looks similar to this:
with icons and text.
For an example, click the Layers button in the Google Maps app. It opens a list of options on a single short click. It has a title at the top and icons for each option. (The icons aren't super crucial)
Should I use a Context Menu? If so, how do I do it without a long press. Should it be a Spinner? If so how do I change the appearance to use a button instead of the normal drop down box.
Spinners are for stateful selection, which sounds like what you want here. The user will select one sort option from a list, and there is a concept of a "current" sort that stays visible to the user.
For something like the activity picker in your screenshot, Falmarri's suggestion of an AlertDialog is reasonable. The difference between choosing a sort and the activity picker is the "stateful selection" distinction. Spinners have a concept of a currently selected item already provided for you, dialogs are more general.
http://developer.android.com/reference/android/app/AlertDialog.html