Emoticon keyboard - android

I'm developing a simple emoticon keyboard on android,
I want to use this keyboard on any application. when the user click on any displayed emoticon it must appear on the screan
My question what is the best way to post emoticons images between two mobiles .. It doesn't make sense to send them as image. I tried to send them as font .. but the problem was that it is only appeared in black color ,,, so, what is the solution?

Consider two phones:
A & B
Install the images for these emoticons in the phones and each image would have an id. When the user at phone A presses the key for say ":-)" .. pass the id that refers to that particular emoticon to phone B and use it to refer to the exact emoticon. Hope it helped

Related

Android - Custom EditText for Odometer Entry

I'm building am app that will allow Odometer entry. I would like to use the image shown below as the background on an EditText. Doing that is no problem, however I can not seem to get the digits entered into the text view to line up in the spaces of the image. I've tried adjusted the text size, font face, etc.
Here is the image I would like to use...
Does anyone have any suggestions on how I can accomplish this? So that when the user entered digits into the EditText, each digit goes into the correct "slot"?
thank you!!!
You can use android:letterSpacing? (only applies api 21 and over)
Set up 6 separate EditTexts on top of that image each with dimensions of the square they need to go into. Then set up event handlers so that it appears to be one fluid motion across EditTexts when the user enters data. Not very elegant but it'll work.

Dial pad to get phone number (with Android button images)

I want to get user input phone number, and my requirement is "on every button press my application analyze the input if length increased 10 digits than i want to enable 'Next' button".
I am planning to do it with a custom dialing pad that should look like android built-in dialing pad (image attached)...
can i use standard android dialing pad to achieve my requirement or should i develop my own dialing pad?
There is no "standard android dialing pad". Every phone ships their own dialer, which may or may not be the one google wrote. There is no dialing pad widget. You can ask for a numeric keyboard and force the keyboard to show, but it may have any format, and may not just be those 9 keys. If you want this, you're going to have to write it from scratch (or find a pre-existing library).
You can use KeyboardView. Design your own key layout in xml and put it anywhere on your layout. You can do whatever you want with it, like handle keypresses and change the key labels on run-time. Also, you need change input type of the editable field to something that won't trigger the OS (IME) keyboard, or else you will end up with both your custom keyboard as a view and the regular one.
String myBox =EditText.getText().toString();
if(myBox.length()<=9)
{
EditText.setOnEditorActionListener();
}
This may help you.

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