Immediate selection

Hi,

What do you mean by "immediate selection?"

I see that you have it listed on you roadmap here.

  • Select: Grid-of-Icon selection -- rectangular grid of icons -- pick
    one, immediate selection.

I'm hoping your answer is:
Immediate selection means when a user clicks something, the form
automatically advances to the next question.

If "immediate selection" doesn't mean that, then is there a way to
implement that functionality?

Thanks!

Greg

hi greg,

yup. it will immediately advance after you select an option. you can
add this functionality pretty easily in the code base. you basically
have to catch the onclick (or text input) and call methods to advance
to the next screen.

yaw

··· On Mon, Feb 21, 2011 at 10:40, GregM wrote: > Hi, > > What do you mean by "immediate selection?" > > I see that you have it listed on you roadmap here. > - Select: Grid-of-Icon selection -- rectangular grid of icons -- pick > one, immediate selection. > > I'm hoping your answer is: > Immediate selection means when a user clicks something, the form > automatically advances to the next question. > > If "immediate selection" doesn't mean that, then is there a way to > implement that functionality? > > Thanks! > > Greg > > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en >

Yaw,

Thanks for the response, I need a little bigger of an hint about where to
put my call to showNextView(); If you can provide a hint, that would be
great.

Should the method go somewhere in FormEntryActivity or inside all the widets
like SelectOneWidget?

I tried inserting it into the createView method, but that appears not to be
called:

        case FormEntryController.EVENT_QUESTION:
            QuestionView qv = new QuestionView(mHandler,

mFormEntryModel.getFormIndex(), this);
qv.buildView(mInstancePath, getGroupsForCurrentIndex());
qv.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
Log.d("tag", "CLICKED SOMETHING!!!");
}
});

-Greg

··· On Mon, Feb 21, 2011 at 6:32 PM, Yaw Anokwa wrote:

hi greg,

yup. it will immediately advance after you select an option. you can
add this functionality pretty easily in the code base. you basically
have to catch the onclick (or text input) and call methods to advance
to the next screen.

yaw

On Mon, Feb 21, 2011 at 10:40, GregM gregorym@gmail.com wrote:

Hi,

What do you mean by "immediate selection?"

I see that you have it listed on you roadmap here.

  • Select: Grid-of-Icon selection -- rectangular grid of icons -- pick
    one, immediate selection.

I'm hoping your answer is:
Immediate selection means when a user clicks something, the form
automatically advances to the next question.

If "immediate selection" doesn't mean that, then is there a way to
implement that functionality?

Thanks!

Greg

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

In 1.1.6, the interaction is a bit more complex and some of the plumbing is
not there.

If the select1 widget is within a GroupView (which renders and manages
multiple questions on one page), you would not advance, but if it is within
a QuestionView (which renders and manages a single question on a page), it
should.

The point where the advancement should be handled is in the
onDescendentRequestFocusChange(...) method of the QuestionView.

Step 1: In that method, you will need to determine whether the formIndex
refers to a select1, and if so, trigger the
FormEntryActivity::showNextView(). To do that, get the form entry prompt
via:

FormEntryPrompt formEntryPrompt =
Collect.getInstance().getFormEntryController().getModel().getQuestionPrompt(formIndex);

And see the WidgetFactory code for how it tests for the select1 control
type.

Step 2: This is where the plumbing is missing -- the GroupView and
QuestionView have the Context of the enclosing FormEntryActivity, but don't
hold a pointer back to the activity itself. The inter-page navigation
(showNextView(), showPreviousView()) should probably be moved into an
interface that FormEntryActivity implements, and that interface passed to
the QuestionView in its constructor. I am also not certain that the call
stack is in a good state within onDescendant...() for making an inter-page
navigation. So invoking this interface may need to be done asynchronously
so that the call stack can be clean.

Mitch

··· On Tue, Feb 22, 2011 at 9:06 AM, Greg Milette wrote:

Yaw,

Thanks for the response, I need a little bigger of an hint about where to
put my call to showNextView(); If you can provide a hint, that would be
great.

Should the method go somewhere in FormEntryActivity or inside all the
widets like SelectOneWidget?

