How to access clipboard's 'image content' - android

In Android samsung s5 device, when I long click on edittext, 'Clipboard' option is available to paste content(image+text) from clipboard. I want that my user can paste image from clipboard.But when I click on clipboard, all clipboard's images are strike off(not accessible) while text is accessible.Device's default application can access these images. I do not know whether I need to add properties in editText like inputType or I am missing out something else.
For more information, please look at the image.
It would be really helpful. Thanks in advance.
enter image description here

Related

How to make , Copy text and tap on floating icon to translate like google translate?

I want to make an option like google translate have, when a user copies a text from anywhere in the mobile, a floating button comes for 5 seconds. When the user clicks on that floating button, the copied text is translated into a small window.
Like this
So my question is, how to make above floating button when user copy text from anywhere in mobile?
Please help me to make that...
It is possible by clipboard manager of android but tell me all process please...

calabash-android: click on image by name

Is that possible to click on image to open the dialog box. because I want to open dialog box by clicking on image which has only name, there is no other property associated with that image.
To get this issue I tried with x,y co-ordinate method as well, but again the issue is when I changed the phones the screen size matters. so I did not able to use that too. other than this I did not get any other option to resolve the issue. I do not get much about this on web.
Does anybody know the solution, that will be helpful?
Kind Regards,
Vaibhav
I'm not really sure what you mean by 'has only name', but if there is no other way to locate the image view, you could use the index.
To find the index,
query "* ImageView" and see which one matches.
Then you can interact with it like so:
tap "ImageView index:0" #or whatever index
Note: If it was actually ID'd somehow (e.g. had a ContentDescription), you could do
tap "ImageView marked:'<whatever ID>'"

What's the best way to highlight a telephone number in an Android App?

[Question about android style]
I was wondering what is a good way to make clear that you can click on a telephone number and immediately call someone without copying & pasting the phone number.
How can I persuade a user to click on a phone number ?
ps: my question is not about how to call someone when clicking on a phone number, but about how to style the phone number to show that it is clickable.
Maybe putting small phone icon beside number would be clear for user.
Usually when the number is underlined like a HTML link, they understand right away.
TextView numberText = (TextView) findViewById(R.id.event_number);
numberText.setText("123-456-7890");
Linkify.addLinks(numberText, Linkify.PHONE_NUMBERS);
Checked the official documentation but there is no such standard defined for the same. So it is now upto you.
Underlining the number is fine but does not go well with text blocks.
Using a different font color for the number will suit well. Using Blue is the trend;-)
But in the end it is about the design and color scheme of your app too. Seeing a number in different text color is enough a indicator that you can use it as a link

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?

Keylabel and keyOutputText issue

Ok I have noticed in the android softkeyboard when the user wants to send a smiley when the user prompts to a insert smiley a list of andriod smileys appear for the user to choose from Ive noticed that beside the smiley is a :) ( it varies depending on mood of smiley) Im thinking the code for that would read
<Key
android:keylabel:=":)"
android:keyOutputText="#drawable/image...." />
Im believing ( correct me if im wrong) if the uses manually types in a :) the drawable image will still appear?? Am I correct or No... Secondly If I add my own emoticons and instead of using the :) I use "*" as the Keylabel and my own image as the drawable outputtext would the user be able to use my emoticon?
Lastly, what if I only want for them to be able to select one of my emoticons to use without seeing the "*"..can I just use the android:KeyoutputText to produce the image or is the android:keylabel acting as a sort of prompt??
First, keyOutputText cannot refer to a drawable. It has to be text, a string.
Your emoticon will not appear in the text box (SMS box, or wherever you are typing) unless it is one of the built in smileys for that app. Otherwise, they'll only see something like this: "=)". To test it, try sending ":-)" in SMS (depending on your SMS app it may or may not show up as an icon) and in a Google search box. I guarantee you that you won't see an icon in the search box.
Note: you'll probably want to have defined android:keyIcon for your keys so they show the icon of the smiley rather than the output text (i.e. "=)", see android:keyOutputText).
To answer your question, if the user manually types in ":)" this is identical to the user pressing a key that has android:keyOutputText=":)".
For the second question, your "emoticon" will actually just end up being a key that sends multiple characters in a row. It saves people from having to type ':','-',')'. Instead they just hit one key and the three characters for their smiley appear.
For the last question, keyOutputText can't produce an image. Only the app that is displaying the text can convert the text to an image. In short, the keyboard is meant for sending and editing text, not icons and images.
Send me an email if you have any more questions: I've been writing a soft keyboard for Android for almost half a year now so I'm pretty familiar with how touch input works.

Categories

Resources