Position of InputMethodService (Keyboard) - Java for Android App Development

Hello, I am developping a custom soft keyboard following this samsung tutorial.
http://developer.samsung.com/android/technical-docs/Implementing-a-custom-input-method
The default position of the keyboard is at the bottom of the screen (see bottom.png)
I want to allow the user to set the position of the keyboard.
Since the user can use his finger to draw letters, it would be more ergonomic (on a tablet) to put the keyboard to the left side of the screen. (see left.png)
I've made a little research and I don't find anything that could help me.
On android developper, they say this:
In the implementation provided here, all of these elements are placed together in a single window managed by the InputMethodService. It will execute callbacks as it needs information about them, and provides APIs for programmatic control over them. They layout of these elements is explicitly defined:
- The soft input view, if available, is placed at the bottom of the screen.
Click to expand...
Click to collapse
Does that mean I can't do it?

Related

Fake SIP

FakeSIP
This SIP is placeholder, so you don't see keyboard toggle if you select it as current input method.
This is useful if you use keys, but keyboard autoshow irritate you.
Install cab and select "Fake SIP" in menu.
When you need to use real keyboard, you can switch it, of course.
thanks m8.
Search xda-developers for "NullKB". Someone beat you to it by a few years.
On another note, I find NullKB to be indispensable in combination with PQzII. So when I slide out the keyboard the device switches to NullKB and prevents the soft kb from popping up. And when I slide back to portrait mode the SIP changes back to the soft KB.
I don't see PQzII talked about much anymore. It's hard to describe all its functionality, but in general it handle all sorts of keybinding and event-based behaviours.
fluxist
Hey, guys!
I've tried to use NullKb, but got no stability in daily usage. Sometimes i can't select it - whatever i want to select, the build-in keyboard is choosen. I've thought that it NullKb's fault and I've made my own implementation [ didn't saw your Fake SIP, GreateVK, sorry ]
But even with it, sometimes I can't open the SIP which I want to use. Does anybody encountered sucha problems? And what the technical "background" of it?
Another trouble is that I can't set height of SIP to zero - it have the same height as every other SIP in system. I've even excluded SIP_DOCKED flag from IMINFO.fdwFlags, but it was a useless step. What is the right way to setup height of SIP control?
My little SIP stub [source code + binary] is attached

looking for people who are intrested in working on a keyboard project!

