I have this problem...
This is a screenshot of my XML File in Android Studio
this is the code...
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="#color/gris_300"
android:orientation="vertical">
<ImageView
android:id="#+id/imageView4"
android:layout_width="fill_parent"
android:layout_height="200dp"
android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="0dp"
android:layout_marginTop="0dp"
android:scaleType="fitXY"
android:src="#drawable/image" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_below="#+id/imageView4"
android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_marginTop="-50dp">
<Button
android:id="#+id/button4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/selector_oval"
android:text="AGREGAR ITEMS"
android:textColor="#color/white"
android:layout_below="#+id/imageView4"
android:layout_centerHorizontal="true"
android:layout_above="#+id/linearLayout3"
android:padding="10dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp" />
<LinearLayout
android:id="#+id/linearLayout3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:background="#color/white"
android:clickable="false"
android:orientation="vertical"
android:layout_marginTop="-20dp">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="#+id/ll_ver_pedido"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="50dp"
android:orientation="horizontal">
<ImageView
android:id="#+id/imageView18"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/carrito" />
<TextView
android:id="#+id/textView19"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="#string/text_menu3"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<LinearLayout
android:id="#+id/ll_ver_estado"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<ImageView
android:id="#+id/imageView13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_estado" />
<TextView
android:id="#+id/textView6"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="#string/text_menu1"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<LinearLayout
android:id="#+id/ll_llamar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<ImageView
android:id="#+id/imageView26"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_llamar" />
<TextView
android:id="#+id/textView23"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="#string/text_menu7"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<LinearLayout
android:id="#+id/ll_ver_mesa"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<ImageView
android:id="#+id/imageView16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_ver_mesa" />
<TextView
android:id="#+id/textView18"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="#string/text_menu2"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<ImageView
android:id="#+id/imageView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_pedido" />
<TextView
android:id="#+id/textView10"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="Ver mi ticket"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<LinearLayout
android:id="#+id/ll_pagar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<ImageView
android:id="#+id/imageView24"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_pagar" />
<TextView
android:id="#+id/textView22"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="#string/text_menu6"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<ImageView
android:id="#+id/imageView43"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_pagar" />
<TextView
android:id="#+id/textView46"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="Mis rewards"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<LinearLayout
android:id="#+id/ll_uber"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<ImageView
android:id="#+id/imageView42"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_pagar" />
<TextView
android:id="#+id/textView42"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="Llamar a un taxi/uber"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<ImageView
android:id="#+id/imageView44"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_pagar" />
<TextView
android:id="#+id/textView54"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="Regalar una gift card"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
</LinearLayout>
and this is a screnshot of my device...
I tried Framelayout...relative...
Help!
Thanks!
Final code
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="#color/gris_300"
android:orientation="vertical">
<ImageView
android:id="#+id/imageView4"
android:layout_width="fill_parent"
android:layout_height="200dp"
android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="0dp"
android:layout_marginTop="0dp"
android:scaleType="fitXY"
android:src="#drawable/image" />
<FrameLayout
android:layout_width="fill_parent"
android:layout_below="#+id/imageView4"
android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_marginTop="-30dp">
<LinearLayout
android:id="#+id/linearLayout3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:background="#color/white"
android:clickable="false"
android:orientation="vertical"
android:layout_marginTop="20dp">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="#+id/ll_ver_pedido"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="50dp"
android:orientation="horizontal">
<ImageView
android:id="#+id/imageView18"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/carrito" />
<TextView
android:id="#+id/textView19"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="#string/text_menu3"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<LinearLayout
android:id="#+id/ll_ver_estado"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<ImageView
android:id="#+id/imageView13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_estado" />
<TextView
android:id="#+id/textView6"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="#string/text_menu1"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<LinearLayout
android:id="#+id/ll_llamar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<ImageView
android:id="#+id/imageView26"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_llamar" />
<TextView
android:id="#+id/textView23"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="#string/text_menu7"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<LinearLayout
android:id="#+id/ll_ver_mesa"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<ImageView
android:id="#+id/imageView16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_ver_mesa" />
<TextView
android:id="#+id/textView18"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="#string/text_menu2"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<ImageView
android:id="#+id/imageView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_pedido" />
<TextView
android:id="#+id/textView10"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="Ver mi ticket"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<LinearLayout
android:id="#+id/ll_pagar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<ImageView
android:id="#+id/imageView24"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_pagar" />
<TextView
android:id="#+id/textView22"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="#string/text_menu6"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<ImageView
android:id="#+id/imageView43"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_pagar" />
<TextView
android:id="#+id/textView46"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="Mis rewards"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<LinearLayout
android:id="#+id/ll_uber"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<ImageView
android:id="#+id/imageView42"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_pagar" />
<TextView
android:id="#+id/textView42"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="Llamar a un taxi/uber"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<ImageView
android:id="#+id/imageView44"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_pagar" />
<TextView
android:id="#+id/textView54"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="Regalar una gift card"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
<Button
android:id="#+id/button4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/selector_oval"
android:text="AGREGAR ITEMS"
android:textColor="#color/white"
android:layout_below="#+id/imageView4"
android:layout_centerHorizontal="true"
android:layout_above="#+id/linearLayout3"
android:padding="10dp"
android:layout_gravity="center_horizontal" />
</FrameLayout>
Related
My scollview is not scrolling. I tried putting the scrollView inside a linear layout but still not working. I am trying the scroll view in landscape mode.Also bonus question, is there a layout that i can wrap my code into so that i can have my app be perfect on all screen sizes from small screen to big tablets.
<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"
android:background="#drawable/bg"
android:fillViewport="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="110dp"
android:padding="10dp"
android:weightSum="2">
<LinearLayout
android:id="#+id/number"
android:layout_width="150dp"
android:layout_height="130dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"
android:layout_marginTop="0dp"
android:background="#color/category_colors"
android:gravity="center"
android:orientation="vertical"
android:weightSum="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/numbers1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="NUMBERS"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout6"
android:layout_width="150dp"
android:layout_height="130dp"
android:layout_alignBottom="#+id/linearLayout9"
android:layout_marginBottom="0dp"
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"
android:background="#color/category_colors"
android:gravity="center"
android:orientation="vertical"
android:weightSum="1"
tools:ignore="RtlCompat">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/family1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="FAMILY"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout7"
android:layout_width="150dp"
android:layout_height="130dp"
android:layout_alignBottom="#+id/number"
android:layout_marginBottom="0dp"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:layout_toEndOf="#+id/number"
android:background="#color/category_home"
android:gravity="center"
android:orientation="vertical"
android:weightSum="1"
android:layout_toRightOf="#+id/number">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/colors1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="COLORS"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout8"
android:layout_width="150dp"
android:layout_height="130dp"
android:layout_alignBottom="#+id/linearLayout7"
android:layout_marginBottom="0dp"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:layout_toEndOf="#+id/linearLayout7"
android:layout_toRightOf="#+id/linearLayout7"
android:background="#color/category_home"
android:gravity="center"
android:orientation="vertical"
android:weightSum="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/nouns1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="VERBS"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout9"
android:layout_width="150dp"
android:layout_height="130dp"
android:layout_below="#+id/linearLayout7"
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"
android:layout_marginTop="10dp"
android:layout_toLeftOf="#+id/linearLayout8"
android:layout_toStartOf="#+id/linearLayout8"
android:background="#color/category_colors"
android:gravity="center"
android:orientation="vertical"
android:weightSum="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/verbs1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="NOUNS"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout10"
android:layout_width="150dp"
android:layout_height="130dp"
android:layout_alignBottom="#+id/linearLayout9"
android:layout_marginBottom="0dp"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:layout_toEndOf="#+id/linearLayout9"
android:layout_toRightOf="#+id/linearLayout9"
android:background="#color/category_colors"
android:gravity="center"
android:orientation="vertical"
android:weightSum="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/phrases1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="PHRASES"
android:textStyle="bold" />
</LinearLayout>
</RelativeLayout>
Try this as per your layout use HorizontalScrollView
<HorizontalScrollView 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="#color/colorPrimary"
android:fillViewport="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="110dp"
android:padding="10dp"
android:weightSum="2">
<LinearLayout
android:id="#+id/number"
android:layout_width="150dp"
android:layout_height="130dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"
android:layout_marginTop="0dp"
android:background="#color/cardview_shadow_end_color"
android:gravity="center"
android:orientation="vertical"
android:weightSum="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/kid" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="NUMBERS"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout6"
android:layout_width="150dp"
android:layout_height="130dp"
android:layout_alignBottom="#+id/linearLayout9"
android:layout_marginBottom="0dp"
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"
android:background="#color/colorRed"
android:gravity="center"
android:orientation="vertical"
android:weightSum="1"
tools:ignore="RtlCompat">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/kid" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="FAMILY"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout7"
android:layout_width="150dp"
android:layout_height="130dp"
android:layout_alignBottom="#+id/number"
android:layout_marginBottom="0dp"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:layout_toEndOf="#+id/number"
android:background="#color/colorRed"
android:gravity="center"
android:orientation="vertical"
android:weightSum="1"
android:layout_toRightOf="#+id/number">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/kid" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="COLORS"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout8"
android:layout_width="150dp"
android:layout_height="130dp"
android:layout_alignBottom="#+id/linearLayout7"
android:layout_marginBottom="0dp"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:layout_toEndOf="#+id/linearLayout7"
android:layout_toRightOf="#+id/linearLayout7"
android:background="#color/colorRed"
android:gravity="center"
android:orientation="vertical"
android:weightSum="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/kid" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="VERBS"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout9"
android:layout_width="150dp"
android:layout_height="130dp"
android:layout_below="#+id/linearLayout7"
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"
android:layout_marginTop="10dp"
android:layout_toLeftOf="#+id/linearLayout8"
android:layout_toStartOf="#+id/linearLayout8"
android:background="#color/cardview_shadow_end_color"
android:gravity="center"
android:orientation="vertical"
android:weightSum="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/kid" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="NOUNS"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout10"
android:layout_width="150dp"
android:layout_height="130dp"
android:layout_alignBottom="#+id/linearLayout9"
android:layout_marginBottom="0dp"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:layout_toEndOf="#+id/linearLayout9"
android:layout_toRightOf="#+id/linearLayout9"
android:background="#color/colorRed"
android:gravity="center"
android:orientation="vertical"
android:weightSum="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/kid" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="PHRASES"
android:textStyle="bold" />
</LinearLayout>
</RelativeLayout>
</HorizontalScrollView>
I swipe both side in Listview it successfully done but when when i swipe any side some space is vacant I can't find why is space is renaming: -
Space is renaming after secondary layout. Here is my child layout:-
<?xml version="1.0" encoding="utf-8"?>
<com.octalsoftaware.archi.daimajia.swipe.SwipeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:swipe="http://schemas.android.com/tools"
android:id="#+id/swipe"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/whitecolor">
<LinearLayout
android:id="#+id/delete_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#color/red_color"
android:orientation="horizontal"
android:paddingBottom="#dimen/_10sdp"
android:paddingLeft="#dimen/_10sdp"
android:paddingRight="#dimen/_10sdp"
android:paddingTop="#dimen/_10sdp"
android:weightSum="3">
<LinearLayout
android:id="#+id/ll_charge"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="#dimen/_10sdp"
android:layout_weight="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:src="#drawable/forbidden" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="#string/delete"
android:textColor="#android:color/white" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/_10sdp"
android:orientation="vertical"
android:layout_weight="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:src="#drawable/forbidden" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="#string/delete"
android:textColor="#android:color/white" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/_10sdp"
android:orientation="vertical"
android:layout_weight="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:src="#drawable/forbidden" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="#string/delete"
android:textColor="#android:color/white" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="#+id/left_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#color/red_color"
android:paddingBottom="#dimen/_10sdp"
android:paddingLeft="#dimen/_10sdp"
android:paddingRight="#dimen/_10sdp"
android:paddingTop="#dimen/_10sdp"
android:orientation="horizontal"
android:weightSum="2">
<LinearLayout
android:id="#+id/ll_delete"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="#dimen/_10sdp"
android:layout_weight="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:src="#drawable/forbidden" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="#string/delete"
android:textColor="#android:color/white" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="#dimen/_10sdp"
android:layout_marginRight="#dimen/_10sdp"
android:layout_weight="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:src="#drawable/forbidden" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="#string/delete"
android:textColor="#android:color/white" />
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/whitecolor"
android:orientation="vertical"
android:padding="#dimen/_10sdp"
android:visibility="visible">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="#dimen/_10sdp"
android:layout_toLeftOf="#+id/img_arrow"
android:orientation="vertical">
<TextView
android:id="#+id/txt_settingname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Lee Alexender"
android:textColor="#color/lightblack"
android:textSize="#dimen/_15sdp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_5sdp"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/chargecircle" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/_10sdp"
android:src="#drawable/qicircle" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/_10sdp"
android:src="#drawable/cameracircle" />
</LinearLayout>
</LinearLayout>
<ImageView
android:id="#+id/img_arrow"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="#drawable/arrow" />
</RelativeLayout>
</com.octalsoftaware.archi.daimajia.swipe.SwipeLayout>
You need to remove these lines in your LinearLayout
android:paddingLeft="#dimen/_10sdp"
android:paddingRight="#dimen/_10sdp"
Add a FrameLayout as a direct child of SwipeLayout.
Add attribute android:layout_gravity="right" to delete_layout
Add attribute android:layout_gravity="left" to left_layout
Try this:
<?xml version="1.0" encoding="utf-8"?>
<com.octalsoftaware.archi.daimajia.swipe.SwipeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:swipe="http://schemas.android.com/tools"
android:id="#+id/swipe"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/whitecolor">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="#+id/delete_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#color/red_color"
android:orientation="horizontal"
android:paddingBottom="#dimen/_10sdp"
android:paddingLeft="#dimen/_10sdp"
android:paddingRight="#dimen/_10sdp"
android:paddingTop="#dimen/_10sdp"
android:weightSum="3"
android:layout_gravity="right">
<LinearLayout
android:id="#+id/ll_charge"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="#dimen/_10sdp"
android:layout_weight="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:src="#drawable/forbidden" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="#string/delete"
android:textColor="#android:color/white" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/_10sdp"
android:orientation="vertical"
android:layout_weight="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:src="#drawable/forbidden" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="#string/delete"
android:textColor="#android:color/white" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/_10sdp"
android:orientation="vertical"
android:layout_weight="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:src="#drawable/forbidden" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="#string/delete"
android:textColor="#android:color/white" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="#+id/left_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#color/red_color"
android:paddingBottom="#dimen/_10sdp"
android:paddingLeft="#dimen/_10sdp"
android:paddingRight="#dimen/_10sdp"
android:paddingTop="#dimen/_10sdp"
android:orientation="horizontal"
android:weightSum="2"
android:layout_gravity="left">
<LinearLayout
android:id="#+id/ll_delete"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="#dimen/_10sdp"
android:layout_weight="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:src="#drawable/forbidden" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="#string/delete"
android:textColor="#android:color/white" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="#dimen/_10sdp"
android:layout_marginRight="#dimen/_10sdp"
android:layout_weight="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:src="#drawable/forbidden" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="#string/delete"
android:textColor="#android:color/white" />
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/whitecolor"
android:orientation="vertical"
android:padding="#dimen/_10sdp"
android:visibility="visible">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="#dimen/_10sdp"
android:layout_toLeftOf="#+id/img_arrow"
android:orientation="vertical">
<TextView
android:id="#+id/txt_settingname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Lee Alexender"
android:textColor="#color/lightblack"
android:textSize="#dimen/_15sdp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_5sdp"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/chargecircle" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/_10sdp"
android:src="#drawable/qicircle" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/_10sdp"
android:src="#drawable/cameracircle" />
</LinearLayout>
</LinearLayout>
<ImageView
android:id="#+id/img_arrow"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="#drawable/arrow" />
</RelativeLayout>
</FrameLayout>
</com.octalsoftaware.archi.daimajia.swipe.SwipeLayout>
I developed an android application with reference to Nexus 7 in android studio preview which is 7" in size. The app is running with designed layout in some 7" tablets but not running with desired layouts in some other 7" tablets.
[![Display with layout being mixed up (iball Slide 7" tablet)][1]][1].
[![Dispay with proper layout(Micromax canvas P290 )][2]][2]
This is the xml code for layout
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="15dp"
android:focusableInTouchMode="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingRight="15dp"
android:paddingLeft="15dp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:layout_below="#+id/chek"
android:background="#drawable/border_around"
android:layout_marginTop="10dp"
android:id="#+id/patient">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/date"
android:textSize="16sp"
android:text="Date :"/>
<TextView
android:layout_width="150dp"
android:layout_height="wrap_content"
android:id="#+id/dateTxt"
android:textSize="16sp"
android:layout_toRightOf="#+id/date"
android:text="2/11/2016"
android:layout_marginLeft="18dp"
/>
<View
android:layout_width="1dp"
android:layout_height="60dp"
android:background="#c0c0c0"
android:id="#+id/viewa"
android:layout_toRightOf="#+id/dateTxt"
android:layout_marginLeft="10dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/id"
android:textSize="16sp"
android:layout_marginLeft="30dp"
android:layout_toRightOf="#+id/viewa"
android:text="IP No :"/>
<TextView
android:layout_width="230dp"
android:layout_height="wrap_content"
android:id="#+id/idTxt"
android:textSize="16sp"
android:layout_toRightOf="#+id/id"
android:text="133245"
android:layout_marginLeft="20dp"
/>
<View
android:layout_width="1dp"
android:layout_height="60dp"
android:background="#c0c0c0"
android:id="#+id/viewb"
android:layout_toRightOf="#+id/idTxt"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/patientName"
android:layout_below="#id/date"
android:layout_marginTop="10dp"
android:text="Patient Name :"/>
<TextView
android:layout_width="150dp"
android:layout_height="wrap_content"
android:id="#+id/patientNameTxt"
android:layout_below="#id/date"
android:textSize="16sp"
android:layout_marginTop="10dp"
android:layout_toRightOf="#+id/patientName"
android:text="Ravi Kumar"
android:layout_marginLeft="13dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/docName"
android:layout_below="#id/date"
android:layout_toRightOf="#+id/viewa"
android:layout_marginTop="10dp"
android:layout_marginLeft="30dp"
android:text="Primary Consultant :"/>
<TextView
android:layout_width="280dp"
android:layout_height="wrap_content"
android:id="#+id/docNameTxt"
android:textSize="16sp"
android:layout_below="#id/date"
android:layout_marginTop="10dp"
android:layout_toRightOf="#+id/docName"
android:text="fddf"
android:layout_marginLeft="20dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/age"
android:textSize="16sp"
android:layout_marginLeft="30dp"
android:layout_toRightOf="#+id/viewb"
android:text="Age :"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/ageTxt"
android:textSize="16sp"
android:layout_toRightOf="#+id/age"
android:text="48"
android:layout_marginLeft="20dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/bednum"
android:textSize="16sp"
android:layout_below="#id/age"
android:layout_marginTop="10dp"
android:layout_marginLeft="30dp"
android:layout_toRightOf="#+id/viewb"
android:text="Bed No :"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/bednumTxt"
android:textSize="16sp"
android:layout_toRightOf="#+id/bednum"
android:text="14"
android:layout_below="#id/age"
android:layout_marginTop="10dp"
android:layout_marginLeft="20dp"
/>
</RelativeLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="#c0c0c0"
android:id="#+id/view1"
android:layout_below="#+id/patient"
android:layout_marginTop="20dp"/>
<ScrollView
android:layout_height="fill_parent"
android:layout_width="match_parent"
android:layout_below="#+id/view1"
android:layout_marginTop="30dp"
android:layout_marginBottom="10dp"
>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="#+id/line1"
android:layout_marginLeft="60dp"
>
<ImageView
android:layout_width="180dp"
android:layout_height="wrap_content"
android:src="#drawable/bed"
android:id="#+id/dailyassesment"
android:layout_toRightOf="#+id/nursingassessment"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Handover Checklist"
android:layout_marginTop="10dp"
android:textSize="17sp"
android:layout_marginLeft="15dp"
android:layout_toRightOf="#+id/calender"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="#+id/line3"
android:layout_marginLeft="30dp"
android:layout_toRightOf="#+id/line1">
<ImageView
android:layout_width="180dp"
android:layout_height="wrap_content"
android:src="#drawable/nursingassesment"
android:id="#+id/nursingcare"
android:clickable="true"
android:layout_toRightOf="#+id/doctor"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Nursing Care Plans"
android:layout_below="#+id/nursingassessment"
android:layout_marginTop="10dp"
android:textSize="17sp"
android:layout_marginLeft="25dp"
android:layout_toRightOf="#+id/calender"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="#+id/line4"
android:layout_marginLeft="30dp"
android:layout_toRightOf="#+id/line3">
<ImageView
android:layout_width="180dp"
android:layout_height="wrap_content"
android:src="#drawable/graph"
android:id="#+id/vitalsigns"
android:layout_toRightOf="#+id/nursingassessment"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Vital Signs Input"
android:layout_below="#+id/vitalsigns"
android:layout_marginTop="10dp"
android:textSize="17sp"
android:layout_marginLeft="35dp"
android:layout_toRightOf="#+id/calender"/>
</LinearLayout>
<!--<LinearLayout-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:orientation="vertical"-->
<!--android:id="#+id/line3"-->
<!--android:layout_marginLeft="20dp"-->
<!--android:layout_toRightOf="#+id/line2">-->
<!--<ImageView-->
<!--android:layout_width="180dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:src="#drawable/nursecare"-->
<!--android:id="#+id/nursingassessment"-->
<!--android:clickable="true"-->
<!--android:layout_toRightOf="#+id/doctor"-->
<!--/>-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="Nursing Initial Assesments"-->
<!--android:layout_below="#+id/nursingassessment"-->
<!--android:layout_marginTop="10dp"-->
<!--android:layout_toRightOf="#+id/calender"/>-->
<!--</LinearLayout>-->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="#+id/line5"
android:layout_marginLeft="30dp"
android:layout_toRightOf="#+id/line4">
<ImageView
android:layout_width="180dp"
android:layout_height="wrap_content"
android:src="#drawable/doctor"
android:id="#+id/doctor"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Doctors Notes"
android:layout_below="#+id/doctor"
android:layout_marginTop="10dp"
android:textSize="17sp"
android:layout_marginLeft="40dp"
android:layout_toRightOf="#+id/calender"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="#+id/line6"
android:layout_marginTop="30dp"
android:layout_marginLeft="60dp"
android:layout_below="#+id/line4"
>
<ImageView
android:layout_width="180dp"
android:layout_height="wrap_content"
android:src="#drawable/bed"
android:id="#+id/dailyassesment1"
android:layout_toRightOf="#+id/nursingassessment"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="ISBAR Checklist-GW"
android:layout_marginTop="10dp"
android:layout_marginLeft="10dp"
android:textSize="17sp"
android:layout_toRightOf="#+id/calender"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="#+id/line7"
android:layout_marginTop="30dp"
android:layout_toRightOf="#+id/line6"
android:layout_marginLeft="30dp"
android:layout_below="#+id/line4"
>
<ImageView
android:layout_width="180dp"
android:layout_height="wrap_content"
android:src="#drawable/bed"
android:id="#+id/dailyassesment2"
android:layout_toRightOf="#+id/nursingassessment"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="ISBAR-ICU"
android:layout_marginTop="10dp"
android:textSize="17sp"
android:layout_marginLeft="50dp"
android:layout_toRightOf="#+id/calender"/>
</LinearLayout>
</RelativeLayout>
</ScrollView>
Try this library for working with multiple screen resolutions it is easy to use and simply documented with sample code source
Here you go! scrollview will fit all sizes!! for the upper section you need to create seprated layout for different sizes! You can do it from the top menu in the designer page in android studio "create other variation" or manage it programmatically
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="15dp"
android:focusableInTouchMode="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingRight="15dp"
android:paddingLeft="15dp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:layout_below="#+id/chek"
android:background="#drawable/delete"
android:layout_marginTop="10dp"
android:id="#+id/patient">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/date"
android:textSize="16sp"
android:text="Date :"/>
<TextView
android:layout_width="150dp"
android:layout_height="wrap_content"
android:id="#+id/dateTxt"
android:textSize="16sp"
android:layout_toRightOf="#+id/date"
android:text="2/11/2016"
android:layout_marginLeft="18dp"
/>
<View
android:layout_width="1dp"
android:layout_height="60dp"
android:background="#c0c0c0"
android:id="#+id/viewa"
android:layout_toRightOf="#+id/dateTxt"
android:layout_marginLeft="10dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/id"
android:textSize="16sp"
android:layout_marginLeft="30dp"
android:layout_toRightOf="#+id/viewa"
android:text="IP No :"/>
<TextView
android:layout_width="230dp"
android:layout_height="wrap_content"
android:id="#+id/idTxt"
android:textSize="16sp"
android:layout_toRightOf="#+id/id"
android:text="133245"
android:layout_marginLeft="20dp"
/>
<View
android:layout_width="1dp"
android:layout_height="60dp"
android:background="#c0c0c0"
android:id="#+id/viewb"
android:layout_toRightOf="#+id/idTxt"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/patientName"
android:layout_below="#id/date"
android:layout_marginTop="10dp"
android:text="Patient Name :"/>
<TextView
android:layout_width="150dp"
android:layout_height="wrap_content"
android:id="#+id/patientNameTxt"
android:layout_below="#id/date"
android:textSize="16sp"
android:layout_marginTop="10dp"
android:layout_toRightOf="#+id/patientName"
android:text="Ravi Kumar"
android:layout_marginLeft="13dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/docName"
android:layout_below="#id/date"
android:layout_toRightOf="#+id/viewa"
android:layout_marginTop="10dp"
android:layout_marginLeft="30dp"
android:text="Primary Consultant :"/>
<TextView
android:layout_width="280dp"
android:layout_height="wrap_content"
android:id="#+id/docNameTxt"
android:textSize="16sp"
android:layout_below="#id/date"
android:layout_marginTop="10dp"
android:layout_toRightOf="#+id/docName"
android:text="fddf"
android:layout_marginLeft="20dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/age"
android:textSize="16sp"
android:layout_marginLeft="30dp"
android:layout_toRightOf="#+id/viewb"
android:text="Age :"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/ageTxt"
android:textSize="16sp"
android:layout_toRightOf="#+id/age"
android:text="48"
android:layout_marginLeft="20dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/bednum"
android:textSize="16sp"
android:layout_below="#id/age"
android:layout_marginTop="10dp"
android:layout_marginLeft="30dp"
android:layout_toRightOf="#+id/viewb"
android:text="Bed No :"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/bednumTxt"
android:textSize="16sp"
android:layout_toRightOf="#+id/bednum"
android:text="14"
android:layout_below="#id/age"
android:layout_marginTop="10dp"
android:layout_marginLeft="20dp"
/>
</RelativeLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="#c0c0c0"
android:id="#+id/view1"
android:layout_below="#+id/patient"
android:layout_marginTop="20dp"/>
<ScrollView
android:layout_height="fill_parent"
android:layout_width="match_parent"
android:layout_below="#+id/view1"
android:layout_marginTop="30dp"
android:layout_marginBottom="10dp"
>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
>
<LinearLayout
android:id="#+id/firstRow"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical"
android:id="#+id/line1"
android:layout_weight="1"
android:layout_margin="5dp"
android:layout_gravity="center">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="#drawable/delete"
android:id="#+id/dailyassesment"
android:layout_toRightOf="#+id/nursingassessment" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Handover Checklist"
android:layout_marginTop="10dp"
android:textSize="17sp"
android:layout_toRightOf="#+id/calender"
android:gravity="center" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical"
android:id="#+id/line3"
android:layout_weight="1"
android:layout_margin="5dp"
android:layout_gravity="center">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="#drawable/delete"
android:id="#+id/nursingcare"
android:clickable="true"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Nursing Care Plans"
android:textSize="17sp"
android:gravity="center" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical"
android:id="#+id/line4"
android:layout_weight="1"
android:layout_margin="5dp"
android:layout_gravity="center">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="#drawable/delete"
android:id="#+id/vitalsigns"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Vital Signs Input"
android:textSize="17sp"
android:gravity="center" />
</LinearLayout>
</LinearLayout>
<!--<LinearLayout-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:orientation="vertical"-->
<!--android:id="#+id/line3"-->
<!--android:layout_marginLeft="20dp"-->
<!--android:layout_toRightOf="#+id/line2">-->
<!--<ImageView-->
<!--android:layout_width="180dp"-->
<!--android:layout_height="wrap_content"-->
<!--android:src="#drawable/nursecare"-->
<!--android:id="#+id/nursingassessment"-->
<!--android:clickable="true"-->
<!--android:layout_toRightOf="#+id/doctor"-->
<!--/>-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="Nursing Initial Assesments"-->
<!--android:layout_below="#+id/nursingassessment"-->
<!--android:layout_marginTop="10dp"-->
<!--android:layout_toRightOf="#+id/calender"/>-->
<!--</LinearLayout>-->
<LinearLayout
android:id="#+id/secondRow"
android:layout_below="#id/firstRow"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical"
android:id="#+id/line5"
android:layout_weight="1"
android:layout_margin="5dp"
android:layout_gravity="center">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="#drawable/delete"
android:id="#+id/doctor"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Doctors Notes"
android:layout_below="#+id/doctor"
android:layout_marginTop="10dp"
android:textSize="17sp"
android:layout_toRightOf="#+id/calender"
android:gravity="center" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical"
android:id="#+id/line6"
android:layout_weight="1"
android:layout_margin="5dp"
android:layout_gravity="center">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="#drawable/delete"
android:id="#+id/dailyassesment1"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="ISBAR Checklist-GW"
android:textSize="17sp"
android:gravity="center" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical"
android:id="#+id/line7"
android:layout_weight="1"
android:layout_margin="5dp"
android:layout_gravity="center">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="#drawable/delete"
android:id="#+id/dailyassesment2"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="ISBAR-ICU"
android:textSize="17sp"
android:gravity="center" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</ScrollView>
</RelativeLayout>
Replace your scrollview with the following code
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="100dp"
android:orientation="horizontal">
<LinearLayout
android:id="#+id/line1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
>
<ImageView
android:id="#+id/dailyassesment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="#mipmap/ic_launcher" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="Handover Checklist"
android:textSize="17sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/line3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<ImageView
android:id="#+id/nursingcare"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:src="#mipmap/ic_launcher" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="Nursing Care Plans"
android:textSize="17sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/line4"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<ImageView
android:id="#+id/vitalsigns"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="#mipmap/ic_launcher" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="Vital Signs Input"
android:textSize="17sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/line5"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<ImageView
android:id="#+id/doctor"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="#mipmap/ic_launcher" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/doctor"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="Doctors Notes"
android:textSize="17sp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:id="#+id/line6"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_below="#+id/line4"
android:layout_marginTop="30dp"
android:orientation="vertical"
>
<ImageView
android:id="#+id/dailyassesment1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="#mipmap/ic_launcher" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="ISBAR Checklist-GW"
android:textSize="17sp" />
</LinearLayout>
<LinearLayout
android:id="#+id/line7"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_below="#+id/line4"
android:layout_marginLeft="30dp"
android:layout_marginTop="30dp"
android:orientation="vertical">
<ImageView
android:id="#+id/dailyassesment2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="#mipmap/ic_launcher" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="ISBAR-ICU"
android:textSize="17sp" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"></LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
Note: Replace your images... I am adding default launcher icons
Below code has a bottom bar with two buttons which is fixed and not scrollable.
Above bottom bar the layout is scrollable. But the bottom content in the ScrollView hides behind the bottom bar.
I tried changing the parent layout which was not fixing the issue.
I don't know where I am wrong. Any help would be really thankfull.
Code as follows
<?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">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include
android:id="#+id/toolbar"
layout="#layout/toolbar" />
<View
android:layout_width="match_parent"
android:layout_height="6dp"
android:layout_marginTop="0dp"
android:background="#drawable/toolbar_dropshadow" />
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#fff"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#fff"
android:orientation="vertical" >
<TextView
android:id="#+id/text_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="20dp"
android:text="Name"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<ImageView
android:id="#+id/image_full"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:adjustViewBounds="true"
android:padding="20dp"
android:scaleType="fitXY" />
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:scrollbars="none">
<LinearLayout
android:id="#+id/imageall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"></LinearLayout>
</HorizontalScrollView>
<TextView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="10dp"
android:background="#bcbcbc"></TextView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="3">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:layout_weight="1"
android:orientation="vertical"
android:weightSum="2">
<TextView
android:id="#+id/price_full_offer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Price"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<TextView
android:id="#+id/price_full"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text=""
android:textColor="#000"
android:textSize="12sp" />
</LinearLayout>
<fone.adipoli.shopping.Rounded_textview
android:id="#+id/circle_txt"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:layout_marginRight="70dp"
android:gravity="center"
android:padding="3dp"
android:text="" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:background="#bcbcbc"></TextView>
<TextView
android:id="#+id/stock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:text="Check Availability"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<TextView
android:id="#+id/item_available_cart"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:text=""
android:textSize="12dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="3">
<EditText
android:id="#+id/enterpin"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="15dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:layout_weight="2"
android:background="#drawable/edittext_border"
android:cursorVisible="false"
android:hint="Enter Pincode"
android:inputType="number"
android:padding="5dp" />
<Button
android:id="#+id/pincheck"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center|right"
android:layout_marginRight="10dp"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:background="#000"
android:text="Check"
android:textColor="#color/white" />
</LinearLayout>
<RelativeLayout
android:id="#+id/chnge_rl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="#+id/item_available"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:text=""
android:textSize="14dp" />
<TextView
android:id="#+id/change_pin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="50dp"
android:text="Change\nPincode"
android:textColor="#color/blue"
android:textSize="14dp" />
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:text="Description :\n"
android:textColor="#000"
android:textSize="18dp"
android:textStyle="bold" />
<RelativeLayout
android:id="#+id/des_rl"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="0dp"
android:orientation="vertical">
<WebView
android:id="#+id/text_des"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Full details"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#000" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
<RelativeLayout
android:id="#+id/bottom_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/blue"
android:orientation="horizontal"
android:weightSum="2" >
<Button
android:id="#+id/addtocart"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#color/blue"
android:text="Add to Cart"
android:textColor="#color/white"
android:textStyle="bold" />
<TextView
android:layout_width="2dp"
android:layout_height="wrap_content"></TextView>
<Button
android:id="#+id/buynow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#color/blue"
android:text="Buy Now "
android:textColor="#color/white"
android:textStyle="bold" />
</LinearLayout>
</RelativeLayout>
Remove whole of the first LinearLayout
Add the below line to your ScrollView
android:layout_above="#+id/bottom_bar"
This makes sure that your ScrollView ends before the bottom bar so theres no overlapping.
In your first LinearLayout add android:layout_above="#+id/bottom_bar"
this will help you
try this
Please try as below code
<?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">
<include
android:id="#+id/toolbar"
layout="#layout/toolbar"
android:layout_alignParentBottom="true"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#id/toolbar"
android:layout_alignParentTop="true"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="6dp"
android:layout_marginTop="0dp"
android:background="#drawable/toolbar_dropshadow" />
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#fff"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#fff"
android:orientation="vertical" >
<TextView
android:id="#+id/text_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="20dp"
android:text="Name"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<ImageView
android:id="#+id/image_full"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:adjustViewBounds="true"
android:padding="20dp"
android:scaleType="fitXY" />
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:scrollbars="none">
<LinearLayout
android:id="#+id/imageall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"></LinearLayout>
</HorizontalScrollView>
<TextView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="10dp"
android:background="#bcbcbc"></TextView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="3">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:layout_weight="1"
android:orientation="vertical"
android:weightSum="2">
<TextView
android:id="#+id/price_full_offer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Price"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<TextView
android:id="#+id/price_full"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text=""
android:textColor="#000"
android:textSize="12sp" />
</LinearLayout>
<fone.adipoli.shopping.Rounded_textview
android:id="#+id/circle_txt"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:layout_marginRight="70dp"
android:gravity="center"
android:padding="3dp"
android:text="" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:background="#bcbcbc"></TextView>
<TextView
android:id="#+id/stock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:text="Check Availability"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<TextView
android:id="#+id/item_available_cart"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:text=""
android:textSize="12dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="3">
<EditText
android:id="#+id/enterpin"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="15dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:layout_weight="2"
android:background="#drawable/edittext_border"
android:cursorVisible="false"
android:hint="Enter Pincode"
android:inputType="number"
android:padding="5dp" />
<Button
android:id="#+id/pincheck"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center|right"
android:layout_marginRight="10dp"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:background="#000"
android:text="Check"
android:textColor="#color/white" />
</LinearLayout>
<RelativeLayout
android:id="#+id/chnge_rl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="#+id/item_available"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:text=""
android:textSize="14dp" />
<TextView
android:id="#+id/change_pin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="50dp"
android:text="Change\nPincode"
android:textColor="#color/blue"
android:textSize="14dp" />
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:text="Description :\n"
android:textColor="#000"
android:textSize="18dp"
android:textStyle="bold" />
<RelativeLayout
android:id="#+id/des_rl"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="0dp"
android:orientation="vertical">
<WebView
android:id="#+id/text_des"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Full details"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#000" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
<RelativeLayout
android:id="#+id/bottom_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/blue"
android:orientation="horizontal"
android:weightSum="2" >
<Button
android:id="#+id/addtocart"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#color/blue"
android:text="Add to Cart"
android:textColor="#color/white"
android:textStyle="bold" />
<TextView
android:layout_width="2dp"
android:layout_height="wrap_content"></TextView>
<Button
android:id="#+id/buynow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#color/blue"
android:text="Buy Now "
android:textColor="#color/white"
android:textStyle="bold" />
</LinearLayout>
</RelativeLayout>
You should add tag android:layout_above="#id/bottom_bar" in your ScrollView
It will keep the scrolling above your bottom bar.
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include
android:id="#+id/toolbar"
layout="#layout/toolbar" />
<View
android:layout_width="match_parent"
android:layout_height="6dp"
android:layout_marginTop="0dp"
android:background="#drawable/toolbar_dropshadow" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ScrollView
android:layout_above="#id/bottom_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#fff"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#fff"
android:orientation="vertical" >
<TextView
android:id="#+id/text_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="20dp"
android:text="Name"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<ImageView
android:id="#+id/image_full"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:adjustViewBounds="true"
android:padding="20dp"
android:scaleType="fitXY" />
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:scrollbars="none">
<LinearLayout
android:id="#+id/imageall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"></LinearLayout>
</HorizontalScrollView>
<TextView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="10dp"
android:background="#bcbcbc"></TextView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="3">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:layout_weight="1"
android:orientation="vertical"
android:weightSum="2">
<TextView
android:id="#+id/price_full_offer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Price"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<TextView
android:id="#+id/price_full"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text=""
android:textColor="#000"
android:textSize="12sp" />
</LinearLayout>
<fone.adipoli.shopping.Rounded_textview
android:id="#+id/circle_txt"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:layout_marginRight="70dp"
android:gravity="center"
android:padding="3dp"
android:text="" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:background="#bcbcbc"></TextView>
<TextView
android:id="#+id/stock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:text="Check Availability"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<TextView
android:id="#+id/item_available_cart"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:text=""
android:textSize="12dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="3">
<EditText
android:id="#+id/enterpin"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="15dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:layout_weight="2"
android:background="#drawable/edittext_border"
android:cursorVisible="false"
android:hint="Enter Pincode"
android:inputType="number"
android:padding="5dp" />
<Button
android:id="#+id/pincheck"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center|right"
android:layout_marginRight="10dp"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:background="#000"
android:text="Check"
android:textColor="#color/white" />
</LinearLayout>
<RelativeLayout
android:id="#+id/chnge_rl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="#+id/item_available"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:text=""
android:textSize="14dp" />
<TextView
android:id="#+id/change_pin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="50dp"
android:text="Change\nPincode"
android:textColor="#color/blue"
android:textSize="14dp" />
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:text="Description :\n"
android:textColor="#000"
android:textSize="18dp"
android:textStyle="bold" />
<RelativeLayout
android:id="#+id/des_rl"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="0dp"
android:orientation="vertical">
<WebView
android:id="#+id/text_des"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Full details"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#000" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
<RelativeLayout
android:id="#+id/bottom_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/blue"
android:orientation="horizontal"
android:weightSum="2" >
<Button
android:id="#+id/addtocart"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#color/blue"
android:text="Add to Cart"
android:textColor="#color/white"
android:textStyle="bold" />
<TextView
android:layout_width="2dp"
android:layout_height="wrap_content"></TextView>
<Button
android:id="#+id/buynow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#color/blue"
android:text="Buy Now "
android:textColor="#color/white"
android:textStyle="bold" />
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
</RelativeLayout>
use it:
<?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">
<LinearLayout
android:id="#+id/ll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include
android:id="#+id/toolbar"
layout="#layout/toolbar" />
<View
android:layout_width="match_parent"
android:layout_height="6dp"
android:layout_marginTop="0dp"
android:background="#drawable/toolbar_dropshadow" />
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#fff"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#fff"
android:orientation="vertical" >
<TextView
android:id="#+id/text_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="20dp"
android:text="Name"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<ImageView
android:id="#+id/image_full"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:adjustViewBounds="true"
android:padding="20dp"
android:scaleType="fitXY" />
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:scrollbars="none">
<LinearLayout
android:id="#+id/imageall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"></LinearLayout>
</HorizontalScrollView>
<TextView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="10dp"
android:background="#bcbcbc"></TextView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="3">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:layout_weight="1"
android:orientation="vertical"
android:weightSum="2">
<TextView
android:id="#+id/price_full_offer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Price"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<TextView
android:id="#+id/price_full"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text=""
android:textColor="#000"
android:textSize="12sp" />
</LinearLayout>
<fone.adipoli.shopping.Rounded_textview
android:id="#+id/circle_txt"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:layout_marginRight="70dp"
android:gravity="center"
android:padding="3dp"
android:text="" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:background="#bcbcbc"></TextView>
<TextView
android:id="#+id/stock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:text="Check Availability"
android:textAppearance="? android:attr/textAppearanceMedium"
android:textColor="#000" />
<TextView
android:id="#+id/item_available_cart"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:text=""
android:textSize="12dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="3">
<EditText
android:id="#+id/enterpin"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="15dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:layout_weight="2"
android:background="#drawable/edittext_border"
android:cursorVisible="false"
android:hint="Enter Pincode"
android:inputType="number"
android:padding="5dp" />
<Button
android:id="#+id/pincheck"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center|right"
android:layout_marginRight="10dp"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:background="#000"
android:text="Check"
android:textColor="#color/white" />
</LinearLayout>
<RelativeLayout
android:id="#+id/chnge_rl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="#+id/item_available"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:text=""
android:textSize="14dp" />
<TextView
android:id="#+id/change_pin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="50dp"
android:text="Change\nPincode"
android:textColor="#color/blue"
android:textSize="14dp" />
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:text="Description :\n"
android:textColor="#000"
android:textSize="18dp"
android:textStyle="bold" />
<RelativeLayout
android:id="#+id/des_rl"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="0dp"
android:orientation="vertical">
<WebView
android:id="#+id/text_des"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Full details"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#000" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
<RelativeLayout
android:id="#+id/bottom_bar"
android:layout_below:"#+id/ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/blue"
android:orientation="horizontal"
android:weightSum="2" >
<Button
android:id="#+id/addtocart"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#color/blue"
android:text="Add to Cart"
android:textColor="#color/white"
android:textStyle="bold" />
<TextView
android:layout_width="2dp"
android:layout_height="wrap_content"></TextView>
<Button
android:id="#+id/buynow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#color/blue"
android:text="Buy Now "
android:textColor="#color/white"
android:textStyle="bold" />
</LinearLayout>
</RelativeLayout>
Remove XMLNS from your scrollView, Give an id to scroll view. Then add attribute android:layout_below to the next component which is coming after scroll view.
<?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">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include
android:id="#+id/toolbar"
layout="#layout/toolbar" />
<View
android:layout_width="match_parent"
android:layout_height="6dp"
android:layout_marginTop="0dp"
android:background="#drawable/toolbar_dropshadow" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#fff"
android:id="#+id/scrol_view"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#fff"
android:orientation="vertical" >
<TextView
android:id="#+id/text_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="20dp"
android:text="Name"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<ImageView
android:id="#+id/image_full"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:adjustViewBounds="true"
android:padding="20dp"
android:scaleType="fitXY" />
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:scrollbars="none">
<LinearLayout
android:id="#+id/imageall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"></LinearLayout>
</HorizontalScrollView>
<TextView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="10dp"
android:background="#bcbcbc"></TextView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="3">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:layout_weight="1"
android:orientation="vertical"
android:weightSum="2">
<TextView
android:id="#+id/price_full_offer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Price"
android:textAppearance="? android:attr/textAppearanceMedium"
android:textColor="#000" />
<TextView
android:id="#+id/price_full"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text=""
android:textColor="#000"
android:textSize="12sp" />
</LinearLayout>
<fone.adipoli.shopping.Rounded_textview
android:id="#+id/circle_txt"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:layout_marginRight="70dp"
android:gravity="center"
android:padding="3dp"
android:text="" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:background="#bcbcbc"></TextView>
<TextView
android:id="#+id/stock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:text="Check Availability"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<TextView
android:id="#+id/item_available_cart"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:text=""
android:textSize="12dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="3">
<EditText
android:id="#+id/enterpin"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="15dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:layout_weight="2"
android:background="#drawable/edittext_border"
android:cursorVisible="false"
android:hint="Enter Pincode"
android:inputType="number"
android:padding="5dp" />
<Button
android:id="#+id/pincheck"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center|right"
android:layout_marginRight="10dp"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:background="#000"
android:text="Check"
android:textColor="#color/white" />
</LinearLayout>
<RelativeLayout
android:id="#+id/chnge_rl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="#+id/item_available"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:text=""
android:textSize="14dp" />
<TextView
android:id="#+id/change_pin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="50dp"
android:text="Change\nPincode"
android:textColor="#color/blue"
android:textSize="14dp" />
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:text="Description :\n"
android:textColor="#000"
android:textSize="18dp"
android:textStyle="bold" />
<RelativeLayout
android:id="#+id/des_rl"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="0dp"
android:orientation="vertical">
<WebView
android:id="#+id/text_des"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Full details"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#000" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
<RelativeLayout
android:id="#+id/bottom_bar"
android:layout_below="#+id/scroll_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/blue"
android:orientation="horizontal"
android:weightSum="2" >
<Button
android:id="#+id/addtocart"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#color/blue"
android:text="Add to Cart"
android:textColor="#color/white"
android:textStyle="bold" />
<TextView
android:layout_width="2dp"
android:layout_height="wrap_content"></TextView>
<Button
android:id="#+id/buynow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#color/blue"
android:text="Buy Now "
android:textColor="#color/white"
android:textStyle="bold" />
</LinearLayout>
Sorry for my english. I have background image, if keyboard show is resize background image. If keyboard not show evrithing work fine.
sorry obout image i have not 15 reputation
Its normal condition: image
Its if keyboard is show: image, background image is resize
Its if i in manifest i write adjustPan image
Bellow my xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="match_parent"
android:background="#9a5f35"
android:layout_height="50dp" >
<LinearLayout
android:id="#+id/edit_profile"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical" >
</LinearLayout>
<TextView
android:id="#+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginTop="10dp"
android:layout_weight="1"
android:text="Получить бонус"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#fff"
android:textSize="20sp" />
<RelativeLayout
android:id="#+id/backDd"
android:layout_width="100dp"
android:layout_height="50dp" >
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:src="#drawable/back_arraund" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom" >
<ScrollView
android:id="#+id/scroll"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true"
android:fadingEdge="none" >
<ImageView
android:id="#+id/imageView21"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="#drawable/bg_shkaf" />
</ScrollView>
<ScrollView
android:id="#+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="40dp"
android:orientation="vertical" >
<TextView
android:id="#+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="1) Введите сумму вашего счета"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#fff"
android:textSize="20dp" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="2) Сгенерируйте код"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#fff"
android:textSize="20dp" />
<TextView
android:id="#+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="3) Покажите код официанту"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#fff"
android:textSize="20dp" />
<TextView
android:id="#+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="4) Получите бонус на счет"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#fff"
android:textSize="20dp" />
</LinearLayout>
<TextView
android:id="#+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="30dp"
android:gravity="center"
android:lineSpacingMultiplier="1.2"
android:text="Бонусы дают привликательную возможность\nполучть скидки и обменивать их на подарки\nот нашего кафе.Получайте как можно больше\nбонусов, для более ценных подарков"
android:textColor="#d2d3ce"
android:textSize="13dp"/>
<LinearLayout
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:layout_marginTop="80dp"
android:orientation="horizontal" >
<TextView
android:id="#+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="10dp"
android:layout_marginRight="5dp"
android:text="Введите сумму:"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#fff"
android:textSize="20dp" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1" >
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_marginRight="10dp"
android:background="#drawable/button_radius_get_bonus"
android:gravity="center_vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<EditText
android:id="#+id/summgrn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="5dp"
android:hint="1200"
android:inputType="number"
android:maxLines="1"
android:maxLength="5"
android:background="#null"
android:textColor="#fff"
android:textColorHint="#91623f" >
<requestFocus />
</EditText>
<TextView
android:id="#+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="5dp"
android:layout_marginRight="20dp"
android:layout_weight="1"
android:text="грн."
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#fff"
android:textSize="20dp" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="#+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="5dp"
android:layout_marginTop="1dp"
android:text="и покажите официанту код"
android:textColor="#fff"
/>
<ImageView
android:id="#+id/registrationsdasdad"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="1dp"
android:layout_marginTop="1dp"
android:src="#drawable/review_button"
android:visibility="invisible" />
<TextView
android:id="#+id/textView102"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="50dp"
android:layout_marginTop="1dp"
android:text="Мы очень старались - оцените нас!"
android:textColor="#fff"
android:visibility="invisible" />
</LinearLayout>
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
</LinearLayout>
<ImageView
android:id="#+id/imageView212"
android:layout_width="300dp"
android:layout_height="300dp"
android:layout_centerHorizontal="true"
android:scaleType="centerCrop"
android:layout_marginTop="10dp"
android:visibility="invisible"
android:src="#drawable/image_8" />
<RelativeLayout
android:id="#+id/generateBonus"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_gravity="bottom"
android:background="#9a5f35"
android:gravity="center_horizontal"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<TextView
android:id="#+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="Получить"
android:textColor="#fff"
android:textSize="20dp" />
</RelativeLayout>
</RelativeLayout>
</LinearLayout>