cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anis KADRI <anis.ka...@gmail.com>
Subject Re: cordova-android LinearLayout vs. RelativeLayout
Date Mon, 19 May 2014 21:26:04 GMT
I just want to add that it's rather annoying, dirty and hacky but possible
to switch from the default LinearLayout to RelativeLayout.

Example: https://gist.github.com/imhotep/3d33f262dfe355d2b4b5

I used that for one of my android plugins.


On Thu, May 15, 2014 at 3:35 PM, Joe Bowser <bowserj@gmail.com> wrote:

> On Wed, May 14, 2014 at 5:54 PM, Andrew Grieve <agrieve@chromium.org>
> wrote:
> > Is it that you think LinearLayout is the best default Layout? Or is it
> that
> > you don't want to make a non-backwards-compatible change?
> >
>
> It's definitely 80% the latter. You're forgetting the "I think that
> RelativeLayout could cause weird things to happen", which is my other
> 20%.  Feel free to re-open and prioritize it.
>
> > Be happy to stick this on the "should do for 4.0" list (it's not urgent
> by
> > any means). But if you're arguing for LinearLayout being a better option,
> > then I'd like to know why.
>
> If we can get the soft keyboard detection working, I'd rather keep our
> custom layout. So far, I haven't had any luck.
>
> >
> > On Wed, May 14, 2014 at 11:53 AM, Joe Bowser <bowserj@gmail.com> wrote:
> >
> >> I disagree.  iOS is not Android and doesn't have to deal with the
> Android
> >> life cycle or intents.   I don't think supporting extending
> CordovaActivity
> >> is a good idea, especially considering other libraries that the view
> may be
> >> used with will also be extending the Activity.
> >
> >
> >> If people want to do Android development and not Cordova development,
> >> which sounds like the case here, they should have to handle their own
> >> intents.
> >>
> >> Also, if we're counting this as an ATI change, we can't do it until a
> major
> >> version.
> >>  On May 14, 2014 7:36 AM, "Andrew Grieve" <agrieve@chromium.org> wrote:
> >>
> >> > I think Lisa's reasons make sense.
> >> >
> >> > True, you can make your own Activity, but there's a lot of value in
> not
> >> > requiring this. iOS has one level of indirection for the UIWebView (it
> >> > lives in a generic UIView), and that allows the exact use-case that is
> >> > being discussed here.
> >> >
> >> >
> >> > On Wed, May 14, 2014 at 12:43 AM, Joe Bowser <bowserj@gmail.com>
> wrote:
> >> >
> >> > > Ok, here's my opinion on LinearLayout vs RelativeLayout and why I
> >> closed
> >> > > the bug as "Won't Fix"
> >> > >
> >> > > 1. We went with LinearLayout because it was the easiest at the time.
> >>  We
> >> > > experimented with FrameLayout as well, and decided to stick with
> >> > > LinearLayout because it was the easiest to setup programmatically.
> >> > > 2. CordovaActivity is not intended to be extended or modified in any
> >> way.
> >> > >  If people need a custom activity, they should create their own and
> >> > > implement CordovaInterface and use the CordovaWebView. That's why
we
> >> > > created the CordovaWebView.
> >> > >
> >> > > The fact is that we actually use a class called
> >> > > LinearLayoutSoftKeyboardDetect, which at one point detected when the
> >> > > keyboard was visible by measuring the screen to see if the WebView
> and
> >> > the
> >> > > Layout containing it resized, but since the keyboard's behaviour
> >> changed
> >> > in
> >> > > 3.x, this has been broken for quite a long time and simply doesn't
> >> work.
> >> > > That being said, changing this would be non-trivial, and I don't see
> >> any
> >> > > benefit in doing another refactor.
> >> > >
> >> > >
> >> > >
> >> > > On Tue, May 13, 2014 at 1:19 PM, Lisa Seacat DeLuca <
> >> ldeluca@us.ibm.com
> >> > > >wrote:
> >> > >
> >> > > > I opened a JIRA issue on the android default webview layout use
> of a
> >> > > > LinearLayout.  Chatting with our product team that uses Cordova
> >> they've
> >> > > had
> >> > > > a number of customer requests to use a RelativeLayout.  I wanted
> to
> >> get
> >> > > > some input from people to see if there is a reason we decided
to
> go
> >> > with
> >> > > > the LinearLayout instead of a RelativeLayout in case there is
a
> good
> >> > > reason
> >> > > > and someone goes and fixes this issue.  :)
> >> > > >
> >> > > > https://issues.apache.org/jira/browse/CB-6681
> >> > > >
> >> > > >
> >> > > > Lisa
> >> > > >
> >> > > > Lisa Seacat DeLuca
> >> > > > Mobile Engineer | t: +415.787.4589 | *ldeluca@apache.org*<
> >> > > ldeluca@apache.org>| |
> >> > > > *ldeluca@us.ibm.com* <ldeluca@us.ibm.com> | *lisaseacat.com*<
> >> > > http://www.lisaseacat.com/>| [image:
> >> > > > follow @LisaSeacat on twitter] <http://www.twitter.com/LisaSeacat
> >|
> >> > > [image:
> >> > > > follow Lisa Seacat DeLuca on linkedin]<
> >> > > http://www.linkedin.com/in/lisaseacat>
> >> > > >
> >> > >
> >> >
> >>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message