Vertical line in XML for notification in Android - android

I have created a custom notification XML file. I would like to draw a vertical line like the horizontal line in the below picture. I have been trying various ways couldn't achieve it. The orientation in xml from horizontal to vertical didn't help me.
Check my screenshot below:I would like to get the vertical line instead of the red line.
Tried the following code:
<LinearLayout
android:id="#+id/horizontalLayout"
android:layout_width="match_parent"
android:layout_height="2dip"
android:background="#000000"
android:orientation="vertical" >
</LinearLayout>
Below is my 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:background="#151515"
android:baselineAligned="false"
android:orientation="horizontal" >
<LinearLayout
android:id="#+id/iconimagelayout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:paddingLeft="5dp" >
<ImageView
android:id="#+id/iconimage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="#string/icon"
android:src="#drawable/cancel" />
</LinearLayout>
<LinearLayout
android:id="#+id/NameLayout"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".70"
android:orientation="vertical"
android:paddingLeft="10sp" >
<LinearLayout
android:id="#+id/topTextlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#2E2E2E"
android:gravity="center_horizontal"
android:paddingBottom="5dp" >
<TextView
android:id="#+id/topText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="5dp"
android:text="TITLE"
android:textColor="#FFFFFF"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/horizontalLayout"
android:layout_width="match_parent"
android:layout_height="2dip"
android:background="#000000"
android:orientation="horizontal" >
</LinearLayout>
<LinearLayout
android:id="#+id/textLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#1C1C1C"
android:paddingTop="5dp" >
<TextView
android:id="#+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:paddingLeft="5dp"
android:text="MESSAGE BODY"
android:textColor="#FFFFFF"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/horizontalLayout2"
android:layout_width="match_parent"
android:layout_height="2dip"
android:background="#000000"
android:orientation="horizontal" >
</LinearLayout>
<LinearLayout
android:id="#+id/alldismisslayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#2E2E2E" >
<ImageView
android:id="#+id/dismissicon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="#string/dismissicon"
android:src="#drawable/cancel" />
<LinearLayout
android:id="#+id/dismissLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center|left" >
<TextView
android:id="#+id/dismissText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:text="#string/notificationdismiss"
android:textColor="#FFFFFF"
android:textSize="18sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
Not sure where exactly I have to put the vertical line code.

You can use following to create the vertical line.
<View
android:layout_width="4dip"
android:layout_height="match_parent"
android:background="#FF000000"/>
Put this code after your first cancel imageview.So that your final code becomes
<LinearLayout
android:id="#+id/iconimagelayout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:paddingLeft="5dp" >
<ImageView
android:id="#+id/iconimage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="#string/icon"
android:src="#drawable/cancel" />
</LinearLayout>
<View
android:layout_width="4dip"
android:layout_height="match_parent"
android:background="#FF000000"/>
<LinearLayout
android:id="#+id/NameLayout"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".70"
android:orientation="vertical"
android:paddingLeft="10sp" >
<LinearLayout
android:id="#+id/topTextlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#2E2E2E"
android:gravity="center_horizontal"
android:paddingBottom="5dp" >
<TextView
android:id="#+id/topText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="5dp"
android:text="TITLE"
android:textColor="#FFFFFF"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/horizontalLayout"
android:layout_width="match_parent"
android:layout_height="2dip"
android:background="#000000"
android:orientation="horizontal" >
</LinearLayout>
<LinearLayout
android:id="#+id/textLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#1C1C1C"
android:paddingTop="5dp" >
<TextView
android:id="#+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:paddingLeft="5dp"
android:text="MESSAGE BODY"
android:textColor="#FFFFFF"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/horizontalLayout2"
android:layout_width="match_parent"
android:layout_height="2dip"
android:background="#000000"
android:orientation="horizontal" >
</LinearLayout>
<LinearLayout
android:id="#+id/alldismisslayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#2E2E2E" >
<ImageView
android:id="#+id/dismissicon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="#string/dismissicon"
android:src="#drawable/cancel" />
<LinearLayout
android:id="#+id/dismissLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center|left" >
<TextView
android:id="#+id/dismissText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:text="#string/notificationdismiss"
android:textColor="#FFFFFF"
android:textSize="18sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
Hope it helps.

