I am making a Speed Dial App, which has Emergency Numbers hard-coded in it. Using nested Relative Layout and made a list of numbers.
Below is the Emergency Numbers Page.
This is a Page of Dialer App, where it has a dialer and this is the Speed Dial Section Fragment which is not scrollable.
Below is my XML fragment for the above image.
<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:padding="10dp"
android:orientation="vertical">
<!-- Relative Layouts Emergency Numbers Here - Logic - Increment Nums by 1-->
<RelativeLayout
android:background="#drawable/border"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingRight="10dp"
android:paddingBottom="0dp"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:id="#+id/relativeLayout2">
<RelativeLayout
android:id="#+id/relativeLayout"
android:layout_width="match_parent"
android:paddingBottom="10dp"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/imageView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true" />
<TextView
android:id="#+id/txtNama"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/imageView1"
android:layout_marginTop="12px"
android:gravity="left"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:paddingTop="5dp"
android:text="Emergency Number 1"
android:textAllCaps="true"
android:textSize="16sp"
android:textStyle="bold" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Call"
android:background="#drawable/btn_flat_blue_rounded_shadow"
android:textColor="#fff"
android:padding="10dp"
android:id="#+id/btnPolisi"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:background="#drawable/border"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingRight="10dp"
android:paddingBottom="0dp"
android:id="#+id/relativeLayout3"
android:layout_marginTop="8dp"
android:layout_below="#+id/relativeLayout2"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<RelativeLayout
android:id="#+id/relativeLayout4"
android:layout_width="match_parent"
android:paddingBottom="10dp"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/imageView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true" />
<TextView
android:id="#+id/txtNama1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/imageView2"
android:layout_marginTop="12px"
android:gravity="left"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:paddingTop="5dp"
android:text="Emergency Number 2"
android:textAllCaps="true"
android:textSize="16sp"
android:textStyle="bold" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Call"
android:background="#drawable/btn_flat_blue_rounded_shadow"
android:textColor="#fff"
android:padding="10dp"
android:id="#+id/btnRS"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:background="#drawable/border"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingRight="10dp"
android:paddingBottom="0dp"
android:id="#+id/relativeLayout5"
android:layout_marginTop="8dp"
android:layout_below="#+id/relativeLayout3"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<RelativeLayout
android:id="#+id/relativeLayout6"
android:layout_width="match_parent"
android:paddingBottom="10dp"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/imageView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true" />
<TextView
android:id="#+id/txtNama2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/imageView3"
android:layout_marginTop="12px"
android:gravity="left"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:paddingTop="5dp"
android:text="Emergency Number 3"
android:textAllCaps="true"
android:textSize="16sp"
android:textStyle="bold" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Call"
android:background="#drawable/btn_flat_blue_rounded_shadow"
android:textColor="#fff"
android:padding="10dp"
android:id="#+id/btnFire"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:background="#drawable/border"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingRight="10dp"
android:paddingBottom="0dp"
android:id="#+id/relativeLayout7"
android:layout_marginTop="8dp"
android:layout_below="#+id/relativeLayout5"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<RelativeLayout
android:id="#+id/relativeLayout8"
android:layout_width="match_parent"
android:paddingBottom="10dp"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/imageView4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true" />
<TextView
android:id="#+id/txtNama3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/imageView4"
android:layout_marginTop="12px"
android:gravity="left"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:paddingTop="5dp"
android:text="Emergency Number 4"
android:textAllCaps="true"
android:textSize="16sp"
android:textStyle="bold" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Call"
android:background="#drawable/btn_flat_blue_rounded_shadow"
android:textColor="#fff"
android:padding="10dp"
android:id="#+id/btnEmg4"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:background="#drawable/border"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingRight="10dp"
android:paddingBottom="0dp"
android:id="#+id/relativeLayout9"
android:layout_marginTop="8dp"
android:layout_below="#+id/relativeLayout7"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<RelativeLayout
android:id="#+id/relativeLayout10"
android:layout_width="match_parent"
android:paddingBottom="10dp"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/imageView5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true" />
<TextView
android:id="#+id/txtNama4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/imageView5"
android:layout_marginTop="12px"
android:gravity="left"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:paddingTop="5dp"
android:text="Emergency Number 5"
android:textAllCaps="true"
android:textSize="16sp"
android:textStyle="bold" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Call"
android:background="#drawable/btn_flat_blue_rounded_shadow"
android:textColor="#fff"
android:padding="10dp"
android:id="#+id/btnEmg5"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:background="#drawable/border"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingRight="10dp"
android:paddingBottom="0dp"
android:id="#+id/relativeLayout11"
android:layout_marginTop="8dp"
android:layout_below="#+id/relativeLayout9"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<RelativeLayout
android:id="#+id/relativeLayout12"
android:layout_width="match_parent"
android:paddingBottom="10dp"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/imageView6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true" />
<TextView
android:id="#+id/txtNama5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/imageView6"
android:layout_marginTop="12px"
android:gravity="left"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:paddingTop="5dp"
android:text="Emergency Number 6"
android:textAllCaps="true"
android:textSize="16sp"
android:textStyle="bold" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Call"
android:background="#drawable/btn_flat_blue_rounded_shadow"
android:textColor="#fff"
android:padding="10dp"
android:id="#+id/btnEmg6"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:background="#drawable/border"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingRight="10dp"
android:paddingBottom="0dp"
android:id="#+id/relativeLayout13"
android:layout_marginTop="8dp"
android:layout_below="#+id/relativeLayout11"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<RelativeLayout
android:id="#+id/relativeLayout14"
android:layout_width="match_parent"
android:paddingBottom="10dp"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/imageView7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true" />
<TextView
android:id="#+id/txtNama6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/imageView7"
android:layout_marginTop="12px"
android:gravity="left"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:paddingTop="5dp"
android:text="Emergency Number 7"
android:textAllCaps="true"
android:textSize="16sp"
android:textStyle="bold" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Call"
android:background="#drawable/btn_flat_blue_rounded_shadow"
android:textColor="#fff"
android:padding="10dp"
android:id="#+id/btnEmg7"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
I have tried with the ListView inside the nested relative layout. And even the scrollview for the same, some were fatal when used. I may be using some absurd logic in this code, but the view is great for me, I just need this code to make the layout scrollable. Kindly let me know where I need to change in my code to make the page scrollable.//
When I posted this question few logical issues were there in my layouts, now I have framed it logically and it;s inside a Linear Layout.
It isnt working anyway.
<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="wrap_content"
android:padding="10dp"
android:orientation="vertical">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
// Write here your whole code without writing first Relative Layout....
</RelativeLayout>
</ScrollView>
<RelativeLayout>
You need to put your layout inside a Scroll View. But a scroll view can have only ONE direct child. So what you need to do is take you top most relative layout and put that inside a scroll view. Something like this:
<ScrollView
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">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:orientation="vertical">
<RelativeLayout
android:background="#drawable/border"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingRight="10dp"
android:paddingBottom="0dp"
android:layout_marginTop="10dp"
android:layout_below="#+id/relativeLayout4"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:id="#+id/relativeLayout7">
<RelativeLayout
android:id="#+id/relativeLayout3"
android:layout_width="match_parent"
android:paddingBottom="10dp"
android:layout_height="wrap_content"
android:layout_below="#+id/textView5" >
<TextView
android:id="#+id/textView5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:background="#drawable/btn_flat_white"
android:gravity="center"
android:padding="5dp"
android:text="NEW"
android:textColor="#fff"
android:textStyle="bold"
android:visibility="gone" />
<ImageView
android:id="#+id/imageView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true" />
<TextView
android:id="#+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/imageView3"
android:layout_marginTop="12px"
android:gravity="left"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:paddingTop="5dp"
android:text="Emergency Number 3"
android:textAllCaps="true"
android:textSize="16sp"
android:textStyle="bold" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Call"
android:id="#+id/btnFire"
android:background="#drawable/btn_flat_blue_rounded_shadow"
android:textColor="#fff"
android:padding="10dp"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:background="#drawable/border"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingRight="10dp"
android:paddingBottom="0dp"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:id="#+id/relativeLayout2">
<TextView
android:id="#+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:background="#drawable/btn_flat_white"
android:gravity="center"
android:padding="5dp"
android:text="NEW"
android:textColor="#fff"
android:textStyle="bold"
android:visibility="gone" />
<RelativeLayout
android:id="#+id/relativeLayout"
android:layout_width="match_parent"
android:paddingBottom="10dp"
android:layout_height="wrap_content"
android:layout_below="#+id/textView" >
<ImageView
android:id="#+id/imageView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true" />
<TextView
android:id="#+id/txtNama"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/imageView2"
android:layout_marginTop="12px"
android:gravity="left"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:paddingTop="5dp"
android:text="Emergency Number 1"
android:textAllCaps="true"
android:textSize="16sp"
android:textStyle="bold" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Call"
android:background="#drawable/btn_flat_blue_rounded_shadow"
android:textColor="#fff"
android:padding="10dp"
android:id="#+id/btnPolisi"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:background="#drawable/border"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingRight="10dp"
android:paddingBottom="0dp"
android:layout_marginTop="10dp"
android:layout_below="#+id/relativeLayout2"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:id="#+id/relativeLayout4">
<TextView
android:id="#+id/tvnew"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:background="#drawable/btn_flat_white"
android:gravity="center"
android:padding="5dp"
android:text="NEW"
android:textColor="#fff"
android:textStyle="bold"
android:visibility="gone" />
<RelativeLayout
android:id="#+id/relativeLayout1"
android:layout_width="match_parent"
android:paddingBottom="10dp"
android:layout_height="wrap_content"
android:layout_below="#+id/tvnew" >
<ImageView
android:id="#+id/ivscreenshot"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true" />
<TextView
android:id="#+id/tvwords"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/ivscreenshot"
android:layout_marginTop="12px"
android:gravity="left"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:paddingTop="5dp"
android:text="Emergency Number 2"
android:textAllCaps="true"
android:textSize="16sp"
android:textStyle="bold" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Call"
android:id="#+id/btnRS"
android:background="#drawable/btn_flat_blue_rounded_shadow"
android:textColor="#fff"
android:padding="10dp"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:background="#drawable/border"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingRight="10dp"
android:paddingBottom="0dp"
android:id="#+id/relativeLayout5"
android:layout_marginTop="12dp"
android:layout_below="#+id/relativeLayout7"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<TextView
android:id="#+id/tvnew1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:background="#drawable/btn_flat_white"
android:gravity="center"
android:padding="5dp"
android:text="NEW"
android:textColor="#fff"
android:textStyle="bold"
android:visibility="gone" />
<RelativeLayout
android:id="#+id/relativeLayout6"
android:layout_width="match_parent"
android:paddingBottom="10dp"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignLeft="#+id/tvnew1"
android:layout_alignStart="#+id/tvnew1">
<ImageView
android:id="#+id/ivscreenshot1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true" />
<TextView
android:id="#+id/tvwords1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/ivscreenshot1"
android:layout_marginTop="12px"
android:gravity="left"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:paddingTop="5dp"
android:text="Emergency Number 4"
android:textAllCaps="true"
android:textSize="16sp"
android:textStyle="bold" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Call"
android:id="#+id/btnEmg4"
android:background="#drawable/btn_flat_blue_rounded_shadow"
android:textColor="#fff"
android:padding="10dp"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:background="#drawable/border"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingRight="10dp"
android:paddingBottom="0dp"
android:id="#+id/relativeLayout8"
android:layout_marginTop="16dp"
android:layout_below="#+id/relativeLayout5"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<TextView
android:id="#+id/tvnew2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:background="#drawable/btn_flat_white"
android:gravity="center"
android:padding="5dp"
android:text="NEW"
android:textColor="#fff"
android:textStyle="bold"
android:visibility="gone" />
<RelativeLayout
android:id="#+id/relativeLayout10"
android:layout_width="match_parent"
android:paddingBottom="10dp"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignLeft="#+id/tvnew2"
android:layout_alignStart="#+id/tvnew2">
<ImageView
android:id="#+id/ivscreenshot2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true" />
<TextView
android:id="#+id/tvwords2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/ivscreenshot1"
android:layout_marginTop="12px"
android:gravity="left"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:paddingTop="5dp"
android:text="Emergency Number 5"
android:textAllCaps="true"
android:textSize="16sp"
android:textStyle="bold" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Call"
android:id="#+id/btnEmg5"
android:background="#drawable/btn_flat_blue_rounded_shadow"
android:textColor="#fff"
android:padding="10dp"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:background="#drawable/border"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingRight="10dp"
android:paddingBottom="0dp"
android:id="#+id/relativeLayout11"
android:layout_marginTop="14dp"
android:layout_below="#+id/relativeLayout8"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<TextView
android:id="#+id/tvnew3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:background="#drawable/btn_flat_white"
android:gravity="center"
android:padding="5dp"
android:text="NEW"
android:textColor="#fff"
android:textStyle="bold"
android:visibility="gone" />
<RelativeLayout
android:id="#+id/relativeLayout12"
android:layout_width="match_parent"
android:paddingBottom="10dp"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignLeft="#+id/tvnew3"
android:layout_alignStart="#+id/tvnew3">
<ImageView
android:id="#+id/ivscreenshot3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true" />
<TextView
android:id="#+id/tvwords3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/ivscreenshot3"
android:layout_marginTop="12px"
android:gravity="left"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:paddingTop="5dp"
android:text="Emergency Number 6"
android:textAllCaps="true"
android:textSize="16sp"
android:textStyle="bold" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Call"
android:id="#+id/btnEmg6"
android:background="#drawable/btn_flat_blue_rounded_shadow"
android:textColor="#fff"
android:padding="10dp"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:background="#drawable/border"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingRight="10dp"
android:paddingBottom="0dp"
android:id="#+id/relativeLayout13"
android:layout_marginTop="7dp"
android:layout_below="#+id/relativeLayout11"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<TextView
android:id="#+id/tvnew4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:background="#drawable/btn_flat_white"
android:gravity="center"
android:padding="5dp"
android:text="NEW"
android:textColor="#fff"
android:textStyle="bold"
android:visibility="gone" />
<RelativeLayout
android:id="#+id/relativeLayout14"
android:layout_width="match_parent"
android:paddingBottom="10dp"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignLeft="#+id/tvnew4"
android:layout_alignStart="#+id/tvnew4">
<ImageView
android:id="#+id/ivscreenshot4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true" />
<TextView
android:id="#+id/tvwords4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/ivscreenshot4"
android:layout_marginTop="12px"
android:gravity="left"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:paddingTop="5dp"
android:text="Emergency Number 7"
android:textAllCaps="true"
android:textSize="16sp"
android:textStyle="bold" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Call"
android:id="#+id/btnEmg7"
android:background="#drawable/btn_flat_blue_rounded_shadow"
android:textColor="#fff"
android:padding="10dp"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
</ScrollView>
If you want to do with code:
ScrollView scrollview = new ScrollView(this);
scrollview.addView(wView);
Related
I have created a fragment and its xml code is as below:
<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.unss.pra.b.one_fragment"
android:background="#FFFFFF">
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="10dp">
<RelativeLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="10dp"
android:paddingRight="10dp"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="Download"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:textAlignment="center"
android:id="#+id/textView07"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
android:layout_toStartOf="#+id/dbutton1" />
<Button
android:layout_width="50dp"
android:layout_height="50dp"
android:background="#drawable/downloadicon"
android:id="#+id/dbutton1"
android:layout_alignParentEnd="true" />
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="\n"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:id="#+id/textView08"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true" />
<RelativeLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="Download"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:textAlignment="center"
android:id="#+id/textView02"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
android:layout_toStartOf="#+id/dbutton2" />
<Button
android:layout_width="50dp"
android:layout_height="50dp"
android:background="#drawable/downloadicon"
android:id="#+id/dbutton2"
android:layout_alignParentEnd="true" />
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="\n"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:layout_weight="2"
android:id="#+id/textView05"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true" />
<RelativeLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="Download"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:textAlignment="center"
android:id="#+id/textView04"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
android:layout_toStartOf="#+id/dbutton4" />
<Button
android:layout_width="50dp"
android:layout_height="50dp"
android:background="#drawable/downloadicon"
android:id="#+id/dbutton4"
android:layout_alignParentEnd="true" />
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="\n"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:layout_weight="2"
android:id="#+id/textView5"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true" />
<RelativeLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text=" Download"
android:textAlignment="center"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:id="#+id/textView6"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
android:layout_toStartOf="#+id/dbutton5" />
<Button
android:layout_width="50dp"
android:layout_height="50dp"
android:background="#drawable/downloadicon"
android:id="#+id/dbutton5"
android:layout_alignParentEnd="true" />
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="\n"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:layout_weight="2"
android:id="#+id/textView06"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true" />
<RelativeLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="Download"
android:textAlignment="center"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:id="#+id/textView10"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
android:layout_toStartOf="#+id/dbutton6" />
<Button
android:layout_width="50dp"
android:layout_height="50dp"
android:background="#drawable/downloadicon"
android:id="#+id/dbutton6"
android:layout_alignParentEnd="true" />
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="\n"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:layout_weight="2"
android:id="#+id/textView09"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true" />
<RelativeLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="Download"
android:textAlignment="center"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:id="#+id/textView03"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
android:layout_toStartOf="#+id/dbutton7" />
<Button
android:layout_width="50dp"
android:layout_height="50dp"
android:background="#drawable/downloadicon"
android:id="#+id/dbutton7"
android:layout_alignParentEnd="true" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
</RelativeLayout>
Keeping the idea:
Linear/Relative Layout
Scroll View
Linear Layout
//My layouts,
I have put Linear Scroll view, the layout is not getting scrolled. The layout just remains static. Please let me know why.
Try changing your Scrollview to : add android:layout_height="wrap_content"
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="true">
I tried your code, Removed a lot of lines of drawables and project info as it is customized for your own project.
The code is working fine, I can scroll. Maybe the problem lies in the images you are using, High res images sometimes do make your UI unresponsive / freeze. Make sure you look into that too.
I am attaching your code and a snapshot of how it appears to me. Code works fine.
<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="#FFFFFF">
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="10dp">
<RelativeLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="10dp"
android:paddingRight="10dp"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="Download"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:textAlignment="center"
android:id="#+id/textView07"
android:layout_centerVertical="true"
/>
<Button
android:layout_width="50dp"
android:layout_height="50dp"
android:id="#+id/dbutton1" />
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="\n"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:id="#+id/textView08"
android:layout_centerVertical="true"
/>
<RelativeLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="Download"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:textAlignment="center"
android:id="#+id/textView02"
android:layout_centerVertical="true" />
<Button
android:layout_width="50dp"
android:layout_height="50dp"
android:id="#+id/dbutton2"
/>
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="\n"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:layout_centerVertical="true"
/>
<RelativeLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="Download"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:textAlignment="center"
android:layout_centerVertical="true" />
<Button
android:layout_width="50dp"
android:layout_height="50dp"
/>
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="\n"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:layout_weight="2"
android:id="#+id/textView05"
android:layout_centerVertical="true"
/>
<RelativeLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="Download"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:textAlignment="center"
android:id="#+id/textView04"
android:layout_centerVertical="true" />
<Button
android:layout_width="50dp"
android:layout_height="50dp"
android:id="#+id/dbutton4"
/>
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="\n"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:layout_weight="2"
android:id="#+id/textView5"
android:layout_centerVertical="true"
/>
<RelativeLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text=" Download"
android:textAlignment="center"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:id="#+id/textView6"
android:layout_centerVertical="true"
/>
<Button
android:layout_width="50dp"
android:layout_height="50dp"
android:id="#+id/dbutton5" />
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="\n"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:layout_weight="2"
android:id="#+id/textView06"
android:layout_centerVertical="true"
/>
<RelativeLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="Download"
android:textAlignment="center"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:id="#+id/textView10"
android:layout_centerVertical="true"
/>
<Button
android:layout_width="50dp"
android:layout_height="50dp"
/>
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="\n"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:layout_weight="2"
android:id="#+id/textView09"
android:layout_centerVertical="true"/>
<RelativeLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="Download"
android:textAlignment="center"
android:textSize="20dp"
android:typeface="serif"
android:textColor="#000000"
android:id="#+id/textView03"
android:layout_centerVertical="true"
/>
<Button
android:layout_width="50dp"
android:layout_height="50dp"
/>
</RelativeLayout>
</LinearLayout>
</ScrollView>
</RelativeLayout>
My question may be [duplicate] i try all solutions but nothing work.
Activity declare in manifest
I am using adjustResize but its not work . i try adjustPan and other option but no one works.
<activity
android:name=".NotesActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize"></activity>
XML screen code
I am using scroll view but still cant prevent screen blockage .
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/colorPrimaryDark"
android:fitsSystemWindows="false"
android:focusable="true"
android:focusableInTouchMode="true">
<android.support.v7.widget.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:theme="#style/AppTheme">
<TextView
android:id="#+id/toolbar_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="#color/colorwhite"
android:textSize="18sp" />
</android.support.v7.widget.Toolbar>
<View
android:id="#+id/sep"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="#+id/toolbar"
android:background="#color/colorwhite" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/sep"
android:background="#color/colorPrimaryDark"
android:fillViewport="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:padding="15dp"
android:scrollbars="none">
<LinearLayout
android:id="#+id/llayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="visible">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Medical Certificate Issued:"
android:textColor="#color/colorwhite"
android:textSize="16sp" />
<RadioGroup
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="#drawable/round_edittext"
android:orientation="horizontal"
android:padding="8dp"
android:theme="#style/AppTheme3">
<RadioButton
android:id="#+id/radio_yes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:buttonTint="#color/colorblack"
android:onClick="onRadioButtonClicked"
android:paddingRight="10dp"
android:text="Yes"
android:textSize="18sp"
android:theme="#style/AppTheme3" />
<RadioButton
android:id="#+id/radio_no"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:buttonTint="#color/colorblack"
android:checked="true"
android:onClick="onRadioButtonClicked"
android:text="No"
android:textSize="18sp"
android:theme="#style/AppTheme3" />
</RadioGroup>
<LinearLayout
android:id="#+id/certificate_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:padding="25dp"
android:weightSum="2">
<TextView
android:id="#+id/certificate_from"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:layout_weight="1"
android:background="#drawable/round_edittext"
android:gravity="center_vertical|left"
android:maxLines="1"
android:minLines="1"
android:paddingBottom="8dp"
android:paddingLeft="5dp"
android:paddingTop="8dp"
android:text="From"
android:textColor="#color/colorblack" />
<TextView
android:id="#+id/certificate_to"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:layout_weight="1"
android:background="#drawable/round_edittext"
android:gravity="center_vertical|left"
android:maxLines="1"
android:minLines="1"
android:paddingBottom="8dp"
android:paddingLeft="5dp"
android:paddingTop="8dp"
android:text="To"
android:textColor="#color/colorblack" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Follow up required:"
android:textColor="#color/colorwhite"
android:textSize="16sp" />
<RadioGroup
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="#drawable/round_edittext"
android:orientation="horizontal"
android:padding="8dp"
android:theme="#style/AppTheme3">
<RadioButton
android:id="#+id/radio_follow_yes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:buttonTint="#color/colorblack"
android:paddingRight="10dp"
android:text="Yes"
android:textSize="18sp"
android:theme="#style/AppTheme3" />
<RadioButton
android:id="#+id/radio_follow_no"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:buttonTint="#color/colorblack"
android:checked="true"
android:text="No"
android:textSize="18sp"
android:theme="#style/AppTheme3" />
</RadioGroup>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:background="#drawable/round_edittext"
android:orientation="horizontal"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:weightSum="3">
<CheckBox
android:id="#+id/checkbox_sc"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_weight="1.1"
android:buttonTint="#color/colorblack"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:text="SC"
android:theme="#style/AppTheme3" />
<CheckBox
android:id="#+id/checkbox_p"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="1.1"
android:buttonTint="#color/colorblack"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:text="P"
android:theme="#style/AppTheme3" />
<CheckBox
android:id="#+id/checkbox_pt"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_weight="0.8"
android:buttonTint="#color/colorblack"
android:ems="3"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:text="PT"
android:theme="#style/AppTheme3" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="#drawable/round_edittext"
android:orientation="horizontal"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:weightSum="3">
<CheckBox
android:id="#+id/checkbox_rfb"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_weight="1.1"
android:buttonTint="#color/colorblack"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:text="RFB"
android:theme="#style/AppTheme3" />
<CheckBox
android:id="#+id/checkbox_path"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_weight="1.1"
android:buttonTint="#color/colorblack"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:text="PATH"
android:theme="#style/AppTheme3" />
<CheckBox
android:id="#+id/checkbox_ref"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_weight="0.8"
android:buttonTint="#color/colorblack"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:text="REF"
android:theme="#style/AppTheme3" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/edit"
android:text="Your Signature:"
android:textColor="#color/colorwhite"
android:textSize="16sp" />
<TextView
android:id="#+id/remove"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginTop="10dp"
android:background="#drawable/round_line"
android:ems="5"
android:gravity="center"
android:maxLines="1"
android:paddingBottom="8dp"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:paddingTop="8dp"
android:text="Remove"
android:textColor="#color/colorwhite" />
<TextView
android:id="#+id/edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="20dp"
android:layout_marginTop="10dp"
android:layout_toLeftOf="#+id/remove"
android:background="#drawable/round_line"
android:ems="5"
android:gravity="center"
android:maxLines="1"
android:paddingBottom="8dp"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:paddingTop="8dp"
android:text="Edit"
android:textColor="#color/colorwhite" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="#drawable/round_edittext">
<TextView
android:id="#+id/add"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:minLines="7"
android:text="Add your signature!"
android:textColor="#color/colorblack"
android:textSize="20sp"
android:textStyle="bold" />
<ImageView
android:id="#+id/signature_img"
android:layout_width="wrap_content"
android:layout_height="200dp"
android:layout_alignBottom="#+id/add"
android:layout_alignLeft="#+id/add"
android:layout_alignRight="#+id/add"
android:layout_alignTop="#+id/add" />
</RelativeLayout>
<Button
android:id="#+id/submit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="#drawable/round_green"
android:gravity="center"
android:maxLines="1"
android:paddingBottom="8dp"
android:paddingLeft="5dp"
android:paddingTop="8dp"
android:text="Submit"
android:textColor="#color/colorwhite"
android:textSize="18sp" />
</LinearLayout>
</ScrollView>
<ProgressBar
android:id="#+id/login_progress"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginBottom="8dp"
android:visibility="gone" />
Try adding alignParentBottom to your ScrollView. So when your parent will be stretched, the ScrollView will follow and be stretched as well. Let me know if that works!
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/sep"
android:layout_alignParentBottom="true"
android:background="#color/colorPrimaryDark"
android:focusable="true"
android:focusableInTouchMode="true"
android:padding="15dp"
android:scrollbars="none">
i use just
android:windowSoftInputMode="stateHidden|adjustResize"
and it works in my applications
How to fix background image with scrollview when windowSoftInputMode appears.
I used windowSoftInputMode="adjustPan",but scrollview doesn't work
completely, please help me. Last fields do not appear when virtual keyboard
appears.
I want that background image should not scroll up with virtual keyboard
and scrollview should show all the fields inside it while scrolling.
Here is my code
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#drawable/back">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/cancel_done_btn"
android:layout_marginLeft="30dp"
android:layout_marginTop="40dp"
android:textSize="17dp"
android:paddingTop="10dp"
android:textStyle="bold"
android:paddingBottom="10dp"
android:paddingLeft="28dp"
android:paddingRight="28dp"
android:text="#string/cancel"
android:id="#+id/btn_cancel_signin"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/cancel_done_btn"
android:layout_marginRight="30dp"
android:layout_marginTop="40dp"
android:textSize="17dp"
android:text="#string/done"
android:paddingTop="10dp"
android:textStyle="bold"
android:paddingBottom="10dp"
android:paddingLeft="35dp"
android:paddingRight="35dp"
android:layout_alignParentRight="true"
android:id="#+id/btn_done_signin"
/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="120dp"
android:layout_marginLeft="40dp"
android:orientation="vertical"
android:layout_below="#+id/btn_cancel_signin">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="times new roman"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Tuesday,May"
android:textSize="25dp"
android:textStyle="bold"
android:id="#+id/tv_day_month" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="times new roman"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text=" 7,2016"
android:textSize="25dp"
android:textStyle="bold"
android:id="#+id/tv_date" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="200dp"
android:layout_marginLeft="130dp"
android:layout_below="#+id/btn_cancel_signin">
<ImageView
android:id="#+id/iv_signin_logo"
android:layout_width="200dp"
android:layout_height="180dp"
android:src="#drawable/sign_in_logo"
android:layout_marginTop="10dp" />
</LinearLayout>
<ScrollView
android:layout_width="350dp"
android:layout_height="wrap_content"
android:id="#+id/scroller_sign_in"
android:layout_below="#+id/btn_done_signin"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true">
<LinearLayout
android:orientation="vertical"
android:paddingLeft="10dp"
android:layout_marginRight="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="30dp">
<TextView
android:layout_height="wrap_content"
android:text="First Name"
style="#style/sign_in_text"
android:id="#+id/label_firstname"
android:layout_alignParentLeft="true"
android:paddingTop="10dp"
android:inputType="textCapWords"
/>
<AutoCompleteTextView
android:id="#+id/et_firstname"
android:hint="Required"
android:ems="10"
android:textSize="20dp"
android:padding="10dp"
android:layout_width="160dp"
android:background="#drawable/et_border"
android:layout_height="wrap_content"
android:inputType="textCapWords"
android:layout_alignParentRight="true"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="20dp"
>
<TextView
android:layout_height="wrap_content"
android:text="Last Name"
android:layout_width="wrap_content"
android:paddingRight="10dp"
android:gravity="left"
android:id="#+id/label_lastname"
android:paddingTop="10dp"
android:layout_alignParentLeft="true"
android:inputType="textCapWords"
/>
<AutoCompleteTextView
android:id="#+id/et_lastname"
android:hint="Required"
android:ems="10"
android:textSize="20dp"
android:textAllCaps="true"
android:padding="10dp"
android:layout_width="160dp"
android:background="#drawable/et_border"
android:layout_alignParentRight="true"
android:layout_height="wrap_content"
android:inputType="textCapWords"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="20dp"
android:id="#+id/ll_company"
>
<TextView
android:layout_height="wrap_content"
android:text="Company"
android:layout_width="wrap_content"
android:paddingRight="10dp"
android:gravity="left"
android:layout_marginTop="10dp"
android:id="#+id/label_company"
android:layout_alignParentLeft="true"
/>
<AutoCompleteTextView
android:id="#+id/et_company"
android:ems="10"
android:textSize="20dp"
android:padding="10dp"
android:textAllCaps="true"
android:layout_width="160dp"
android:background="#drawable/et_border"
android:layout_height="wrap_content"
android:inputType="textCapWords"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
<!--android:background="#drawable/contact_edittext_bg"-->
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="20dp"
android:id="#+id/ll_address"
>
<TextView
android:layout_height="wrap_content"
android:text="Address"
android:layout_width="wrap_content"
android:paddingRight="10dp"
android:gravity="left"
android:id="#+id/label_address"
android:paddingTop="15dp"
/>
<AutoCompleteTextView
android:id="#+id/et_address"
android:ems="10"
android:textSize="20dp"
android:padding="10dp"
android:layout_width="160dp"
android:background="#drawable/et_border"
android:layout_height="wrap_content"
android:inputType="textCapWords"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="20dp"
android:id="#+id/ll_city"
>
<TextView
android:layout_width="wrap_content"
android:paddingRight="10dp"
android:gravity="left"
android:layout_height="wrap_content"
android:text="City"
android:id="#+id/label_city"
android:paddingTop="15dp"
/>
<AutoCompleteTextView
android:id="#+id/et_city"
android:ems="10"
android:textSize="20dp"
android:padding="10dp"
android:layout_width="160dp"
android:background="#drawable/et_border"
android:layout_alignParentRight="true"
android:layout_height="wrap_content"
android:inputType="textCapWords"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="20dp"
android:id="#+id/ll_state"
>
<AutoCompleteTextView
android:id="#+id/et_state"
android:ems="10"
android:textSize="20dp"
android:padding="10dp"
android:layout_width="160dp"
android:background="#drawable/et_border"
android:layout_alignParentRight="true"
android:layout_height="wrap_content"
android:inputType="textCapWords"/>
<TextView
android:layout_height="wrap_content"
android:text="State"
style="#style/sign_in_text"
android:id="#+id/label_state"
android:paddingTop="15dp"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="20dp"
android:id="#+id/ll_zip_code"
>
<TextView
android:layout_height="wrap_content"
android:text="Zip Code"
android:layout_width="wrap_content"
android:paddingRight="10dp"
android:gravity="left"
android:id="#+id/label_zip_code"
android:paddingTop="15dp"
/>
<AutoCompleteTextView
android:id="#+id/et_zipcode"
android:ems="10"
android:layout_width="160dp"
android:background="#drawable/et_border"
android:textSize="20dp"
android:padding="10dp"
android:layout_height="wrap_content"
android:inputType="number"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
</RelativeLayout>
remove this from xml.
android:background="#drawable/back"
Write in your java file.
getWindow().setBackgroundDrawableResource(R.drawable.back);
I have a floating action button over a listview, but I can't click on the button when the list fills up so that the button and the list overlap. In that situation only the list item is clickable. How do I rectify this issue? Thanks in advance. My xml code is below.
<?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.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="#+id/card_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="3dp"
android:paddingBottom="10dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp"
card_view:cardCornerRadius="1dp"
card_view:cardElevation="5dp">
<RelativeLayout
android:id="#+id/layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="#+id/frameLayout"
android:layout_centerHorizontal="true"
android:layout_gravity="bottom"
android:background="#000000"
android:orientation="vertical"
android:padding="1.5dp"
android:weightSum="1">
<TextView
android:id="#+id/txtTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:background="#660033"
android:text="Large Text"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#android:color/primary_text_dark" />
<RelativeLayout
android:id="#+id/frameLayout"
android:layout_width="fill_parent"
android:layout_height="300dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginTop="29dp"
android:background="#android:color/darker_gray"
android:padding="2dp">
<TextView
android:id="#+id/txtLocation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_below="#+id/dispLoc"
android:layout_gravity="left|top"
android:text="[Location]"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="#+id/txtDesc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_below="#+id/dispDesc"
android:layout_gravity="left|center_vertical"
android:layout_marginTop="1dp"
android:text="[Description]"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="#+id/dispLoc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:text="#string/loc"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/dispDesc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_below="#+id/txtLocation"
android:layout_gravity="left|center_vertical"
android:layout_marginTop="17dp"
android:text="#string/desc"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/dispContact"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_below="#+id/txtDesc"
android:layout_marginTop="25dp"
android:text="#string/contact"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/txtContact"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/dispContact"
android:layout_toEndOf="#+id/dispLoc"
android:autoLink="email"
android:text="[ContactInfo]"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="#+id/From"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_below="#+id/dispContact"
android:layout_marginTop="16dp"
android:text="#string/from"
android:textColor="#android:color/primary_text_light" />
<TextView
android:id="#+id/txtStartDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#+id/From"
android:layout_marginLeft="10dp"
android:layout_toEndOf="#+id/From"
android:text="[Start Date]"
android:textColor="#android:color/secondary_text_light" />
<TextView
android:id="#+id/To"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_below="#+id/txtStartDate"
android:text="#string/to"
android:textColor="#android:color/primary_text_light" />
<TextView
android:id="#+id/txtEndDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/txtStartDate"
android:layout_alignTop="#+id/To"
android:text="[End Date]"
android:textColor="#android:color/secondary_text_light" />
<Button
android:id="#+id/attend_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:text="Attend" />
<Button
android:id="#+id/cancel_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignStart="#+id/txtContact"
android:text="Cancel" />
</RelativeLayout>
<TextView
android:id="#+id/txtType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/txtTitle"
android:layout_alignEnd="#+id/txtTitle"
android:text="Type"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#android:color/primary_text_dark" />
</RelativeLayout>
</android.support.v7.widget.CardView>
<TextView
android:id="#+id/peopleAttending"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/card_view"
android:background="#660033"
android:text="#string/people_attending"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#android:color/primary_text_dark" />
<org.lucasr.twowayview.TwoWayView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/lvItems"
style="#style/TwoWayView"
android:layout_width="match_parent"
android:layout_height="37dp"
android:layout_below="#+id/peopleAttending"
android:drawSelectorOnTop="false"
tools:context=".DetailedEventActivity" />
<com.software.shell.fab.ActionButton xmlns:fab="http://schemas.android.com/apk/res-auto"
android:id="#+id/action_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_marginBottom="#dimen/fab_margin"
android:layout_marginEnd="#dimen/fab_margin"
fab:button_color="#color/fab_material_red_500"
fab:button_colorPressed="#color/fab_material_red_900"
fab:hide_animation="#anim/fab_roll_to_down"
fab:image="#drawable/fab_plus_icon"
fab:image_size="24dp"
fab:shadow_color="#757575"
fab:shadow_radius="1.0dp"
fab:shadow_xOffset="0.5dp"
fab:shadow_yOffset="1.0dp"
fab:show_animation="#anim/fab_roll_from_down"
fab:stroke_color="#color/fab_material_blue_grey_500"
fab:stroke_width="1.0dp"
fab:type="DEFAULT"
android:clickable="true"/>
<ListView
android:id="#+id/commentsList"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:layout_below="#+id/lvItems"
android:layout_marginTop="0dp"
/>
Move your FAB to the bottom of the XML (below the ListView).
I have a problem, I have a long layout so I need it will be scrollable. But I need two listview in it. I have made using linearlayout and in forcycle I add a items in it. But I have lost all functions what listview offers and I want to use them.
Do anybody knows, how looks like "events" view in facebook app? It looks like there are a lot of listviews (birthdays, events, ...) and whole view is scrollable. I need something like this.
Thank you for ansver. :)
EDIT: There is my xml (There are two LinearLayouts: #+id/passengersList and #+id/discussionList and I want use ListViews instead):
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/travelDetailScroll"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#f8ffe1"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingRight="5dp"
android:paddingLeft="5dp">
<TextView
android:id="#+id/travelId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone" />
<RelativeLayout
android:id="#+id/header"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:id="#+id/waypoints"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="5dp"
android:textColor="#333333"
android:textSize="16sp" />
<ImageView
android:id="#+id/travelMap"
android:layout_width="70dp"
android:layout_height="70dp"
android:paddingLeft="0dp"
android:paddingTop="0dp"
android:paddingRight="8dp"
android:layout_below="#+id/waypoints"
android:contentDescription="#string/travel_detail" />
<TextView
android:id="#+id/driver"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/waypoints"
android:layout_toRightOf="#+id/travelMap"
android:textColor="#333333"
android:textSize="14sp" />
<TextView
android:id="#+id/car"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/driver"
android:layout_toRightOf="#+id/travelMap"
android:paddingBottom="10dp"
android:textColor="#333333"
android:textSize="14sp" />
<TextView
android:id="#+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/waypoints"
android:textColor="#aaaaaa"
android:layout_alignParentRight="true"
android:textSize="14sp" />
<TextView
android:id="#+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/date"
android:layout_alignParentRight="true"
android:textColor="#aaaaaa"
android:textSize="14sp" />
<ImageView
android:id="#+id/icon_price"
android:layout_below="#+id/car"
android:layout_toRightOf="#+id/travelMap"
android:layout_width="20dp"
android:layout_height="20dp"
android:paddingLeft="0dp"
android:paddingTop="0dp"
android:paddingRight="6dp"
android:contentDescription="#string/travel_price" />
<TextView
android:id="#+id/price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/car"
android:layout_toRightOf="#+id/icon_price"
android:paddingRight="40dp"
android:textColor="#333333"
android:textSize="14sp" />
<ImageView
android:id="#+id/icon_seats"
android:layout_below="#+id/car"
android:layout_toRightOf="#+id/price"
android:layout_gravity="center|center_vertical"
android:layout_width="20dp"
android:layout_height="20dp"
android:paddingLeft="0dp"
android:paddingTop="0dp"
android:paddingRight="6dp"
android:contentDescription="#string/travel_seats" />
<TextView
android:id="#+id/seats"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/car"
android:layout_toRightOf="#+id/icon_seats"
android:layout_gravity="center|center_vertical"
android:paddingBottom="10dp"
android:textColor="#333333"
android:textSize="14sp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/buttons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/header"
android:layout_centerHorizontal="true" >
<RelativeLayout
android:id="#+id/buttonsLeft"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<Button
android:id="#+id/btn_travel_login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/travel_login" />
<Button
android:id="#+id/btn_travel_logout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/travel_logout"
android:visibility="gone" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/buttonsRight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="8dp"
android:layout_toRightOf="#+id/buttonsLeft" >
<Button
android:id="#+id/btn_travel_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/travel_edit"
android:visibility="gone" />
<Button
android:id="#+id/btn_travel_watch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/travel_watch"
android:visibility="gone" />
<Button
android:id="#+id/btn_travel_unwatch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/travel_unwatch"
android:visibility="gone" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="#+id/buttons"
android:paddingTop="10dp">
<TextView
android:id="#+id/driverTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center|center_vertical"
android:paddingBottom="2dp"
android:textColor="#333333"
android:textSize="14sp"
android:text="#string/driver_title" />
<RelativeLayout
android:id="#+id/driverInfo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/driverTitle"
android:background="#f8ffe1">
<ImageView
android:id="#+id/driverPhoto"
android:layout_width="65dp"
android:layout_height="65dp"
android:paddingRight="8dp"
android:paddingLeft="0dp"
android:paddingTop="0dp" />
<TextView
android:id="#+id/driverName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="5dp"
android:layout_toRightOf="#+id/driverPhoto"
android:textColor="#333333"
android:textSize="16sp" />
<TextView
android:id="#+id/driverEmail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/driverName"
android:layout_toRightOf="#+id/driverPhoto"
android:textColor="#999999"
android:textSize="14sp" />
<TextView
android:id="#+id/driverPhone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/driverEmail"
android:layout_toRightOf="#+id/driverPhoto"
android:paddingBottom="10dp"
android:textColor="#333333"
android:textSize="14sp" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/passengersInfo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/driverInfo"
android:paddingTop="10dp">
<TextView
android:id="#+id/passengersTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center|center_vertical"
android:paddingTop="7dp"
android:paddingBottom="2dp"
android:textColor="#333333"
android:textSize="14sp"
android:text="#string/passengers_title" />
<TextView
android:id="#+id/noPassengers"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_below="#+id/passengersTitle"
android:textColor="#333333"
android:textSize="14sp"
android:text="#string/no_passengers"
android:visibility="gone" />
<LinearLayout
android:id="#+id/passengersList"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_below="#+id/passengersTitle"
android:orientation="vertical" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/discussion"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/passengersInfo"
android:paddingTop="10dp">
<TextView
android:id="#+id/discussionTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="2dp"
android:textColor="#333333"
android:textSize="14sp"
android:text="#string/discussion_title" />
<LinearLayout
android:id="#+id/discussionList"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_below="#+id/discussionTitle"
android:orientation="vertical" />
<TextView
android:id="#+id/addMessageLink"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="7dp"
android:paddingBottom="2dp"
android:textColor="#8ec83e"
android:textSize="14sp"
android:layout_below="#+id/discussionList"
android:layout_centerHorizontal="true"
android:text="#string/add_message" />
<LinearLayout android:id="#+id/newMessageLayout"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_below="#+id/addMessageLink"
android:orientation="horizontal"
android:paddingTop="7dp"
android:paddingBottom="2dp"
android:visibility="gone">
<EditText
android:id="#+id/newMessage"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="#333333"
android:textSize="14sp"
android:hint="#string/new_message"
android:layout_weight="3" />
<Button
android:id="#+id/addMessage"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="#333333"
android:textSize="14sp"
android:hint="#string/send_message"
android:layout_gravity="right"
android:layout_weight="1" />
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:id="#+id/waypointsDetail"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/discussion"
android:paddingTop="10dp">
<TextView
android:id="#+id/waypointsTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="2dp"
android:textColor="#333333"
android:textSize="14sp"
android:text="#string/waypoints_title" />
<LinearLayout android:id="#+id/waypointsList"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_below="#+id/waypointsTitle"
android:orientation="vertical" />
<TextView
android:id="#+id/waypointsSummary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:paddingBottom="2dp"
android:textColor="#333333"
android:textSize="14sp"
android:layout_below="#+id/waypointsList" />
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
</ScrollView>