<LinearLayout android:id="@+id/LinearLayout01"
        android:layout_height="wrap_content" android:weightSum="2"
        android:layout_width="fill_parent">
        <EditText android:text="@+id/EditText01"
android:id="@+id/EditText01"
            android:layout_width="wrap_content"
android:layout_height="wrap_content"
            android:layout_weight="1"></EditText>
        <EditText android:text="@+id/EditText02"
android:id="@+id/EditText02"
            android:layout_width="wrap_content"
android:layout_height="wrap_content"
            android:layout_weight="1"></EditText>
    </LinearLayout>

The key is using the Weight attribute.

And make sure to check out this article
http://adrianvintu.com/blogengine/post/Force-Locale-on-Android.aspx

BR,
Adrian Vintu

http://adrianvintu.com


On Fri, Mar 12, 2010 at 7:20 PM, temp <[email protected]> wrote:

> 50% of available vertical height
>
> if total height = 100px then
>
> EditText1 height= 50px ( 0-50px)
> EditText2 height=50px ( 51-100px)
>
> Thanks
>
> On Mar 13, 2:03 am, Mike dg <[email protected]> wrote:
> > 50% of the total area of the screen? or just 50% of the width?
> > Can you include a picture of exactly what you want it to look like?
> > -Mike dg
> >
> > On Mar 12, 12:52 pm, temp <[email protected]> wrote:
> >
> > > Hi,
> >
> > > In my layout i need to have to 2 EditText widgets which would occupy
> > > 50% of area individually.
> >
> > > I'm planning to have the solution generic for all devices, let me know
> > > if this can be controlled through XML in any way
> >
> > > or
> >
> > > I'll have to create the layout through code.
> >
> > > Thanks
>
> --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
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