Just use proper backgrounds and margin if you need
Here is the screenshot
XML
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#151515"
android:baselineAligned="false"
>
<ImageView
android:id="#+id/iconimage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/topText"
android:contentDescription="string/icon"
android:src="#drawable/ic_launcher" />
<TextView
android:id="#+id/topText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#2E2E2E"
android:layout_centerHorizontal="true"
android:text="TITLE"
android:textColor="#FFFFFF"
android:textSize="18sp" />
<TextView
android:id="#+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:layout_below="#+id/topText"
android:layout_toRightOf="#+id/iconimage"
android:layout_margin="10dp"
android:background="#1C1C1C"
android:text="MESSAGE BODY"
android:textColor="#FFFFFF"
android:textSize="18sp" />
<ImageView
android:id="#+id/dismissicon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/text"
android:layout_toRightOf="#+id/iconimage"
android:contentDescription="string/dismissicon"
android:src="#drawable/ic_launcher" />
<TextView
android:id="#+id/dismissText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:layout_toRightOf="#+id/dismissicon"
android:layout_below="#+id/text"
android:background="#2E2E2E"
android:text="notificationdismiss"
android:textColor="#FFFFFF"
android:textSize="18sp" />
<TextView android:layout_width="2dp"
android:layout_height="wrap_content"
android:background="#ff0000"
android:layout_alignRight="#+id/iconimage"
android:layout_alignBottom="#+id/dismissicon"
android:layout_alignTop="#+id/topText"
/>
</RelativeLayout>

hey try this with less layout hierarchy
<?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="wrap_content"
android:background="#1C1C1C"
android:baselineAligned="false"
android:orientation="horizontal" >
<ImageView
android:id="#+id/iconimage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="#drawable/cancel" />
<View
android:layout_width="3dp"
android:layout_height="fill_parent"
android:layout_marginLeft="3dp"
android:background="#color/GREEN" />
<LinearLayout
android:id="#+id/NameLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:id="#+id/topTextlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#2E2E2E"
android:gravity="center_horizontal"
android:paddingBottom="5dp" >
<TextView
android:id="#+id/topText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingTop="5dp"
android:text="TITLE"
android:textColor="#color/WHITE"
android:textSize="18sp" />
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="3dp"
android:background="#color/your_color" />
<LinearLayout
android:id="#+id/textLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#1C1C1C"
android:paddingTop="5dp" >
<TextView
android:id="#+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:paddingLeft="5dp"
android:text="MESSAGE BODY"
android:textColor="#FFFFFF"
android:textSize="18sp" />
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="3dp"
android:background="#color/GREEN" />
<LinearLayout
android:id="#+id/alldismisslayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#2E2E2E" >
<TextView
android:id="#+id/dismissText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="#drawable/cancel"
android:drawablePadding="5dp"
android:paddingLeft="5dp"
android:text="#string/notificationdismiss"
android:textColor="#FFFFFF"
android:textSize="18sp" />
</LinearLayout>
</LinearLayout>

Try this way,hope this will help you to solve your problem.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#151515"
android:baselineAligned="false"
android:orientation="horizontal" >
<LinearLayout
android:id="#+id/iconimagelayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:paddingLeft="5dp" >
<ImageView
android:id="#+id/iconimage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="#string/icon"
android:src="#drawable/ic_launcher" />
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="#FF0000"/>
<LinearLayout
android:id="#+id/NameLayout"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
android:paddingLeft="10dp">
<LinearLayout
android:id="#+id/topTextlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#2E2E2E"
android:gravity="center_horizontal"
android:padding="10dp">
<TextView
android:id="#+id/topText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TITLE"
android:textColor="#FFFFFF"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/horizontalLayout"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#000000"
android:orientation="horizontal" >
</LinearLayout>
<LinearLayout
android:id="#+id/textLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#1C1C1C"
android:padding="10dp">
<TextView
android:id="#+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="MESSAGE BODY"
android:textColor="#FFFFFF"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/horizontalLayout2"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#000000"
android:orientation="horizontal" >
</LinearLayout>
<LinearLayout
android:id="#+id/alldismisslayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#2E2E2E"
android:gravity="center">
<ImageView
android:id="#+id/dismissicon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="#string/dismissicon"
android:src="#drawable/ic_launcher" />
<LinearLayout
android:id="#+id/dismissLayout"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:gravity="center"
android:paddingLeft="5dp">
<TextView
android:id="#+id/dismissText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/notificationdismiss"
android:textColor="#FFFFFF"
android:textSize="18sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>

