Dreamtrove,

Sounds like a job for RelativeLayout.

See:
http://developer.android.com/resources/tutorials/views/index.html
http://developer.android.com/resources/tutorials/views/hello-relativelayout.html
http://developer.android.com/guide/topics/ui/declaring-layout.html

--Fred
------------------------------------------------------------------------
Fred Stluka -- mailto:[email protected] -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.
------------------------------------------------------------------------

On 12/29/11 3:36 PM, Dreamtrove wrote:
Okay, I'm just beginning this project. I've been programming for many
years but I'm new to Android. I did the hello world and a few other
test apps and now I want to start my first real app, which is going to
be an input method. I've got some Android books stacked up here and am
holding an animal book right now, but there's nothing here on good
layout control. I end up with a flow layout, which may work for many
things, but it makes for a sucky on screen input. I'd appreciate any
ideas.

Here are the specs that I want to aim for:

1) I want to be able to place the keys exactly where I want them
2) I want them to register on finger down, I'll explain below*
3) I'm considering key registering by collision like a video game
rather than by button, but that is probably too complicated for a
first time out, so I'll just stick with the other two for now.

* On many on screen input methods, if not most, the key registers on
finger up. The problem with this is if I hit  G and then hit an O
before letting go of the G, most devices will give me the G but not
the O, and some will even give me a J instead, as a compromise of the
two locations. I know this problem isn't unique to android because it
happens on a few iOS apps as well. So, what I'd like to do is register
a finger down event, and have that trigger a routine that sticks
things in a buffer, to be released as text out on a finger up, but I
digress....

I really have to tackle the layout issue, so, starting with, absolute
layout, or what would be really nice is "layout as % of total screen"
so each key could be 10% of the screen width for qwerty, and then
again for asdfg, only with a left margin of 2.5% and a right one of
7.5% (or a key there, like enter, or the elusive apostrophe.)

Also, I'm thinking that I want to possibly be able to resize this
keyboard for tablets, (this is mostly a tablet app, you can't really
finger type on a phone.) If I resize it, then it just has to be some %
of an abstract size that the app creates, and then that can be
translated to the user's screen size.

Anyway, sorry this post was longer than intended. Any ideas for better
layout control?


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to