I tried inserting it into the createView method, but that appears not to be
called:

        case FormEntryController.EVENT_QUESTION:
            QuestionView qv = new QuestionView(mHandler,

mFormEntryModel.getFormIndex(), this);
qv.buildView(mInstancePath, getGroupsForCurrentIndex());
qv.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
Log.d("tag", "CLICKED SOMETHING!!!");
}
});

-Greg

On Mon, Feb 21, 2011 at 6:32 PM, Yaw Anokwa yanokwa@gmail.com wrote:

hi greg,

yup. it will immediately advance after you select an option. you can
add this functionality pretty easily in the code base. you basically
have to catch the onclick (or text input) and call methods to advance
to the next screen.

yaw

On Mon, Feb 21, 2011 at 10:40, GregM gregorym@gmail.com wrote:

Hi,

What do you mean by "immediate selection?"

I see that you have it listed on you roadmap here.

  • Select: Grid-of-Icon selection -- rectangular grid of icons -- pick
    one, immediate selection.

I'm hoping your answer is:
Immediate selection means when a user clicks something, the form
automatically advances to the next question.

If "immediate selection" doesn't mean that, then is there a way to
implement that functionality?

Thanks!

Greg

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Mitch Sundt
Software Engineer
http://www.OpenDataKit.org
University of Washington
mitchellsundt@gmail.com

Ok, sounds tricky.

So how will we be able to do immediate selection in 1.1.7?

-Greg

··· On Tue, Feb 22, 2011 at 1:36 PM, Mitch Sundt wrote:

In 1.1.6, the interaction is a bit more complex and some of the plumbing is
not there.

If the select1 widget is within a GroupView (which renders and manages
multiple questions on one page), you would not advance, but if it is within
a QuestionView (which renders and manages a single question on a page), it
should.

The point where the advancement should be handled is in the
onDescendentRequestFocusChange(...) method of the QuestionView.

Step 1: In that method, you will need to determine whether the formIndex
refers to a select1, and if so, trigger the
FormEntryActivity::showNextView(). To do that, get the form entry prompt
via:

FormEntryPrompt formEntryPrompt =
Collect.getInstance().getFormEntryController().getModel().getQuestionPrompt(formIndex);

And see the WidgetFactory code for how it tests for the select1 control
type.

Step 2: This is where the plumbing is missing -- the GroupView and
QuestionView have the Context of the enclosing FormEntryActivity, but don't
hold a pointer back to the activity itself. The inter-page navigation
(showNextView(), showPreviousView()) should probably be moved into an
interface that FormEntryActivity implements, and that interface passed to
the QuestionView in its constructor. I am also not certain that the call
stack is in a good state within onDescendant...() for making an inter-page
navigation. So invoking this interface may need to be done asynchronously
so that the call stack can be clean.

Mitch

On Tue, Feb 22, 2011 at 9:06 AM, Greg Milette gregorym@gmail.com wrote:

Yaw,

Thanks for the response, I need a little bigger of an hint about where to
put my call to showNextView(); If you can provide a hint, that would be
great.

Should the method go somewhere in FormEntryActivity or inside all the
widets like SelectOneWidget?

I tried inserting it into the createView method, but that appears not to
be called:

        case FormEntryController.EVENT_QUESTION:
            QuestionView qv = new QuestionView(mHandler,

mFormEntryModel.getFormIndex(), this);
qv.buildView(mInstancePath, getGroupsForCurrentIndex());
qv.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
Log.d("tag", "CLICKED SOMETHING!!!");
}
});

-Greg

On Mon, Feb 21, 2011 at 6:32 PM, Yaw Anokwa yanokwa@gmail.com wrote:

hi greg,

yup. it will immediately advance after you select an option. you can
add this functionality pretty easily in the code base. you basically
have to catch the onclick (or text input) and call methods to advance
to the next screen.

yaw

On Mon, Feb 21, 2011 at 10:40, GregM gregorym@gmail.com wrote:

Hi,

What do you mean by "immediate selection?"