Try This:
Create one colored vertical line 9 patch image
then use that image in View in android xml file
Change your XML file like:
<?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:background="#151515"
android:baselineAligned="false"
android:orientation="horizontal" >
<LinearLayout
android:id="#+id/iconimagelayout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal"
android:layout_marginRight="10dp"
android:paddingLeft="5dp" >
<ImageView
android:id="#+id/iconimage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="icon"
android:src="#drawable/ic_launcher" />
<View
android:layout_width="1dp"
android:layout_height="fill_parent"
android:background="#drawable/untitled" />
</LinearLayout>
<LinearLayout
android:id="#+id/NameLayout"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".70"
android:orientation="vertical"
android:paddingLeft="10sp" >
<LinearLayout
android:id="#+id/topTextlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#2E2E2E"
android:gravity="center_horizontal"
android:paddingBottom="5dp" >
<TextView
android:id="#+id/topText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="5dp"
android:text="TITLE"
android:textColor="#FFFFFF"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/horizontalLayout"
android:layout_width="match_parent"
android:layout_height="2dip"
android:background="#000000"
android:orientation="horizontal" >
</LinearLayout>
<LinearLayout
android:id="#+id/textLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#1C1C1C"
android:paddingTop="5dp" >
<TextView
android:id="#+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:paddingLeft="5dp"
android:text="MESSAGE BODY"
android:textColor="#FFFFFF"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/horizontalLayout2"
android:layout_width="match_parent"
android:layout_height="2dip"
android:background="#000000"
android:orientation="horizontal" >
</LinearLayout>
<LinearLayout
android:id="#+id/alldismisslayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#2E2E2E" >
<ImageView
android:id="#+id/dismissicon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="dismissicon"
android:src="#drawable/ic_launcher" />
<LinearLayout
android:id="#+id/dismissLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center|left" >
<TextView
android:id="#+id/dismissText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:text="notificationdismiss"
android:textColor="#FFFFFF"
android:textSize="18sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
Here in:
<View
android:layout_width="1dp"
android:layout_height="fill_parent"
android:background="#drawable/untitled" />
untitled is my 9 patch image.
9 patch image because it could be stretched as per the screen resolution

Related

Scrollview not working