alright. so i have noticed that there are many different keyboard styles, features, and fuctionalities.
but there is one huge thing missing. and it took me until right now to figure out what it was.
we are missing personalization and versatility.
i am on a mission to create the best onscreen keyboard that xda has ever seen.
obviously i cannot do this alone.
i am great at graphics and anamations but programming isnt exactly my strong point. so ifanyone and i mean anyone is intrested in this project, definitly post here..and also a pm. to me would be greatly appreciated.
i have high hopes for this project and i hope everyone else does too.
you can also post here if there are options/features that you look for in an on screen keyboard.
or you can just wish us luck!
thanks everyone =)
What I would like to see:
A combination between the finger-usable PCM Keyboard,
and the gestures of the WM5-keyboard
Something like TouchPal from CooTek but taking up a little less screen realestate would be amazing.Wish i could help with the coding, but I've only taken one class of c++ and I know I wouldn't be any help. Good luck with this project, sounds really cool.
I think a 1/2 screen finger-friendly qwerty is ideal. One that has basic punctuation keys (Period, comma, exclamation, question) on the primary input screen.
Unfortunately, I don't have skills/time to work on initial development, but very willing to test as I am in search of the best on screen keyboard and I can provide experienced and thorough feedback.
PPC6800- Titan
WM6 2.17.651
Radio 1.47.01
I suggest the main keyboard window to be one or two lines with option and buttons which show the main keyboard layouts with tap and hold to navigate to the desired letter. So the layout window that can be semi transparent to allow see what you write not need to be all the time on screen and covers a big part of her. Hope you understand what I mean cause my english are not so good.
brilliant idea
text assigneable keys, as in assigning '[email protected]' so it can be called at any time, and other assignable texts. I like the touchpal keyboard, but it does take up too much space and there is a lot going on. Resco just updated their's and I am not sure I like the new one, it is very much like the pocketcm keyboard, so why pay $19 for resco's??? I can't program, but will help in usability testing, so count me in if you think I can help the project. Good luck.
It's clear that there will be as many different visions of a "perfect keyboard" as there are people posting here. What is worst, there'll be many conflicting ones: "can the keys be bigger?", "the keys should be smaller", "i need one more page with numbers only", "who the hell needs a page with numbers only, it's a waste of memory", etc...
So i'd say that what a program with such ambitions would need the most is full customizability. Here's a roundup of features i'd like to see:
-key layout customizable trough an xml file.
-multiple pages switched by button actions (tap, hold, gesture) so we can have one default page, one with numbers, one with national symbols, etc.
-gestures, but not only right/left/up/down, like in default keyboard, but also diagonal, and ability to use a key from a different page upon a gesture, eg. when you press a letter and drag in bottom right direction, you'll get a lowercase national (like accented one) character, if you drag in top-right direction, you'll get an uppercase one.
-dynamic key binding: you copy a text to the clipboard, and with a certain key combination (set in the config file) you can bind it to some unoccupied space left for that purpose (you could use it for single letters/symbols, e-mail addresses, or even a bit longer texts - say up to 256 characters).
-did i mention customizability?
I guess that these features would be a good starting point and more functions could be added on the way.
So in short, my vision of the perfect keyboard would be actually just a framework, a tool, enabling the users to experiment with different layouts and functions and create their own perfect keyboard. And the XML config file plus additional graphics would be the keyboard itself. It would be for text input what BatteryStatus is for Today screen plugins.
Example config could look a bit like this:
Code:
<Keyboard name="example">
<Page name="Default" background="image.png" height="200">
<Row>
<Key name="A" image="key_normal.png" image_pressed="key_pressed.png" caption="A">
<Press action="typeText" argument="a"
<DragR action="specialKey" argument="Space" />
<DragBR action="overrideCaption" argument="ą" action="typeText" argument="ą" />
(...)
</Key>
(...)
</Row>
(...)
</Page>
(...)
</Keyboard>
Available key gestures could be tap, hold, double tap, drag - sideways, up and down, diagonally. Actions could be something like type text, override caption (replaces default key caption until the key released, so that you can see what you're typing), permanently change page to a defined one, change page to a different one for one keypress (like the shift does i the default keyboard), cycle pages, etc. Each key could trigger multiple actions - so it could type some text, and then change page to a different one (example - you have a page with large assignable buttons, so you can bing something like an e-mail address there. When you press that key and the address is typed, the keyboard will return to its default page).
Anyway, that's just my 2 cents. Good luck with the project, whatever direction it goes in.

Very compact PocketCM skin (3 rows): miniPhone v0.1 (screenshots added)

One problem that I have with most keyboard skins is that it becomes too tall and I find myself typing blindly because the keyboard covers the area that I am typing. SPB Fullscreen keyboard gets around but is buggy and not a "true" SIP keyboard (if you have used this you will know what I mean. The only way around this is to create a not so tall skin. Default WM6 kb is not so tall but is not finger friendly.
Thus I have modified a skin for PocketCM that I thought I would share. The original skin is based on a skin called 2manyiClone, which I believe is from 2manyphones, so many thanks goes to him.
The main features are:
1. Only 3 rows high, but the buttons are still finger friendly (most skins are 4 rows).
2. Most letters, symbols and numbers needed can be accessed through the main layout screen(I hate switching layout screen for one symbol or number and having to change back).
3. What is sacrificed to make this happen: space, return, and backspace are only 1 box wide. No shift button.
4. In place of shift, all capital letters can be accessed by holding down a letter until the "symbol pad" for that letter pops up revealing its capital letter. If you really need the shift key (ie capitalizing whole words) you can find it in the "symbol pad" of the space key (hold space key down).
5. All digits can be accessed on the main page by holding down the letters of the top row (qwertyuiop) for 0-9 revealing its symbol pad. All of the letters in the top row have the corresponding digits in their top right corner to show its digit function.
6. Symbols and punctuations can be accessed either through the default symbol pad of the .!123 key (hold it down) or the "m" key (which has a (') character to designate it is also a symbol key.
7. .com can be accessed through the "c" symbol pad and www. can be accessed through the "w" symbol pad (hold down the respective letter).
If someone finds a use for this, then great. If not, then sorry to waste your time.
Just download and unzip into your PocketCM keyboard folder. It should have two files miniPhone.layout and miniPhone.skin. Under PocketCm options, it is important to select both the miniPhone layout and the miniPhone skin for it to work right.
I am also taking suggestions for improvement. If it suits me I will make the change and post revisions. If it doesn't suit my purpose, then i will just show you how to change it yourself.
Here is also an alternate layout by jomo25:
http://forum.xda-developers.com/showpost.php?p=2105928&postcount=14
Here are my screenshots:
Nice job
This is a nice adaptation of my iClone keyboard. The small numbers on the top row of keys is a nice idea. I'm sure some people will like this smaller footprint. You may want to take a look at the layout file in my "Best of" version (link in my signture). Considering the numbers can be accessed from "qwerty...." keys, I think you could add more symbols or shortcuts to the .!# key. Also the symbol pad goes to 4 lines. You may want to try having two 3 line symbol pads to keep the same foot print, but still allow for access to many symbols.
It is nice to see people taking my (and others) ideas and coming up with their own style.
Keep it up!
works great on my HTC Touch, thanks!
Nice screenshoot...I'll try...Thanks....
Spanish layout
Hi,
How can I add accented vowels support?
I mean á, é, ...
Thanks
longj49 said:
works great on my HTC Touch, thanks!
Click to expand...
Click to collapse
wait...it's not suppose to look like that. It's suppose to have only 3 rows not 4. Are you sure you selected miniPhone under skin and layout? I think you forgot to select miniPhone layout.
2manyphones said:
This is a nice adaptation of my iClone keyboard. The small numbers on the top row of keys is a nice idea. I'm sure some people will like this smaller footprint. You may want to take a look at the layout file in my "Best of" version (link in my signture). Considering the numbers can be accessed from "qwerty...." keys, I think you could add more symbols or shortcuts to the .!# key. Also the symbol pad goes to 4 lines. You may want to try having two 3 line symbol pads to keep the same foot print, but still allow for access to many symbols.
It is nice to see people taking my (and others) ideas and coming up with their own style.
Keep it up!
Click to expand...
Click to collapse
So i see my thanks needs to go to you for the skin. It is the most "authenetic" *phone skin out there.
Funny that I never looked at that thread before when I came up with my ideas, especially having caps for each letter symbol pad. I am quite surprise more layouts don't have this. i guess great minds think alike..lol. I got the idead for that from using default wm6 kb with gestures in which if you upward gesture any letter you get its cap.
Again, thanks a bunch.
Aslo, perhaps you can link this thread to your original thread?
I am considering adding punctuations and symbols onto the qwertyuiop keys, with each letter getting a symbol on the upper left hand corner to go with the digits on the right hand corner. The problem with this design is that things may start to look cluttered.
What do you guys think?
screenshots added to first post!
very nice work! works great on my cruise but there's a small bug. sometimes when i press space, it would go to the symbols pad itself. weird but it's not a big deal. also, all the buttons seem overlapped on landscape mode. visible especially on the top row and the space, return, symbols and backspace buttons. thanks for the great skin!
raggastani said:
very nice work! works great on my cruise but there's a small bug. sometimes when i press space, it would go to the symbols pad itself. weird but it's not a big deal. also, all the buttons seem overlapped on landscape mode. visible especially on the top row and the space, return, symbols and backspace buttons. thanks for the great skin!
Click to expand...
Click to collapse
Sorry but I designed this for use on Portrait only, never really use Landscape myself.
On the spacebar bug, which symbols pad are you referring too? Spacebar has its own "symbols pad" which include the Shift key, period and comma, as well as the space bar.
SuperFly, this is awesome...You inspired me to use this one which takes up much less space...I've modded yours to this:
Code:
keyboard_layout_1=qwertyuiop\nasdfghjkl\N\n\Mzxc vbnm\2
keyboard_layout_2=QWERTYUIOP\nASDFGHJKL\N\n\MZXC VBNM\1
keyboard_layout_3=&@[1\]$*789+?\n.':/!456-\B\n\M[1http://www.]()0123=\N
symbol_pad=\M,0123456789
symbol_pad=z,-Z?!_&@$"'
symbol_pad=w,W2[3http://www.][2.com][2.net]
symbol_pad= ,[2LoginID2][3LoginID1][2Password1][3Password2]
symbol_pad=),[2;)][2:)][2:p][2:D][2:*]
symbol_pad=(,[2:S][2:(][2:|][2:o][2:/]
symbol_pad=/,[1\]
symbol_pad=-,_
symbol_pad=:,;
symbol_pad=http://www.,[2.com][2.net][3https://www.]
symbol_pad=a,A
symbol_pad=b,B
symbol_pad=c,C
symbol_pad=d,D
symbol_pad=e,E3
symbol_pad=f,F
symbol_pad=g,G
symbol_pad=h,H
symbol_pad=i,8I
symbol_pad=j,J
symbol_pad=k,K
symbol_pad=l,L
symbol_pad=m,\E\T\H\F\DM
symbol_pad=n,N
symbol_pad=o,9O
symbol_pad=p,0P
symbol_pad=q,Q1
symbol_pad=r,R4
symbol_pad=s,S
symbol_pad=t,5T
symbol_pad=u,7U
symbol_pad=v,V
symbol_pad=x,X
symbol_pad=y,6Y
This way it's always 3 rows, and has access to lots of symbols, smileys, and ID/PWs as I like to set mine up...Hope this is useful to some others!
Great idea, SFSC!
jomo25,
glad I inspired you. maybe you can post a zip of your layout so we can try it out without going through a text editor.
superflysocal said:
jomo25,
glad I inspired you. maybe you can post a zip of your layout so we can try it out without going through a text editor.
Click to expand...
Click to collapse
Attached. The skin file is unchanged. The layout file is as in last post.
If you want to customize it of course, you should use a text editor to use your IDs and/or PWs...
Thanks!
Additional shots
Anyone working on a portrait VGA version of this?

Autocompletion/Autocorrection solved

For those of you frustrated with the autocorrect/autocompletion method of the Touch HD (who want the old Windows style back) here is the solution. It lets you still use the Diamond Keyboard and real autocorrection/autocompletion like the good old days. It was written for the Fuze but they have the same keyboard and software issues.
The complete solution with hyperlinks is located here: http://www.fuzemobility.com/?p=1527
Here is the text (the hyperlinks and photos were lost):
Many of you have seen my rants about the lack of traditional autocorrect and autocomplete on the Touch Pro (see here where I did it in a posting on editing the T9 dictionary, or here where I did it in our forums, and here where I did it at XDA (I’m BugsyKoosh)). Why was I so angry? For anyone who used an older Windows Mobile phone knows, the old method of autocompletion was far better than what the Fuze has. First off, when entering a contact the old method provided for a longer list of names that you can click on (whereas the Fuze guesses the single closest one and almost forces you into it). Then when actually typing words the Fuze gives you a few words but I always found it very finicky and ultimately turned it off because the space bar caused the word to complete and the spacing was off. Also, the Fuze wasn’t good at correcting mispelled words. It gave you a dictionary that would complete the words but if you spelled it wrong (because you didn’t use autocompletion and just kept typing) that meant you had a typo. The old style was a list of words as you typed in a drop down (you choose starting from 3 words) and it was both autocomplete and autocorrection so anytime I spelled the word ’spelled’ as ’spellde’ it will change it for me and it works a lot smoother. Also, the old style permits for word replacement using autocorrect so when I type the letters "pcm’ in the old style I edited it so it was replaced with ‘please call me if you have any questions’ and ‘tx’ was replaced with ‘thanks’. In fact I wrote a posting here on TiltMobility describing methods of changing the autocorrect files thinking I would port it over here just to get burned realizing that the Fuze simply wouldn’t do it…until now.
[Warning, this is a little long and filled with detail but I think the payoff is gigantic so please bear with me]
For definitional purposes, autocorrection is the ability to change a typo whereas autocompletion is guessing what I’m typing before or while I type. I cannot change the autocompletion dictionary at this time (the one that guesses as you type). This does propagate itself over time and it will get to know you. It also cannot be transferred from older devices. See this article for more information on why it is so hard but until DictMgr is updated we may be SOL (TVDinner was told by the author that an upgrade is in the works so lets all cross our fingers).
So the first step is to disable T9 (this is the method of autocompletion/correction I hate). The cab is posted here in our forums (I was provided this cab from a member at another forum). Don’t worry because you can uninstall this application and revert back (it’s a simply a single registry change actually). Once installed restart your phone for it to take effect. Then, go to Settings - Input and make sure all of the options for Word Completion are checked (you can change the number of words it suggests - I use three). OK now there’s one little glitch. My problem from the start was that the autocomplete method I like did not work with the Full QWERTY Keyboard (you know, the shiny onscreen keyboard that our Fuze comes installed with and is in the photo). It seemed like it would work and then stop and ultimately I was thinking I would be forced to install another keyboard (more on that later). After messing around with the keyboard I realized that I can get the Full QWERTY Keyboard to work with the old method. You have to make sure that the ABC-T9 toggle is set to T9 (look at the photo and you’ll see T9 is selected even though we disabled T9 entry). If you try to toggle it and it will not let you then try this: press the ABC-T9 button and try to toggle it, then hit the .,123 button and try that a few times until it flips over (if that doesn’t work do the same thing after going into portrait mode and toggle T9 and ABC). Have patience - it will toggle and once it does it stays that way. Now here’s the one flaw - the autocompletion with this keyboard only appears when there’s an odd number of letters (ex on the first, third, fifth) [note: autocorrection happens after you misspell a word so it works with this and any of the other keyboards]. Again, we can correct this with a different keyboard but we’ll get to that. What you’ll notice is that completion of contacts and words is instantly different and I think a lot better. Also, the library will build over time as it knows you and aside from correcting the words you type wrong it will get to know you and start to guess the next word before you even type it (it may even guess a few words at a time and by the time you make it to ‘tha’ it will give you an autocompletion option of ‘thank you very much’).
If you do not use the onscreen keyboard because you’re a physical keyboard kinda person then you’re in luck. Simply set the onscreen keyboard to the keyboard named ‘keyboard’ (it’s the crappy Windows default one) and you’re set. That one works like a charm with no nuances (but is miserable as an onscreen keyboard).
Before I let you all go on your editing ways, lets talk about one solution that gets rid of the nuance of only getting autocompletion on odd numbers (so it works on each letter you type) and that is by using a different onscreen keyboard (sorry, but I believe PocketCM uses T9 so it won’t work). If you use the onscreen keyboard and want to get past this nuisance then simply install freeware Happy Tapping Keyboard. In the attached photo I changed the skin to the iPhone skin (it is in that link provided - use the VGA skin). If you set Happy Tapping as your default keyboard it will not survive a soft reset even if you set it as the default input method. To do this install the Default IM cab and set it as the default keyboard (Settings - Input) and set it as the default keyboard in Default IM and it will stay with you. Happy Tapping is a great keyboard but personally I like the layout of the Full QWERTY Keyboard better, especially the shadowing of the buttons so you know its second function. And I learned that Happy Tapping is missing a ‘\’ key which was a burn when I was using Total Commander but I bet for the rest of you it’s meaningless. I will confess I used Happy Tapping for all of my 8525 and Tilt years and it is really very good.
So, in either event, lets change the dictionary so that typos are corrected (or in my case quick text can be created). You don’t need to do this but it’s a nice perk of using this method. There are two ways to do this - the application method and the Total Commander method. The first one is highly recommended for those of you who want simplicity. Simply install freeware DictMgr and go to the "word correction’ tab and you can begin to add words. The downside is that I only see the first few series of words (I don’t even get out of the A letters) but this doesn’t impact adding new words regardless of their first letter. If you use this method it make sense to use freeware MyMobiler so you can use your PC’s keyboard for ease. For those of you that want to see your entire dictionary and don’t mind a little Total Commander action then all you need to do is navigate to Windows and find a file named autocorrect.04…. You can open this in Total Commander (hit the pen/paper at the bottom) or move this file to your computer, edit it there and then move it back to your Fuze (change the settings to take it out of hidden/system). In either case, if you’re willing to use Total Commander there’s another benefit if you’re a former Windows Mobile user since you can get the file from your old phone and move it to your Fuze (I moved mine from my Tilt) but you can do both (move the old file using Total Commander and then edit it using DictMgr). For a step by step set of instructions on using Total Commander to modify the autocorrect file read the article I wrote here on TiltMobilty. In either case you MUST reset your phone for the changes to take effect (the file is read into ROM at startup). Be careful with autocorrection words (obviously you can change it later) but if you change ‘tx’ to ‘thanks’ that means in a text message you cannot use tx (it will correct itself to thanks) so think of variables like ‘thx’ changes to ‘thanks’ for emailing and ‘tx’ stays uncorrected for texting.
This will work for all versions of the Touch Pro, the Diamond and presumably the Touch HD as they all use the same keyboard configuration.
Wow, I feel like we’ve done a lot. I’m drained but relieved that my single biggest complaint is gone. A special thanks is owed to SCDavis who was the first person to try my disableT9 cab even though I warned him of a possible hard reset since I wasn’t sure what it would do and if it was uninstallable and of course to TVDinner who was with me for the autocorrection ride both in our forums and on XDA’s and brought DictMgr to my attention.
Thanks for the write-up. I must admit I tried the word completion for the full QWERTY keyboard and spotted a few bugs so I haven't used it since. Last night I decided to try the phone keypad as an alternative to the full QWERTY so I'm back in the world of T9 and word completion. If I have too many problems with it then I'll try your solution.
T9 is very very painful in my experience. The correction is poor and you don't have control over it and there's no autocorrect (spellcheck). I'm a fan of the old style a lot more... hope it helps - good luck
what is your post for? is there ia cab or file to autocorrect/autocompletion?
thank you.
Here's the cab and the quick version of what is needed. This all works tog et you back to the old style of autocorrection and autocomplete that Windows has and is much better than T9:
1) Disable T9 by cab and soft reset
2) either use the Windows keyboard (which is poor for onscreen use) or Happy Tapping (which requires the Default IM cab to be your default input) OR to use the Full QWERTY Keypad (the preset default keyboard) you need to toggle T9 to on (even though T9 was disabled) and to do this toggle it, hit the 123/abc button a few times until it sticks and you’ll get the old style completion/correction with that keyboard
3) to change the autocorrect dictionary find the autocorrect file in your Windows directory and change it using Total Commander (or other registry editor even though this is not in your registry) or DictMgr
it's interesting. But it seems that T9 use another dictionary that you can choose. Once T9 is disabled, the autocomplete dictionary is back to english, and I don't find the way to change it
any idea to do this ?
Sorry for OT, but I found touchpal to be much better.
It is commercial though, and does not support landscape properly as of version 3.5.

[Req/Idea/App/FingerKeyb Solution] Dpad rediculous problem

Ok, i was looking for a simple and function dpad application to install on my diamond 2.
i already looked in the blackstone thread for a solution, but it seems like only virtual d-pad is an option at the moment, which i find kinda lame because it uses gsensor. after searching all over the place for a solution, i figured out that someone had a pretty good idea adding a new skin on finger keyboard with only the last row of the keys, but it didn't work for version 2.1 so ...
i tried to create a new skin for finger keyboard 2.1, i added only the last row, and it kinda worked, the problem is that it is not functional, since i need to change the language button to get to that skin. the other problem is that finger keyboard has a global parameter to all skins for the height of its panel. (335 i think). i changed that to something smaller, it worked for the dpad skin but it [email protected] up the rest of the skins (english, greek, etc), so i have given up with that for a lot of other reasons too.
after that i tried to create a custom application using vb.net in order to create a dpad app, but that failed too because compact framework sucks when it comes to things like that.
what i suggest is this as a perfect dpad solution (at least for me). the guy who created finger keyboard (sorry for not knowing u ) can create a special skin like the picture below but in a seperate program, so we can assign it to a button, and not destroy our software keyboard at the same time.
so if i need to open finger keyboard, i will open it normally as i am doing right now, but if i want to use the dpad keyboard i will call the seperated exe file by holding my call button. this will display the following keyboard like the image below, and that will be the end of the dpad problem.
i propably got a little crazy in that text sorry for that, but i am furious that vb.net couldn't create something simple like that. (i even googled it)

Categories

Resources