You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by de...@orange.com on 2013/03/22 02:09:33 UTC

request focus

Hi all,

 

We have an android application mixing native views and a CordovaWebView.
The problem is the CordovaWebView request the focus when launching the
application even in our case it should not be the view selected by
default. Unfortunately there is no easy way to override this behavior
because inside CordovaWebView constructors a call to a private method
setup is done where the focus is requested by calling
requestFocusFromTouch which is also final. I would like to submit a pull
request for at least change the visibility of setup to protected in
order to override this behavior. How does it sound? Did I miss something
about why setup is private?

 

BR

 

Denis


Re: request focus

Posted by Anis KADRI <an...@gmail.com>.
On Fri, Mar 22, 2013 at 1:01 PM, Andrew Grieve <ag...@chromium.org> wrote:

> Could you call requestFocusFromTouch() on your other component after the
> WebView calls it?
>

I was going to ask the same question.

I also got frustrated with methods being protected or private but there are
usually ways around it.

Re: request focus

Posted by Andrew Grieve <ag...@chromium.org>.
Yeah, this was a concern for me as well, but I figured I'd wait and see
what the pull request looked like to know whether it would be a hard thing
to maintain.

- Could you call requestFocusFromTouch() on your other component after the
WebView calls it?


On Fri, Mar 22, 2013 at 2:50 PM, Joe Bowser <bo...@gmail.com> wrote:

> -1
>
> I don't want anything public until we have a process to decide on what
> we should or should not support.  We've been burned in the past by
> making certain things public, and then not being able to change those
> methods because someone somewhere depends on it for their app.
> Architectural flexibility be isn't useful if it removes our
> flexibility to change things!  This is something that has driven us
> nuts in the past, and that's why we by default try to make things
> private.
>
> If it's private and undocumented, we should reserve the right to
> change it without having to go through the pain of the deprecation
> policy.  You're free to maintain your local copy and make it public,
> but it's private right now because we may want to change this in the
> future, and did not plan for it to be a public api call.
>
>
>
> On Fri, Mar 22, 2013 at 11:21 AM, Lorin Beer <lo...@gmail.com>
> wrote:
> > I've messed around with programmatic view manipulation in native apps, on
> > droid and iOS primarily. There's no reason that I'm aware of that these
> > methods need to be private, and making sure that plugins/native code can
> > change the view layout is important for overall architecture flexibility.
> > It may not be the most common use case, but it's certainly an important
> one.
> >
> > +1 from me
> >
> >
> > On Fri, Mar 22, 2013 at 7:38 AM, Andrew Grieve <ag...@chromium.org>
> wrote:
> >
> >> Sounds good to me!
> >>
> >>
> >> On Thu, Mar 21, 2013 at 9:09 PM, <de...@orange.com> wrote:
> >>
> >> > Hi all,
> >> >
> >> >
> >> >
> >> > We have an android application mixing native views and a
> CordovaWebView.
> >> > The problem is the CordovaWebView request the focus when launching the
> >> > application even in our case it should not be the view selected by
> >> > default. Unfortunately there is no easy way to override this behavior
> >> > because inside CordovaWebView constructors a call to a private method
> >> > setup is done where the focus is requested by calling
> >> > requestFocusFromTouch which is also final. I would like to submit a
> pull
> >> > request for at least change the visibility of setup to protected in
> >> > order to override this behavior. How does it sound? Did I miss
> something
> >> > about why setup is private?
> >> >
> >> >
> >> >
> >> > BR
> >> >
> >> >
> >> >
> >> > Denis
> >> >
> >> >
> >>
>

Re: request focus

Posted by Joe Bowser <bo...@gmail.com>.
-1

I don't want anything public until we have a process to decide on what
we should or should not support.  We've been burned in the past by
making certain things public, and then not being able to change those
methods because someone somewhere depends on it for their app.
Architectural flexibility be isn't useful if it removes our
flexibility to change things!  This is something that has driven us
nuts in the past, and that's why we by default try to make things
private.

If it's private and undocumented, we should reserve the right to
change it without having to go through the pain of the deprecation
policy.  You're free to maintain your local copy and make it public,
but it's private right now because we may want to change this in the
future, and did not plan for it to be a public api call.



On Fri, Mar 22, 2013 at 11:21 AM, Lorin Beer <lo...@gmail.com> wrote:
> I've messed around with programmatic view manipulation in native apps, on
> droid and iOS primarily. There's no reason that I'm aware of that these
> methods need to be private, and making sure that plugins/native code can
> change the view layout is important for overall architecture flexibility.
> It may not be the most common use case, but it's certainly an important one.
>
> +1 from me
>
>
> On Fri, Mar 22, 2013 at 7:38 AM, Andrew Grieve <ag...@chromium.org> wrote:
>
>> Sounds good to me!
>>
>>
>> On Thu, Mar 21, 2013 at 9:09 PM, <de...@orange.com> wrote:
>>
>> > Hi all,
>> >
>> >
>> >
>> > We have an android application mixing native views and a CordovaWebView.
>> > The problem is the CordovaWebView request the focus when launching the
>> > application even in our case it should not be the view selected by
>> > default. Unfortunately there is no easy way to override this behavior
>> > because inside CordovaWebView constructors a call to a private method
>> > setup is done where the focus is requested by calling
>> > requestFocusFromTouch which is also final. I would like to submit a pull
>> > request for at least change the visibility of setup to protected in
>> > order to override this behavior. How does it sound? Did I miss something
>> > about why setup is private?
>> >
>> >
>> >
>> > BR
>> >
>> >
>> >
>> > Denis
>> >
>> >
>>

Re: request focus

Posted by Lorin Beer <lo...@gmail.com>.
I've messed around with programmatic view manipulation in native apps, on
droid and iOS primarily. There's no reason that I'm aware of that these
methods need to be private, and making sure that plugins/native code can
change the view layout is important for overall architecture flexibility.
It may not be the most common use case, but it's certainly an important one.

+1 from me


On Fri, Mar 22, 2013 at 7:38 AM, Andrew Grieve <ag...@chromium.org> wrote:

> Sounds good to me!
>
>
> On Thu, Mar 21, 2013 at 9:09 PM, <de...@orange.com> wrote:
>
> > Hi all,
> >
> >
> >
> > We have an android application mixing native views and a CordovaWebView.
> > The problem is the CordovaWebView request the focus when launching the
> > application even in our case it should not be the view selected by
> > default. Unfortunately there is no easy way to override this behavior
> > because inside CordovaWebView constructors a call to a private method
> > setup is done where the focus is requested by calling
> > requestFocusFromTouch which is also final. I would like to submit a pull
> > request for at least change the visibility of setup to protected in
> > order to override this behavior. How does it sound? Did I miss something
> > about why setup is private?
> >
> >
> >
> > BR
> >
> >
> >
> > Denis
> >
> >
>

Re: request focus

Posted by Andrew Grieve <ag...@chromium.org>.
Sounds good to me!


On Thu, Mar 21, 2013 at 9:09 PM, <de...@orange.com> wrote:

> Hi all,
>
>
>
> We have an android application mixing native views and a CordovaWebView.
> The problem is the CordovaWebView request the focus when launching the
> application even in our case it should not be the view selected by
> default. Unfortunately there is no easy way to override this behavior
> because inside CordovaWebView constructors a call to a private method
> setup is done where the focus is requested by calling
> requestFocusFromTouch which is also final. I would like to submit a pull
> request for at least change the visibility of setup to protected in
> order to override this behavior. How does it sound? Did I miss something
> about why setup is private?
>
>
>
> BR
>
>
>
> Denis
>
>