This is my coding i have added a toolbar and i want the data below to scroll but its scrolling entirely.I Tried many solution in SO but still its of No use.Pls check and if found any error help me
Thanks in Advance
<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="com.agna.hrm_sainmarks.Address" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/White"
android:orientation="vertical" >
<include
android:id="#+id/emergencytoolbar"
layout="#layout/emergency_toolbar" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="horizontal"
android:padding="5dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="#string/name"
android:textSize="18dp" />
<TextView
android:id="#+id/primname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:text="Ajith Kumar"
android:textSize="18dp" />
</LinearLayout>
<View
android:id="#+id/View01"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#color/Hrmbg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="horizontal"
android:padding="5dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="#string/relationship"
android:textSize="18dp" />
<TextView
android:id="#+id/primrelationship"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:text="Brother"
android:textSize="18dp" />
</LinearLayout>
<View
android:id="#+id/View02"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#color/Hrmbg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="horizontal"
android:padding="5dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="#string/phone"
android:textSize="18dp" />
<TextView
android:id="#+id/primphone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:text="9998885231"
android:textSize="18dp" />
</LinearLayout>
<View
android:id="#+id/View03"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#color/Hrmbg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="horizontal"
android:padding="5dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/taddress"
android:textSize="18dp" />
<TextView
android:id="#+id/primaddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:text="78,Muthu nagar 3rd Street,Coimbatore-44"
android:textSize="18dp" />
</LinearLayout>
<View
android:id="#+id/View04"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#color/Hrmbg" />
</ScrollView>
</LinearLayout>
</RelativeLayout>
emergency_toolbar
<?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"
android:orientation="vertical" >
<!-- <android.support.v7.widget.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:background="#color/Hrmtool"
android:minHeight="?attr/actionBarSize"
android:theme="#style/ThemeOverlay.AppCompat.Dark"
android:titleTextColor="#color/Red" > -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:textColor="#color/Black"
android:weightSum="2"
>
<Button
android:id="#+id/pemergency"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:clickable="#color/Hrmbg"
android:layout_weight="1"
android:textSize="18dp"
android:text="#string/pemergency"
android:textColor="#color/Black" />
<Button
android:id="#+id/semergency"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:clickable="#color/Hrmbg"
android:layout_weight="1"
android:textSize="18dp"
android:text="#string/semergency"
android:textColor="#color/Black" />
</LinearLayout>
<!-- </android.support.v7.widget.Toolbar> -->
</RelativeLayout>
You need to do just few changes.
In emergency_toolbar.xml change the layout_height of RelativeLayout and LinearLayout to wrap_content.
In activity_main.xml put <include.... code outside LinearLayout and Inside of RelativeLayout.
You have to add LinearLayout just after ScrollView to wrap WHOLE fields as ScrollView can hold only one DIRECT CHILD.
Most important point: Add too many address field as you can see SCROLL at runtime. Just copy-paste address field and change the ids field of them.
Below is screen shot, which I have got as Outcome. And See this CodeLink.
Hope this will help.
ScrollView hold only one view as Childview try this code
<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="com.agna.hrm_sainmarks.Address">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/White"
android:orientation="vertical">
<include
android:id="#+id/emergencytoolbar"
layout="#layout/emergency_toolbar" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="horizontal"
android:padding="5dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="#string/name"
android:textSize="18dp" />
<TextView
android:id="#+id/primname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:text="Ajith Kumar"
android:textSize="18dp" />
</LinearLayout>
<View
android:id="#+id/View01"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#color/Hrmbg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="horizontal"
android:padding="5dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="#string/relationship"
android:textSize="18dp" />
<TextView
android:id="#+id/primrelationship"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:text="Brother"
android:textSize="18dp" />
</LinearLayout>
<View
android:id="#+id/View02"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#color/Hrmbg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="horizontal"
android:padding="5dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="#string/phone"
android:textSize="18dp" />
<TextView
android:id="#+id/primphone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:text="9998885231"
android:textSize="18dp" />
</LinearLayout>
<View
android:id="#+id/View03"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#color/Hrmbg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="horizontal"
android:padding="5dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/taddress"
android:textSize="18dp" />
<TextView
android:id="#+id/primaddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:text="78,Muthu nagar 3rd Street,Coimbatore-44"
android:textSize="18dp" />
</LinearLayout>
<View
android:id="#+id/View04"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#color/Hrmbg" />
</LinearLayout>
</ScrollView>
</LinearLayout>
As Scroll View can hold only one direct child.You need to define it above Your Main Linear Layout. Also use Scroll Bars Property in Scroll View.
EDIT :
Move your Tool Bar Layout above Scroll View.
Try this code.
<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="com.agna.hrm_sainmarks.Address">
<include
android:id="#+id/emergencytoolbar"
layout="#layout/toolbar" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/emergencytoolbar"
android:scrollbars="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FFFFFF"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="horizontal"
android:padding="5dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="#string/app_name"
android:textSize="18dp" />
<TextView
android:id="#+id/primname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:text="Ajith Kumar"
android:textSize="18dp" />
</LinearLayout>
<View
android:id="#+id/View01"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#FFFFFF" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="horizontal"
android:padding="5dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="#string/app_name"
android:textSize="18dp" />
<TextView
android:id="#+id/primrelationship"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:text="Brother"
android:textSize="18dp" />
</LinearLayout>
<View
android:id="#+id/View02"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#FFFFFF" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="horizontal"
android:padding="5dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="phone"
android:textSize="18dp" />
<TextView
android:id="#+id/primphone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:text="9998885231"
android:textSize="18dp" />
</LinearLayout>
<View
android:id="#+id/View03"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#FFFFFF" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="horizontal"
android:padding="5dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/app_name"
android:textSize="18dp" />
<TextView
android:id="#+id/primaddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:text="78,Muthu nagar 3rd Street,Coimbatore-44"
android:textSize="18dp" />
</LinearLayout>
<View
android:id="#+id/View04"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#FFFFFF" />
</LinearLayout>
</ScrollView>
</RelativeLayout>
Try this, I tried to add data to it and then scrolled. The views below toolbar are being scrolled as expected:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="#string/appbar_scrolling_view_behavior"
tools:context="in.net.codestar.ratingbar.MainActivity"
tools:showIn="#layout/activity_main">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/White"
android:orientation="vertical" >
<include
android:id="#+id/emergencytoolbar"
layout="#layout/emergency_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="horizontal"
android:padding="5dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="#string/name"
android:textSize="18dp" />
<TextView
android:id="#+id/primname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:text="Ajith Kumar"
android:textSize="18dp" />
</LinearLayout>
<View
android:id="#+id/View01"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#color/Hrmbg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="horizontal"
android:padding="5dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="#string/relationship"
android:textSize="18dp" />
<TextView
android:id="#+id/primrelationship"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:text="Brother"
android:textSize="18dp" />
</LinearLayout>
<View
android:id="#+id/View02"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#color/Hrmbg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="horizontal"
android:padding="5dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="#string/phone"
android:textSize="18dp" />
<TextView
android:id="#+id/primphone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:text="9998885231"
android:textSize="18dp" />
</LinearLayout>
<View
android:id="#+id/View03"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#color/Hrmbg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="horizontal"
android:padding="5dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/taddress"
android:textSize="18dp" />
<TextView
android:id="#+id/primaddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:text="78,Muthu nagar 3rd Street,Coimbatore-4478,Muthu nagar 3rd Street,Coimbatore-44"
android:textSize="18dp" />
</LinearLayout>
<View
android:id="#+id/View04"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#color/Hrmbg" />
</LinearLayout>
</ScrollView>
</LinearLayout>
</RelativeLayout>
emergency_toobar.xml :
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="wrap_content"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:textColor="#color/Black"
android:weightSum="2"
>
<Button
android:id="#+id/pemergency"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:clickable="#color/Hrmbg"
android:layout_weight="1"
android:textSize="18dp"
android:text="#string/pemergency"
android:textColor="#color/Black" />
<Button
android:id="#+id/semergency"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:clickable="#color/Hrmbg"
android:layout_weight="1"
android:textSize="18dp"
android:text="#string/semergency"
android:textColor="#color/Black" />
</LinearLayout>
</RelativeLayout>
The following two lines solved my problem:
android:lines="4"
android:maxLines="4"
now it's working.

