Hi Sunil,

   In ur code u added 1 Button bar 4 buttons and 1 edittext. I dont
know whether u need that editText on the top and button bar on the
bottom. For that, write the code for linearlayout with the edittext
before the linearLayout with Buttonbar.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
        android:layout_width = "fill_parent"
        android:layout_height = "fill_parent"
        android:orientation="vertical"
        android:background = "#ffffff">
 <LinearLayout
                        android:id="@+id/searchbox"
                        android:layout_width="320dip"
                        android:layout_height="44dip"
                        android:orientation = "vertical"
                        android:gravity = "top"
                        android:background = "#96A2B5">

                        <EditText
                                android:id = "@+id/searchtxt"
                                android:layout_width = "260dip"
                                android:layout_height = "31dip"
                                android:lines = "1"
                                android:maxLines = "1"
                                android:layout_marginLeft = "5dip"
                                android:layout_marginTop = "8dip" >
                        </EditText>
        </LinearLayout>
        <LinearLayout
           android:id="@+id/button_bar"
           android:layout_width="320dip"
           android:layout_height="50dip"
           android:orientation="horizontal"
           android:gravity = "bottom"
           android:padding="0dip"
           android:background = "#FFFFFF"
           style="@android:style/ButtonBar">

           <Button android:id="@+id/mapbtn"
                   android:layout_width="80dip"
                   android:layout_height="50dip"
                   android:layout_weight="1"
                  />

           <Button android:id="@+id/mebtn"
                   android:layout_width="80dip"
                   android:layout_height="50dip"
                   android:layout_weight="1"
                   />

           <Button android:id="@+id/friends"
                   android:layout_width="80dip"
                   android:layout_height="50dip"
                   android:layout_weight="1"
                   />

           <Button android:id="@+id/privacy"
                   android:layout_width="80dip"
                   android:layout_height="50dip"
                   android:layout_weight="1"
                   />
         </LinearLayout>



</LinearLayout>

Regards,
SREEHARI

On Mar 3, 1:53 pm, javame_android <su...@softwebsolutions.com> wrote:
> Hi,
>
> I am facing a problem in designing LinearLayout. What I want is the
> Textbox at the top and button bar at the bottom. But the top Textbox
> just don't appear.
>
> The xml file looks like this :
>
> <?xml version="1.0" encoding="utf-8"?>
> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/
> android"
>         android:layout_width = "fill_parent"
>         android:layout_height = "fill_parent"
>         android:orientation="vertical"
>         android:background = "#ffffff">
>
>         <LinearLayout
>            android:id="@+id/button_bar"
>            android:layout_width="320dip"
>            android:layout_height="50dip"
>            android:orientation="horizontal"
>            android:gravity = "bottom"
>            android:padding="0dip"
>            android:background = "#FFFFFF"
>            style="@android:style/ButtonBar">
>
>            <Button android:id="@+id/mapbtn"
>                    android:layout_width="80dip"
>                    android:layout_height="50dip"
>                    android:layout_weight="1"
>                    android:background = "@drawable/mapbtn"/>
>
>            <Button android:id="@+id/mebtn"
>                    android:layout_width="80dip"
>                    android:layout_height="50dip"
>                    android:layout_weight="1"
>                    android:background="@drawable/mebtn"/>
>
>            <Button android:id="@+id/friends"
>                    android:layout_width="80dip"
>                    android:layout_height="50dip"
>                    android:layout_weight="1"
>                    android:background="@drawable/friendsbtn"/>
>
>            <Button android:id="@+id/privacy"
>                    android:layout_width="80dip"
>                    android:layout_height="50dip"
>                    android:layout_weight="1"
>                    android:background="@drawable/privacybtn"/>
>          </LinearLayout>
>
>     <LinearLayout
>                         android:id="@+id/searchbox"
>                         android:layout_width="320dip"
>                         android:layout_height="44dip"
>                         android:orientation = "vertical"
>                         android:gravity = "top"
>                         android:background = "#96A2B5">
>
>                         <EditText
>                                 android:id = "@+id/searchtxt"
>                                 android:layout_width = "260dip"
>                                 android:layout_height = "31dip"
>                                 android:lines = "1"
>                                 android:maxLines = "1"
>                                 android:layout_marginLeft = "5dip"
>                                 android:layout_marginTop = "8dip" >
>                         </EditText>
>         </LinearLayout>
>
> </LinearLayout>
>
> I just don't understand what is the issue over here. I think its
> something to do with android:orientation parameter, but I don't what
> is it.
>
> Can someone here please point out the mistake in this and let me know
> the solution for this.?
>
> Hope to get a quick reply.
>
> Regards
> Sunil

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to