Buttons not showing in the Copy / Paste action bar associated with the TextView in the dialog
Unfortunately, I can only check on my Samsung N7000 Note phone running Android 4.1.2, as this is my only device. My application creates a dialog built like this:
AlertDialog.Builder alert = new AlertDialog.Builder(this);
// Set an TextView view to get user input
final TextView input = new TextView(this);
input.setTextIsSelectable(true);
input.setText(sb.toString());
alert.setView(input);
alert.setTitle("Title");
alert.setPositiveButton(getString(R.string.ok),
new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int whichButton)
{
// do something here
}
});
alert.show();
This will bring up the dialogue as expected. However, as shown here, when I try to select the text shown in the TextView, the copy / paste action pane is displayed, but there are no buttons to copy, select all, etc. that appear in the action pane. I note that I can touch the top right, see the button briefly, and then see the message copied to the clipboard. Then I can go to another location and insert the data. So the functionality is there, it just isn't displayed to the user.
Can anyone shed some light on what I am doing wrong here?
thank
source to share
Do you use ActionbarSherlock
casually? This seems to be a design bug, the workaround for which is to manually set the topic again, preferably in a method onCreateDialog
.
See: Invisible ActionMode Element Icons
source to share