How to put a button between two layouts

I want to put a normal button between two layouts as showing in image.
I do not want to use floating button and coordinator layout.
Is it possible by relative layout ?
Demo Image
I am using following xml file to do it.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="10" >
<fragment
android:id="#+id/mapForPlannedRide"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="3.5" />
<LinearLayout
android:id="#+id/planned_detail_layout"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="6.5"
android:background="#color/text_white"
android:orientation="vertical"
android:weightSum="10" >
<LinearLayout
android:id="#+id/departure_layout"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="2.5"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="20dp"
android:paddingRight="20dp" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/passenger" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="5dp" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="#string/departure"
android:textSize="#dimen/text_size17sp" />
<TextView
android:id="#+id/departure"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="dfg ddfghd dfdg"
android:textSize="#dimen/text_size14sp" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight=".03"
android:background="#color/line_color" />
<LinearLayout
android:id="#+id/destination_layout"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="2.5"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="20dp"
android:paddingRight="20dp" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/passenger" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="5dp" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="#string/destination"
android:textSize="#dimen/text_size17sp" />
<TextView
android:id="#+id/destination"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Dilshad Garden Delhi"
android:textSize="#dimen/text_size14sp" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight=".03"
android:background="#color/line_color" />
<LinearLayout
android:id="#+id/date_time_layout"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1.5"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="20dp"
android:paddingRight="20dp" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/passenger" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="5dp" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="#string/date_time"
android:textSize="#dimen/text_size17sp" />
<TextView
android:id="#+id/date_time"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="10:00 a.m."
android:textSize="#dimen/text_size14sp" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight=".03"
android:background="#color/line_color" />
<LinearLayout
android:id="#+id/chosen_vehicle_layout"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1.5"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="20dp"
android:paddingRight="20dp" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/passenger" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="5dp" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="#string/chosen_vehicle"
android:textSize="#dimen/text_size17sp" />
<TextView
android:id="#+id/chosen_vehicle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Dus One"
android:textSize="#dimen/text_size14sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
I have tried this check below code using RelativeLayout :
<?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"
android:orientation="vertical">
<fragment
android:id="#+id/mapForPlannedRide"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="180dp" />
<LinearLayout
android:id="#+id/departure_layout"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_below="#+id/mapForPlannedRide"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="20dp"
android:paddingRight="20dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/passenger" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="5dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="#string/departure"
android:textSize="#dimen/text_size17sp" />
<TextView
android:id="#+id/departure"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="dfg ddfghd dfdg"
android:textSize="#dimen/text_size14sp" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight=".03"
android:background="#color/line_color" />
<LinearLayout
android:id="#+id/destination_layout"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_below="#+id/departure_layout"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="20dp"
android:paddingRight="20dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/passenger" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="5dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="#string/destination"
android:textSize="#dimen/text_size17sp" />
<TextView
android:id="#+id/destination"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Dilshad Garden Delhi"
android:textSize="#dimen/text_size14sp" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight=".03"
android:background="#color/line_color" />
<LinearLayout
android:id="#+id/date_time_layout"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_below="#+id/destination_layout"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="20dp"
android:paddingRight="20dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/passenger" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="5dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="#string/date_time"
android:textSize="#dimen/text_size17sp" />
<TextView
android:id="#+id/date_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="10:00 a.m."
android:textSize="#dimen/text_size14sp" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight=".03"
android:background="#color/line_color" />
<LinearLayout
android:id="#+id/chosen_vehicle_layout"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_below="#+id/date_time_layout"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="20dp"
android:paddingRight="20dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/passenger" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="5dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="#string/chosen_vehicle"
android:textSize="#dimen/text_size17sp" />
<TextView
android:id="#+id/chosen_vehicle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Dus One"
android:textSize="#dimen/text_size14sp" />
</LinearLayout>
</LinearLayout>
<ImageView
android:layout_width="100dp"
android:layout_height="50"
android:layout_alignParentBottom="false"
android:layout_alignParentRight="true"
android:layout_centerHorizontal="true"
android:layout_marginRight="20dp"
android:layout_marginTop="150dp"
android:src="#android:drawable/ic_reminder" />
</RelativeLayout>