I see that you have it listed on you roadmap here.

  • Select: Grid-of-Icon selection -- rectangular grid of icons -- pick
    one, immediate selection.

I'm hoping your answer is:
Immediate selection means when a user clicks something, the form
automatically advances to the next question.

If "immediate selection" doesn't mean that, then is there a way to
implement that functionality?

Thanks!

Greg

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Mitch Sundt
Software Engineer
http://www.OpenDataKit.org
University of Washington
mitchellsundt@gmail.com

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

If you figure out the code changes required, this change can probably be put
into 1.1.6, since I'm behind on getting the login and new download APIs
coded.

1.1.7 will build upon the UI mechanisms of 1.1.6, with this feature
implemented as described below.

Mitch

··· On Tue, Feb 22, 2011 at 3:34 PM, Greg Milette wrote:

Ok, sounds tricky.

So how will we be able to do immediate selection in 1.1.7?

-Greg

On Tue, Feb 22, 2011 at 1:36 PM, Mitch Sundt msundt@cs.washington.eduwrote:

In 1.1.6, the interaction is a bit more complex and some of the plumbing
is not there.

If the select1 widget is within a GroupView (which renders and manages
multiple questions on one page), you would not advance, but if it is within
a QuestionView (which renders and manages a single question on a page), it
should.

The point where the advancement should be handled is in the
onDescendentRequestFocusChange(...) method of the QuestionView.

Step 1: In that method, you will need to determine whether the formIndex
refers to a select1, and if so, trigger the
FormEntryActivity::showNextView(). To do that, get the form entry prompt
via:

FormEntryPrompt formEntryPrompt =
Collect.getInstance().getFormEntryController().getModel().getQuestionPrompt(formIndex);

And see the WidgetFactory code for how it tests for the select1 control
type.

Step 2: This is where the plumbing is missing -- the GroupView and
QuestionView have the Context of the enclosing FormEntryActivity, but don't
hold a pointer back to the activity itself. The inter-page navigation
(showNextView(), showPreviousView()) should probably be moved into an
interface that FormEntryActivity implements, and that interface passed to
the QuestionView in its constructor. I am also not certain that the call
stack is in a good state within onDescendant...() for making an inter-page
navigation. So invoking this interface may need to be done asynchronously
so that the call stack can be clean.

Mitch

On Tue, Feb 22, 2011 at 9:06 AM, Greg Milette gregorym@gmail.com wrote:

Yaw,

Thanks for the response, I need a little bigger of an hint about where to
put my call to showNextView(); If you can provide a hint, that would be
great.

Should the method go somewhere in FormEntryActivity or inside all the
widets like SelectOneWidget?

I tried inserting it into the createView method, but that appears not to
be called:

        case FormEntryController.EVENT_QUESTION:
            QuestionView qv = new QuestionView(mHandler,

mFormEntryModel.getFormIndex(), this);
qv.buildView(mInstancePath, getGroupsForCurrentIndex());
qv.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
Log.d("tag", "CLICKED SOMETHING!!!");
}
});

-Greg

On Mon, Feb 21, 2011 at 6:32 PM, Yaw Anokwa yanokwa@gmail.com wrote:

hi greg,

yup. it will immediately advance after you select an option. you can
add this functionality pretty easily in the code base. you basically
have to catch the onclick (or text input) and call methods to advance
to the next screen.

yaw

On Mon, Feb 21, 2011 at 10:40, GregM gregorym@gmail.com wrote:

Hi,

What do you mean by "immediate selection?"

I see that you have it listed on you roadmap here.

  • Select: Grid-of-Icon selection -- rectangular grid of icons -- pick
    one, immediate selection.

I'm hoping your answer is:
Immediate selection means when a user clicks something, the form
automatically advances to the next question.

If "immediate selection" doesn't mean that, then is there a way to
implement that functionality?

Thanks!

Greg

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Mitch Sundt
Software Engineer
http://www.OpenDataKit.org
University of Washington
mitchellsundt@gmail.com

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Mitch Sundt
Software Engineer
http://www.OpenDataKit.org http://www.opendatakit.org/
University of Washington
mitchellsundt@gmail.com