Map Layout Issue - android

I am new in android. I am making an app using google map.
In the layout file 3 part i.e Top Layer,Mid Layer,Bottom Layer.
In Top layer a header, in bottom Layer TAB button.
In Mid Layer Fragment and Edit text. When I click on edit box then fragment gone up. when fragment comes back at position then hte top layer is going to invisible. I don't know what happens.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/bg"
tools:context=".MainActivity" >
<RelativeLayout
android:id="#+id/topLay"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#drawable/jam_alert_topbar"
>
</RelativeLayout>
<RelativeLayout
android:id="#+id/midLay"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="#+id/botLay"
android:layout_below="#+id/topLay"
android:layout_margin="10dp" >
<fragment
android:id="#+id/mapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="#+id/descr"
android:layout_below="#+id/topLay"
class="com.google.android.gms.maps.SupportMapFragment" />
<EditText
android:id="#+id/descr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_marginTop="5dp"
android:background="#color/white"
android:gravity="top|left"
android:hint="Description"
android:maxLines="4"
android:minLines="4" >
</EditText>
</RelativeLayout>
<LinearLayout
android:id="#+id/botLay"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:gravity="center" >
<Button
android:id="#+id/btReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/jam_tab_n"
android:onClick="btReport" />
<Button
android:id="#+id/btMap"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/map_tab_h"
android:onClick="btMap" />
<Button
android:id="#+id/btHome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/report_tab_n"
android:onClick="btHome" />
<Button
android:id="#+id/btSetting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/settings_tab_n"
android:onClick="btSetting" />
</LinearLayout>

Try this, Have you tried this one?. Add windowSoftInputMode attribute in particular activity
android:windowSoftInputMode="adjustPan"
In your xml. add android:layout_alinParentTop="true" in your top relativelayout
<RelativeLayout
android:id="#+id/topLay"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#drawable/jam_alert_topbar"
android:layout_alinParentTop="true"
>
</RelativeLayout>

// try this
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#drawable/bg"
tools:context=".MainActivity" >
<LinearLayout
android:id="#+id/topLay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="#drawable/jam_alert_topbar">
</LinearLayout>
<LinearLayout
android:id="#+id/midLay"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical"
android:layout_margin="10dp" >
<fragment
android:id="#+id/mapView"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
class="com.google.android.gms.maps.SupportMapFragment" />
<EditText
android:id="#+id/descr"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:background="#color/white"
android:gravity="top|left"
android:hint="Description"
android:maxLines="4"
android:minLines="4" >
</EditText>
</LinearLayout>
<LinearLayout
android:id="#+id/botLay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center" >
<Button
android:id="#+id/btReport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/jam_tab_n"
android:onClick="btReport" />
<Button
android:id="#+id/btMap"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/map_tab_h"
android:onClick="btMap" />
<Button
android:id="#+id/btHome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/report_tab_n"
android:onClick="btHome" />
<Button
android:id="#+id/btSetting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/settings_tab_n"
android:onClick="btSetting" />
</LinearLayout>
</LinearLayout>

Related

How do I create overlay button in my Android layout

I want to create a button which will overlay between 2 layouts.
I am using Linear Layout and added appropriate weight to it.
Have attached a screen shot for reference.
Here is my XML
tag.xml :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:weightSum="100" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="30"
android:background="#color/greyColor"
android:gravity="center" >
<ImageView
android:id="#+id/ximgvwCamera"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/camera_big" />
</RelativeLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="70"
android:background="#android:color/white" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="#android:color/white"
android:gravity="center_horizontal"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="5dp"
android:padding="5dp"
android:text="#string/strQ1"
android:textAppearance="#android:style/TextAppearance.Medium"
android:textColor="#android:color/darker_gray" />
</LinearLayout>
</ScrollView>
Please help me in this.
Thanks in advance!
Try this it will working...
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="150dp" >
<ImageView
android:id="#+id/imageCover"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:src="#drawable/image_top" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:background="#drawable/image_bottom"
android:layout_height="match_parent" >
</LinearLayout>
</LinearLayout>
<ImageView
android:id="#+id/imageProfile"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="end"
android:layout_marginTop="100dp"
android:src="#drawable/ic_launcher" />
</FrameLayout>
View like this
You need a relative layout. Set image alignt to right-top and set margin top appropriately.
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<ImageView
android:id="#+id/first"
android:layout_width="fill_parent"
android:layout_height="70dp"
android:src="#drawable/firstImage" />
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
android:src="#drawable/middleImage" >
</ImageView>
<RelativeLayout
android:id="#+id/second"
android:layout_width="fill_parent"
android:layout_height="70dp"
android:layout_below="#id/first"
android:src="#drawable/share_over" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="20dp"
android:orientation="horizontal" >
<ImageView
android:id="#+id/YES"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/YES" />
<ImageView
android:id="#+id/NO"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/NO" />
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
Divide your image TOP-MIDDLE-BOTTOM(layout). Your size looking like above but
you can change width/height size.