how to add footer in given in android

<?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:background="#00b9e8"
android:orientation="vertical" >
<!-- <include layout="#layout/header" /> -->
<LinearLayout
android:id="#+id/header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:background="#ffffff"
android:gravity="center"
android:padding="5dp" >
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Search Status"
android:textColor="#0060a4"
android:textSize="#dimen/font_15dp" />
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1" />
<ImageView
android:id="#+id/setting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/settings" />
<ImageView
android:id="#+id/searchstatus_imgBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/back_icon" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="40dp" >
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.35"
android:background="#drawable/round_bg"
android:padding="10dp" >
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Status"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#0060a4"
android:textSize="20dp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_weight="0.65"
android:background="#drawable/round_bg"
android:gravity="center"
android:padding="8dp" >
<TextView
android:id="#+id/status"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:gravity="center"
android:text="Accepted"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#0060a4"
android:textSize="20dp" />
<ImageView
android:id="#+id/imageView1"
android:layout_width="40dip"
android:layout_height="40dip"
android:paddingLeft="25dip" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="40dp" >
<LinearLayout
android:id="#+id/linearlayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.35"
android:background="#drawable/round_bg"
android:padding="10dp" >
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Reason"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#0060a4"
android:textSize="20dp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearlayout2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_weight="0.65"
android:background="#drawable/round_bg"
android:gravity="center"
android:padding="10dp" >
<TextView
android:id="#+id/reason"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#0060a4"
android:textSize="20dp" />
</LinearLayout>
</LinearLayout>
</LinearLayot>
This is my code i want to add one Footer but i am unable to do this i dont know why this Problem is coming even i have take relative layout then also its not working please tell me how add one footer plz Help
Try this method and better to use relative layout for 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">
<LinearLayout
android:layout_alignParentTop="true"
android:layout_above="#+id/footer"
android:id="#+id/content"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#999"
android:layout_margin="4dp"
>
<TextView
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Content"
android:gravity="center"
android:padding="20dp"
android:textColor="#fff"
/>
</LinearLayout>
<LinearLayout
android:layout_alignParentBottom="true"
android:id="#+id/footer"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="FOOTER"
android:gravity="center"
android:padding="20dp"
android:textColor="#fff"
android:background="#666"
/>
</LinearLayout>
</RelativeLayout>
this will give like this .is that you want ?

Make style for single listview item (unwanted scaling)

