As I see, a way to show default emojis on android is by using the following on an input text.
android:inputType="textMultiLine|textShortMessage"
When I search, I can't find a way to do this through Java. What I want to make happen is that when the soft keyboard is open, have the user tab a button to switch between emoji view and normal keyboard view.
Custom Emoji Keyboard.
I've already implemented this, but it would be much better to and lighter to use Emojis already on the device for post kik-kat.
Google does switch between this views.
On Google Allo, pressing the emoji icon inside the editText switch views.
TextView
Using TextView's input type does not contain what you want...
Keyboards
Seems you can show the user a list of available keyboards. (the ones that are available on that device)
And with that, see if it has an Emoji Key Board available. But needs at least Android 4.1 it seems.
Force Part of Key Board
Not possible as far as I can see. You can disable them, it seems.
*I would love to show how to do this, it looks like a neat thing to be able to do. But my google-fu does not show anything close :(
After trying for a while I didn't achieved this goal even injecting a keyevent.
Looking in Google Allo, that looks as a custom implementation. I have switftkey themed keyboard and on KitKat Moto G (1st gen) it's very remarkeable. I tested also on a Marshmallow Moto G (2nd gen) with native keyboard, but contracted, and you can see that isn't the real soft keyboard :
I think there is no way to achieve this without a custom emoji's implementation.
Maybe this will help you:
https://blog.swiftkey.com/tech-blog-android-input-method-subtypes/
There is something like an Emoji Subtype as you can see following the link below.
public static RichInputMethodSubtype getEmojiSubtype()
https://android.googlesource.com/platform/packages/inputmethods/LatinIME/+/master/java/src/com/android/inputmethod/latin/RichInputMethodSubtype.java
Related
I'm trying to create an app using Android Studio, and I want to use some type of expandable box, where I'll have an indefinite number shown like in a stack, and when clicking on the left side icon, the selected box opens up to show more info.
The basic idea of what I'm searching for:
Would anyone know about something like that??
Thanks in advance.
If I understand it well, what you're looking for is a recyclerview (for the indefinite number of row) and an accordion widget to open close your content.
I will suggest your to look at these projects:
https://github.com/hgDendi/ExpandableRecyclerView
https://android.jlelse.eu/get-expandable-recyclerview-in-a-simple-way-8946046b4573
which present all requirements you need.
And here is an similar question/answer : https://stackoverflow.com/a/10313432/6809926
The google search I made : android accordion recyclerview example.
Hi I am currently developing a game for android on unity. (2d game)
I've been looking for answers everywhere since a week but still no answer ... So I decided to ask here.
Actually my problem might be very simple but I am new to Android development and I had no idea of how it was walking.
1 - I want the input field right at the top of the keyboard to be hidden, to put a custom input field made with unity UI system.
2 - Adjust keyboard's position (Only for like 50px from the bottom of the screen) so that i can put my stuffs in there.
I get that keyboard appears automatically when an InputField is focused or selected. But it dosen't make disappear the input field from the native keyboard.
From what I learned serching , I get wether I need to make plugin for unity or export my unity project to eclipse to do so.
But unfortunetly I have no base on java or xml.
I should really learn at least basic skills on these stuffs but for now I can't afford to spend time to learn from base.
What would be the most easy way ?
Hope someone can help me out.
Thank you !
Maybe you can change the input field to just text,
And when you click on the text, show your own keyboard ui.
This is an alternative solution I think.
I accidentally saw application that shows keyboard like this:
If I set EditText inputType to number or phone, I get a different keyboard(with 4 buttons more).
So, how to show such keyboard?
If you don't like the soft keyboards provided by the system your app is running on you can always create a input method yourself.
There is a nice tutorial
If you just want to play around have a look at: InputType
I found an answer myself:
android:inputType="numberPassword"
There is currently a bug in JavaFX (https://javafx-jira.kenai.com/browse/RT-30669, free registration required) which makes it so that if you are using an azerty keyboard layout and specify an accelerator with Z in it, on Mac it only fires when typing a W. I need to work around this bug as I need to release my product now.
So I'd like to detect Mac+Azerty and if so change the accelerator to using W. I know how to detect Mac, and I know how to detect the keyboard's locale (using InputContext#getLocale()) but how do I know if the current locale has an azerty keyboard layout? Do I have to check against a hardcoded list of known locales which use an azerty layout? If so, where would I find such a list?
Just don't "check against a hardcoded list of known locales" as many people may have a french locale with a keyboard that does not matches the locale, if they bought their computer in the US and use it in quebec with a french interface. I am personally worst, as I'm having a dvorak layout... ;-) And I just want to imagine how many variants of spanish-based layout there may be available...
My best and more portable advice would be to not try to detect something that is hardly detectable, but give some "default" keyboard mappings for (e.g.) qwerty keyboards that would work for most of your userbase, and create a configuration panel that enables your user to change the key mapping for your application by typing the new keys, if they don't like the defaults.
edit:
ah... that can be indeed a different problem... maybe you could anyway make a combobox preference for all non-us keyboard on macosx that has keys with a modifier that get changed?
To answer your question more "straightforwardly", here are a few results I found on google:
http://www.coderanch.com/t/412482/java/java/Finding-language-setting-locale-keyboard
http://www.java-gaming.org/index.php/topic,23501.
both lead towards java.awt.im.InputContext:
InputContext context = InputContext.getInstance();
System.out.println(context.getLocale().toString());
I never tried this in java, so I can't help you more than with my google-fu, but I really hope this helps :-)
What is the purpose of onSearchRequested()? I am referring to here: http://developer.android.com/reference/android/app/Activity.html#onSearchRequested%28%29
The following is stated: "You can override this function to force global search, e.g. in response to a dedicated search key, or to block search entirely (by simply returning false)." Specifically, what does the bolded piece mean? Does it not mean that we are able to disable this button? I just had a heated discussion at: Android - How to disable Search button, how to implement onSearchRequested()?
As you can see, Phil is suggesting that I have to go the other route. My questions are: can JUST this function be used to disable the search button completely? Can just this function be used without having to disable this button from the dialog builder? What did google meant with the above quoted statement? Thank you for your time.
You should be able to disable the search button using it, i would think google mean that you can block someone trying to search from within your app( IE skipping a progress dialog)
but since most android phones don't come with search buttons anymore, its not a very used function.
and yes you should be able to disable it on the fly without going through the dialog builder.
Swift