niteshmourya / app-inventor-for-android

Automatically exported from code.google.com/p/app-inventor-for-android
Apache License 2.0
2 stars 0 forks source link

Ability to set element focus #174

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It would be nice to be able to set the focus of an item.

For example:

I wrote a very simple notepad application. It uses a single "screen" for both 
new note entry and existing note editing.
When editing a note, I set the "note_name" field to note_name.Enabled = false.
The initial focus on a screen is, by default, the first editable textarea, 
which means when I load a saved note, I can edit the name by tapping it, even 
though it's darkened out.

If I could set the focus as a block option when loading a saved note, I direct 
it to the note_body field, and the note_name field would be safe.

It this would be too much development time, App Inventor could alternatively 
set the current focus to "nothing" unless the user has actually focused 
(tapped, pushed, etc.) on an element.

Original issue reported on code.google.com by irwin....@gmail.com on 23 Sep 2010 at 1:23

GoogleCodeExporter commented 9 years ago
The fact that there is no ability to set focus on a particular element 
(specifically a text box) when it's needed makes what would be some really nice 
UIs into a pain in the back.

Original comment by jim.stephen@gmail.com on 23 Sep 2010 at 6:25

GoogleCodeExporter commented 9 years ago

Original comment by ma...@google.com on 28 Oct 2010 at 7:49

GoogleCodeExporter commented 9 years ago
I'd certainly like this feature, either that or a way to prevent the keyboard 
automatically displaying.

Original comment by JohnGree...@gmail.com on 19 Dec 2010 at 8:06

GoogleCodeExporter commented 9 years ago
I agree, the ability to set or remove focus would be a nice addition. I dont 
like the keyboard starting up @ the begining either.

Original comment by AlanAppl...@gmail.com on 24 Jan 2011 at 9:54

GoogleCodeExporter commented 9 years ago
I second or third the set focus method on controls where it makes sense.

Original comment by UtahF...@gmail.com on 14 Feb 2011 at 11:17

GoogleCodeExporter commented 9 years ago
Agreed on keyboard suppression.  For at least one app I am building, I want 
them to be able to see the whole screen first and then click on a field they 
want to edit.

Original comment by zenhardy on 17 Feb 2011 at 2:26

GoogleCodeExporter commented 9 years ago
Likewise I've ran into this tonight.  I have a simple notepad app, with some 
tag fields at the top of the form, and the big text area for the description at 
the bottom.  I'd like the user to start with the tags at the top of the form, 
rather than at the bottom.  Workflow:  select tags for note, enter note 
description, submit.

Kind Regards,

Rob

Original comment by rob%gisc...@gtempaccount.com on 1 Mar 2011 at 9:16

GoogleCodeExporter commented 9 years ago
If the user enters a wrong (not wanted) string into a text-field, at the moment 
it is not possible to bring the user to enter a correct string in that text-box.
But with the ability to set the focus on a particular element it would be 
possible to implement a good error-handling.

Original comment by Jan.Gros...@googlemail.com on 18 Mar 2011 at 12:11

GoogleCodeExporter commented 9 years ago
This worked for me.

Hide the text field. as the last item in Screen1.Initialize set the visible 
property to TRUE.

Original comment by dummym...@gmail.com on 1 Apr 2011 at 4:37

GoogleCodeExporter commented 9 years ago
this works as a workaround, you can toggle on and off the visibility within one 
call (button click or whatever) and that brings the focus on.

B

Original comment by ben.slun...@googlemail.com on 1 Apr 2011 at 6:12

GoogleCodeExporter commented 9 years ago
I realize this works for button clicks and other events, but if there is
simply a text box as an item on the GUI, then as soon as the application
opens, the keyboard pops up without any input from the user. Thus, blocking
out the first impression of the app and any instruction labels, options,
etc.

within

Original comment by simera...@gmail.com on 1 Apr 2011 at 6:28

GoogleCodeExporter commented 9 years ago
sorry unless i'm misuderstanding it doesn't do it for me, simply initiates the 
app with a selected text box and a flashing cursor, no keyboard..

anyway its still not ideal, just a workaround rather than a proper 'get focus' 
call which is still needed i think

B

Original comment by ben.slun...@googlemail.com on 1 Apr 2011 at 6:34

GoogleCodeExporter commented 9 years ago
What phone are you using? Does it have physical keyboard? I have an HTC EVO.

Original comment by simera...@gmail.com on 1 Apr 2011 at 6:54