Hey i wanna make specific single item row for my listView but don't know exacly how to handle it.
i.stack.imgur.com/9fUmX.png
I made something like this using weights on linear layout but it's not working correctly when additional info is too long.
i.stack.imgur.com/uG43j.png
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#android:color/transparent"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="100dp"
android:background="#55000000" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:orientation="horizontal"
android:weightSum="10" >
<!-- pomysle jeszcze nad wagami -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="2" >
<RelativeLayout
android:layout_width="60dp"
android:layout_height="match_parent" >
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" >
<TextView
android:id="#+id/JsonItemDataNumberOfTheDayFree"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:text="21"
android:textColor="#FFF"
android:textSize="15sp" />
<TextView
android:id="#+id/JsonItemDataMonthFree"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/JsonItemDataNumberOfTheDayFree"
android:layout_centerHorizontal="true"
android:text="CZE"
android:textColor="#FFF"
android:textSize="13sp" />
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="7"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<!-- tu nie jestem pewny margin top? -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="#+id/JsonItemTitleEventFree"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:singleLine="true"
android:text="Title"
android:textColor="#android:color/white"
android:textSize="18sp" />
<TextView
android:id="#+id/JsonItemAdditionalInfoFree"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="Additional Info"
android:textColor="#android:color/white"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="#+id/JsonItemDateFree"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginBottom="10dp"
android:text="Date"
android:textColor="#android:color/white"
android:textSize="10sp" />
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width="20dp"
android:layout_height="100dp"
android:layout_weight="1" >
<ImageView
android:id="#+id/JsonItemLogoCategoryFree"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#drawable/category_music"
android:scaleType="fitStart" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
try this
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#55000000"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="2" >
<RelativeLayout
android:layout_width="60dp"
android:layout_height="match_parent" >
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" >
<TextView
android:id="#+id/JsonItemDataNumberOfTheDayFree"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:text="21"
android:textColor="#FFF"
android:textSize="15sp" />
<TextView
android:id="#+id/JsonItemDataMonthFree"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/JsonItemDataNumberOfTheDayFree"
android:layout_centerHorizontal="true"
android:text="CZE"
android:textColor="#FFF"
android:textSize="13sp" />
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="7"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:layout_gravity="top"
android:id="#+id/JsonItemTitleEventFree"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:singleLine="true"
android:text="Title"
android:textColor="#android:color/white"
android:textSize="18sp" />
<TextView
android:id="#+id/JsonItemAdditionalInfoFree"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="Additional Info"
android:textColor="#android:color/white"
android:textSize="14sp" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="#+id/JsonItemDateFree"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginBottom="10dp"
android:text="Date"
android:textColor="#android:color/white"
android:textSize="10sp" />
</RelativeLayout>
</RelativeLayout>
<LinearLayout
android:layout_width="20dp"
android:layout_height="100dp"
android:layout_weight="1" >
<ImageView
android:id="#+id/JsonItemLogoCategoryFree"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/category_music"
android:scaleType="fitStart" />
</LinearLayout>

Android XML problems with 3 linearlayouts