android RelativeLayout below not working

I have main RelativeLayout layout file. I have scrollview and two buttons and listview inside this scrollview.I have one problem , when i run program it show's only one item in listview.my problem is xml file. How i can change my problem?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<ScrollView
android:id="#+id/scrollview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<RelativeLayout
android:id="#+id/layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:background="#5f2585" >
<Button
android:id="#+id/studia"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:background="#drawable/n_button"
android:text="სტუდია"
android:textColor="#ffffff" />
<ListView
android:id="#+id/menu_listview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/studia"
android:divider="#null"
>
</ListView>
<Button
android:id="#+id/gadacema"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_below="#+id/menu_listview"
android:background="#drawable/n_button"
android:text="გადაცემა"
android:textColor="#ffffff" />
</RelativeLayout>
in programmatically everything is ok(if i deleted scrollview,then i can show all values,but i cannot show button witch is a below in listview
What is wrong in my xml file. How can i solve this problem?
Please try this.
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<RelativeLayout
android:id="#+id/layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:background="#5f2585" >
<Button
android:id="#+id/studia"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:background="#drawable/n_button"
android:text="სტუდია"
android:textColor="#ffffff" />
<ListView
android:id="#+id/menu_listview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="#+id/studia"
android:divider="#null"
>
</ListView>
<Button
android:id="#+id/gadacema"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_below="#+id/menu_listview"
android:background="#drawable/n_button"
android:text="გადაცემა"
android:textColor="#ffffff" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
Try this:-
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<Button
android:id="#+id/studia"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:background="#drawable/n_button"
android:text="სტუდია"
android:textColor="#ffffff" />
<ListView
android:id="#+id/menu_listview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/studia"
android:divider="#null"/>
<Button
android:id="#+id/gadacema"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_below="#+id/menu_listview"
android:background="#drawable/n_button"
android:text="გადაცემა"
android:textColor="#ffffff" />
</RelativeLayout>

Issue in Login ScrollView.. ParentBottom elements also pop up with SoftKeyboard

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Login" >
<ImageView
android:id="#+id/logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_margin="5dp"
android:contentDescription="#string/app_name"
android:src="#drawable/logo_main" />
<TextView
android:id="#+id/tv_textBottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:clickable="true"
android:text="#string/label_copyright"
android:textColor="#color/text_grey" />
<ScrollView
android:id="#+id/sv_Login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/logo"
android:layout_marginTop="10dp" >
<RelativeLayout
android:id="#+id/rl_Login"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
//Inside this manage two editText for userId, Password
</RelativeLayout>
</ScrollView>
Also In manifest for Login, I set
android:windowSoftInputMode="adjustResize"
My Issue is when softKeybord popup.. the bottom text(tv_textBottom) moves up with keyboard..I tried it many ways, need scrollview and placed the parent bottom text in parent down itself..
Thanks in Advance...
//try this
**AndroidManifest.xml**
android:windowSoftInputMode="stateHidden"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:padding="5dp"
tools:context=".Login" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right">
<ImageView
android:id="#+id/logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:contentDescription="#string/app_name"
android:src="#drawable/logo_main" />
</LinearLayout>
<ScrollView
android:id="#+id/sv_Login"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_marginTop="10dp" >
<RelativeLayout
android:id="#+id/rl_Login"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
//Inside this manage two editText for userId, Password
</RelativeLayout>
</ScrollView>
<TextView
android:id="#+id/tv_textBottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:text="#string/label_copyright"
android:textColor="#color/text_grey"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"/>
</LinearLayout>

How to scroll a scrollview to come a subview in top in Android

I have a scroll view in my activity view,in this layout i will add dynamic content in 'ucontent','pcontent' by inflating another layout in a loop( the number of inflated layout changes with time).I need to scroll the scrollview sv so that the tiltle with 'titlep' comes in top when i click 'titlep'.
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/sv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#232323"
android:scrollbars="none" >
<LinearLayout
android:id="#+id/main"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="#232323"
android:orientation="vertical" >
<LinearLayout
android:id="#+id/titleu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#D84A49"
android:orientation="horizontal"
android:paddingBottom="7dp"
android:paddingTop="7dp" >
<ImageView
android:id="#+id/toggleu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="2dp"
android:src="#drawable/toggleu" />
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="title1....."
android:textColor="#ffffff" />
</LinearLayout>
<LinearLayout
android:id="#+id/ucontent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
</LinearLayout>
<LinearLayout
android:id="#+id/titlep"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="0dp"
android:layout_marginTop="5dp"
android:background="#D84A49"
android:orientation="horizontal"
android:paddingBottom="7dp"
android:paddingTop="7dp" >
<ImageView
android:id="#+id/togglep"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="2dp"
android:src="#drawable/toggleu" />
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight=".1"
android:text="title2...."
android:textColor="#ffffff" />
</LinearLayout>
<LinearLayout
android:id="#+id/pcontent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
</LinearLayout>
</LinearLayout>
How can i do that in my code or in xml?
Have a look at this:
Views
use isFocusable(true)
and on the onClick use requestFocus()

How to show layout on the bottom of ListView

I have a layout xml like below:
<?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="match_parent"
android:orientation="vertical" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:maxWidth="71dip"
android:src="#drawable/logo_top" >
</ImageView>
<ImageView
android:id="#+id/imageView2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:adjustViewBounds="false"
android:clickable="true"
android:maxHeight="70dip"
android:src="#drawable/registeration_title" >
</ImageView>
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="" >
</TextView>
<RelativeLayout
android:id="#+id/relativeLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:id="#+id/linearframe"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<FrameLayout
android:id="#+id/informationFrame"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal" >
<ImageView
android:id="#+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:src="#drawable/registeration_info1" />
<TextView
android:id="#+id/IDNumberTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="7dip"
android:layout_marginLeft="26dip"
android:text="TextView"
android:textColor="#drawable/textgreen" />
<TextView
android:id="#+id/EnableDateTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="7dip"
android:layout_marginLeft="140dip"
android:text="TextView"
android:textColor="#drawable/textgreen" />
</FrameLayout>
</LinearLayout>
<TextView
android:id="#+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/linearframe"
android:text=" " />
<ImageView
android:id="#+id/imageView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/textView2"
android:layout_centerHorizontal="true"
android:src="#drawable/buy_in_60" />
<ListView
android:id="#+id/listView1"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_alignLeft="#id/imageView5"
android:layout_alignRight="#id/imageView5"
android:layout_below="#id/imageView5" >
</ListView>
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" " />
<FrameLayout
android:id="#+id/frameLayout2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/listView1"
android:layout_centerHorizontal="true"
android:layout_marginLeft="79dp" >
<ImageView
android:id="#+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/registeration_info2" />
<TextView
android:id="#+id/VersionTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="48dip"
android:text="Version: 1.0"
android:textColor="#drawable/darkgreen" />
</FrameLayout>
<TextView
android:id="#+id/RevisionTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/frameLayout2"
android:layout_centerHorizontal="true"
android:layout_marginLeft="79dp"
android:text="Revision: 16"
android:textColor="#drawable/darkgreen" />
</RelativeLayout>
some layouts below the ListView in the xml will disappear on the screen
and I tried to put the ListView and other layouts below the ListView into a scrollView
but the ListView will shrink, it looks too small, so i remove the ScrollView,
how should i do to let them appear on the screen without ScrollView?
You need to set Weight to your layouts like this way..
like you can set ListView Weight is= 0.80 and Bottom View is = 0.20 make sure parent Linear layout Weight sum is = 1.
You can see this is my xml file having List View (80% screen) and bottom Bar layout for Google Ads (almost 20% screen).
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="1">
<LinearLayout
android:id="#+id/layVrt"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_weight="0.72"
android:weightSum="1">
<ListView
android:layout_width="match_parent"
android:id="#+id/listViewGame"
android:textFilterEnabled="true"
android:layout_height="350dp"
android:layout_weight="0.73"></ListView>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:gravity="center"
android:layout_width="match_parent"
android:layout_weight="0.20"
android:layout_marginTop="5dp"
android:background="#drawable/rounded_corners_white"
android:paddingLeft="3dp"
android:paddingRight="3dp"
android:layout_height="50dp"
android:layout_marginBottom="3dp"
android:id="#+id/layoutAdMobList">
</LinearLayout>
</LinearLayout>
so this will be the output..
Or you can try something like this:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ListView
android:id="#+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="#+id/bottom_bar" >
</ListView>
<LinearLayout
android:id="#+id/bottom_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="#drawable/bottom_bar"
android:gravity="center_vertical"
android:orientation="horizontal" >
<ToggleButton
android:id="#+id/slider_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_weight="1"
android:background="#drawable/bottom_toggle_button" />
<ToggleButton
android:id="#+id/list_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_weight="1"
android:background="#drawable/bottom_left_button" />
<ToggleButton
android:id="#+id/map_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#drawable/bottom_right_button" />
</LinearLayout>
</RelativeLayout>
Place everything inside a RelativeLayout and use android:layout_above="#+id/bottom_bar" on the ListView

Categories

Resources