GoogleCodeExporter commented 9 years ago
i'm running it in a bit of a weird setup granted: a custom flashed Advent Vega 
and in an emulator on a mac, got an htc desire but can't find my data cable at 
the moment so can't test on that sorry, but the tablet doesn't have a physical 
keyboard

B

Original comment by ben.slun...@googlemail.com on 1 Apr 2011 at 6:58

GoogleCodeExporter commented 9 years ago
This "work around" helps for not having the keyboard pop up.  But being able to 
force the app to focus on a field has many other uses.  One example, entering 
data into 10 fields and then after clicking SAVE, it put the field focus back 
to the first field.  And as comment 8 pointed out... error handling would be 
able to direct users to specific fields that required their attention.  The 
point is that this request is not just for keyboard suppression.  

Original comment by scootr...@gmail.com on 1 Apr 2011 at 7:37

GoogleCodeExporter commented 9 years ago
I'm not disagreeing but just to say that for me when I toggle visibility on and 
off it serves to place focus on the corresponding field. It's a little buggy 
and in no way invalidated the need for a proper call but if anyone is desperate 
then this method is more or less working for me. I'm using it to clear a text 
box and reset it to focussed (flashing cursor and orange glow). 

Original comment by vic...@googlemail.com on 1 Apr 2011 at 7:44

GoogleCodeExporter commented 9 years ago
This is definitely needed

Original comment by anaylo...@yahoo.com on 10 May 2011 at 8:23

GoogleCodeExporter commented 9 years ago
ReadOnly & SetFocus

Original comment by ser...@seductive.com on 11 May 2011 at 3:52

GoogleCodeExporter commented 9 years ago
I could really use this feature on a app I'm working on for field auditors out 
gathering data for us.  Causing a lot of confusion without this feature.  

Original comment by mdel...@gmail.com on 13 Aug 2011 at 3:00

GoogleCodeExporter commented 9 years ago
Set Focus would be a fantastic addition to app inventor.

Original comment by homeless...@gmail.com on 3 Feb 2013 at 11:21

GoogleCodeExporter commented 9 years ago
Needed Set Focus and agreed to all because this will be another great addition 
to App Inventor.

Original comment by agus.sup...@gmail.com on 22 Feb 2013 at 6:59

GoogleCodeExporter commented 9 years ago
I want to be able to click a button and either set focus to a text field (so 
that text may be entered into the text field) or trigger a keyboard to be 
opened so that text may be stored into a variable.

Original comment by prevail....@gmail.com on 30 Mar 2013 at 3:57

GoogleCodeExporter commented 9 years ago
Any robust data application needs to be able to direct focus.

Original comment by brother....@gmail.com on 7 Jun 2013 at 7:12

GoogleCodeExporter commented 9 years ago
Also me, I would to have this feature. I would like to disable other stuff when 
text is on focus and enable them after the text change.

Original comment by malef...@gmail.com on 16 Oct 2013 at 10:25

GoogleCodeExporter commented 9 years ago
Same as #15 - 
I've got something like 10 textboxes and previous and next button to 
read/change/add/delete the previous/next 10 values.
so i'll appreciate having the ability to set focus to a specific element (the 
1st textbox box in my case).

Original comment by yuval.go...@gmail.com on 27 Dec 2013 at 9:22

GoogleCodeExporter commented 9 years ago
Set focus to desired component is a "needed" feature. I have come across this 
need in a few apps that I have developed in the past twelve months. So far I 
have no workaround. 
About the textbook "suggestion", it does not apply to me since my apps do not 
have textbook box but image components.

Original comment by prac01te...@gmail.com on 6 May 2014 at 1:22

GoogleCodeExporter commented 9 years ago
Hey, I'm looking for set focus too !!!

Original comment by cn.cerr...@gmail.com on 6 May 2014 at 6:12

GoogleCodeExporter commented 9 years ago
Unfortunately, there is no way of designing cursor focus in the App Inventor. 
That has made users say that my app was not user friendly. The cursor does not 
showup until the user taps on one of the text boxes.

Original comment by bbassa9...@gmail.com on 5 Jun 2014 at 10:57

GoogleCodeExporter commented 9 years ago
Me too, need to be able to set focus.

Original comment by W.Paul.D...@gmail.com on 1 Aug 2014 at 5:28

GoogleCodeExporter commented 9 years ago
How can such an important feature as the ability to set focus be ignored for so 
long by the MIT team??

Original comment by p...@howtologic.com on 29 Aug 2014 at 3:32

GoogleCodeExporter commented 9 years ago
A great feature that is much needed!

Original comment by Ockme...@gmail.com on 30 Oct 2014 at 5:24