I have got some trouble with layouts inside my page. I want make a dialog with 6 radio buttons, ImageView, and 6 seekbars and confirm button. But if i add a button i can't see it. It allways samwhere disapiard.
Here is sampe, what i want to make:
http://prntscr.com/3ywtnt
I think the seekbars take over to much place and than button fall down ...
Here is code
<?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="wrap_content"
android:orientation="vertical"
android:weightSum="8"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="4"
>
<RadioGroup
android:id="#+id/radioGroup1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<RadioButton
android:id="#+id/blur"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Blur" />
<RadioButton
android:id="#+id/outer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Outer" />
<RadioButton
android:id="#+id/inner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Inner" />
<RadioButton
android:id="#+id/pencil"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Pencil" />
<RadioButton
android:id="#+id/emboss"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Emboss" />
/>
</RadioGroup>
<ImageView
android:id="#+id/widthImageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="4"
>
<ScrollView
android:id="#+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="false" >
<LinearLayout
android:id="#+id/linearLayoutSeekbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="16" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="2" >
<TextView
android:id="#+id/ime1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="Width" />
<TextView
android:id="#+id/vrednost1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="10" />
</LinearLayout>
<SeekBar
android:id="#+id/seekBar1"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="2" >
<TextView
android:id="#+id/ime2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="Width text" />
<TextView
android:id="#+id/vrednost2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="10" />
</LinearLayout>
<SeekBar
android:id="#+id/seekBar2"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="2" >
<TextView
android:id="#+id/ime3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="Width text" />
<TextView
android:id="#+id/vrednost3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="10" />
</LinearLayout>
<SeekBar
android:id="#+id/seekBar3"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="2" >
<TextView
android:id="#+id/ime4"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="Width text" />
<TextView
android:id="#+id/vrednost4"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="10" />
</LinearLayout>
<SeekBar
android:id="#+id/seekBar4"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="2" >
<TextView
android:id="#+id/ime5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="Width text" />
<TextView
android:id="#+id/vrednost5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="10" />
</LinearLayout>
<SeekBar
android:id="#+id/seekBar5"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="2" >
<TextView
android:id="#+id/ime6"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="Width text" />
<TextView
android:id="#+id/vrednost6"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="10" />
</LinearLayout>
<SeekBar
android:id="#+id/seekBar6"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="1" >
<Button android:id="#+id/btn_ok1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="4"
android:text="Ok"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
activity_main:
================
<?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="wrap_content"
android:orientation="vertical"
android:weightSum="8" >
<LinearLayout
android:id="#+id/radiogrouplayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<RadioGroup
android:id="#+id/radioGroup1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="2" >
<RadioButton
android:id="#+id/blur"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Blur" />
<ImageView
android:id="#+id/widthImageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:paddingLeft="70dp"
android:src="#drawable/ic_launcher" />
</LinearLayout>
<RadioButton
android:id="#+id/outer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Outer" />
<RadioButton
android:id="#+id/inner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Inner" />
<RadioButton
android:id="#+id/pencil"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Pencil" />
<RadioButton
android:id="#+id/emboss"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Emboss" />
</RadioGroup>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/bottombar"
android:layout_below="#+id/radiogrouplayout"
android:orientation="horizontal" >
<ScrollView
android:id="#+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="false" >
<LinearLayout
android:id="#+id/linearLayoutSeekbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ScrollView
android:layout_width="fill_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical|center"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp"
android:weightSum="2" >
<TextView
android:id="#+id/ime2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="Width text" />
<TextView
android:id="#+id/vrednost2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="10" />
<SeekBar
android:id="#+id/seekBar2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp"
android:weightSum="2" >
<TextView
android:id="#+id/ime2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="Width text" />
<TextView
android:id="#+id/vrednost2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="10" />
<SeekBar
android:id="#+id/seekBar2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp"
android:weightSum="2" >
<TextView
android:id="#+id/ime2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="Width text" />
<TextView
android:id="#+id/vrednost2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="10" />
<SeekBar
android:id="#+id/seekBar2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp"
android:weightSum="2" >
<TextView
android:id="#+id/ime2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="Width text" />
<TextView
android:id="#+id/vrednost2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="10" />
<SeekBar
android:id="#+id/seekBar2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp"
android:weightSum="2" >
<TextView
android:id="#+id/ime2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="Width text" />
<TextView
android:id="#+id/vrednost2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="10" />
<SeekBar
android:id="#+id/seekBar2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp"
android:weightSum="2" >
<TextView
android:id="#+id/ime2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="Width text" />
<TextView
android:id="#+id/vrednost2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="10" />
<SeekBar
android:id="#+id/seekBar2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp"
android:weightSum="2" >
<TextView
android:id="#+id/ime2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="Width text" />
<TextView
android:id="#+id/vrednost2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="10" />
<SeekBar
android:id="#+id/seekBar2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp"
android:weightSum="2" >
<TextView
android:id="#+id/ime2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="Width text" />
<TextView
android:id="#+id/vrednost2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="10" />
<SeekBar
android:id="#+id/seekBar2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp"
android:weightSum="2" >
<TextView
android:id="#+id/ime2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="Width text" />
<TextView
android:id="#+id/vrednost2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="10" />
<SeekBar
android:id="#+id/seekBar2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp"
android:weightSum="2" >
<TextView
android:id="#+id/ime2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="Width text" />
<TextView
android:id="#+id/vrednost2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="10" />
<SeekBar
android:id="#+id/seekBar2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp"
android:weightSum="2" >
<TextView
android:id="#+id/ime2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="Width text" />
<TextView
android:id="#+id/vrednost2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="10" />
<SeekBar
android:id="#+id/seekBar2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp"
android:weightSum="2" >
<TextView
android:id="#+id/ime2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="Width text" />
<TextView
android:id="#+id/vrednost2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="10" />
<SeekBar
android:id="#+id/seekBar2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
</ScrollView>
</LinearLayout>
<LinearLayout
android:id="#+id/bottombar"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:weightSum="3" >
<Button
android:id="#+id/btn_ok1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="4"
android:text="Ok" />
</LinearLayout>
</RelativeLayout>

Categories

Resources