Resize image background keyboard(android) - android

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>

Related

Specific Contents are not visible by using or by without using scrollview

Following is my xml layout.
<LinearLayout 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="wrap_content"
android:background="#EBEBEB">
<ImageView
android:layout_width="wrap_content"
android:layout_marginTop="10dp"
android:layout_height="30dp"
android:src="#drawable/contact_us"/>
<TextView
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="left"
android:text="Contact us"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
</LinearLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/vai" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_toEndOf="#+id/imageView"
android:layout_toLeftOf="#+id/imageView"
android:orientation="vertical">
<TextView
android:id="#+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Worldwide"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="48dp"
android:layout_marginStart="48dp"
android:text="Version 1.0"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#bdb9b8">
<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center"
android:text="Group of Companies"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
</LinearLayout>
<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/pager"
android:layout_width="match_parent"
android:layout_marginTop="10dp"
android:layout_marginLeft="3dp"
android:layout_height="120dp"></android.support.v4.view.ViewPager>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#000" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#bdb9b8">
<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center"
android:text="Global Representativess"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
</LinearLayout>
<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/pager2"
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_marginLeft="3dp"
android:layout_height="wrap_content"></android.support.v4.view.ViewPager>
<LinearLayout
android:id="#+id/last"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AgroProducts" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AgroProducts" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AgroProducts" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AgroProducts" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AgroProducts" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AgroProducts" />
</LinearLayout>
</LinearLayout>
The problem with my layout is that,
The linearlayout of id last is not fully visible.
I tried to encapsulate the entire layout within scrollview but if i do so , the second view pager is not getting visible. Is there any alternative to overcome this scenario?
Try to give Orientation to your Linear Layout. and Define it above your second View Pager your last Linear Layout. I have applied some changes to your Layout.
Refer this.
<LinearLayout 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="wrap_content"
android:background="#EBEBEB">
<ImageView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_marginTop="10dp"
android:src="#mipmap/ic_launcher" />
<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginTop="10dp"
android:gravity="left"
android:text="Contact us"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
</LinearLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#mipmap/ic_launcher" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_toEndOf="#+id/imageView"
android:layout_toLeftOf="#+id/imageView"
android:orientation="vertical">
<TextView
android:id="#+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Worldwide"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="48dp"
android:layout_marginStart="48dp"
android:text="Version 1.0"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#bdb9b8">
<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center"
android:text="Group of Companies"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
</LinearLayout>
<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/pager"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_marginLeft="3dp"
android:layout_marginTop="10dp"></android.support.v4.view.ViewPager>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#000" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#bdb9b8">
<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center"
android:text="Global Representativess"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
</LinearLayout>
<LinearLayout
android:id="#+id/last"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
android:weightSum="6">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="AgroProducts"
android:textColor="#000000" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="AgroProducts"
android:textColor="#000000" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="AgroProducts"
android:textColor="#000000" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="AgroProducts"
android:textColor="#000000" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="AgroProducts"
android:textColor="#000000" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="AgroProducts"
android:textColor="#000000" />
</LinearLayout>
<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/pager2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="3dp"
android:layout_marginTop="10dp"
android:orientation="vertical"></android.support.v4.view.ViewPager>
</LinearLayout>
There is no enough space to show this layout.
if you don't use you may have to add
android:weight sum to the container layout(the biggest one)
android:weightSum="3" (for example)
Then give each child layout the value you want, but make sure the summation of all values equels the weightsum
android:layout_weight="1" (for example)
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="5"
>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2">
< TextView />
< TextView />
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#bdb9b8"
android:layout_weight="2">
<TextView/>
<TextView/>
</LinearLayout>
<LinearLayout>
Or you can use ScrollView:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ScrollView
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="match_parent"
android:layout_height="wrap_content"
android:background="#EBEBEB">
<ImageView
android:layout_width="wrap_content"
android:layout_marginTop="10dp"
android:layout_height="30dp"/>
<TextView
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="left"
android:text="Contact us"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
</LinearLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_toLeftOf="#+id/imageView"
android:orientation="vertical">
<TextView
android:id="#+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Worldwide"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="48dp"
android:layout_marginStart="48dp"
android:text="Version 1.0"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#bdb9b8">
<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center"
android:text="Group of Companies"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
</LinearLayout>
<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/pager"
android:layout_width="match_parent"
android:layout_marginTop="10dp"
android:layout_marginLeft="3dp"
android:layout_height="120dp"></android.support.v4.view.ViewPager>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#000" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#bdb9b8">
<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center"
android:text="Global Representativess"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
</LinearLayout>
<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/pager2"
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_marginLeft="3dp"
android:layout_height="wrap_content"></android.support.v4.view.ViewPager>
<LinearLayout
android:id="#+id/last"
android:layout_weight="1"
android:layout_width="wrap_content"
android:orientation="vertical"
android:layout_height="50dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AgroProducts" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AgroProducts" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AgroProducts" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AgroProducts" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AgroProducts" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AgroProducts" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
I did some changes to your code.
Check this below code :
Add ScrollView to your parent Linear layout and give layout_weight to child elements
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fadingEdge="none"
android:fillViewport="true"
android:isScrollContainer="true"
android:scrollbars="none" >
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:weightSum="11" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#EBEBEB" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_marginTop="10dp"
android:src="#drawable/contact_us" />
<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginTop="10dp"
android:gravity="left"
android:text="Contact us"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
</LinearLayout >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" >
<ImageView
android:id="#+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/vai" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="#+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Worldwide"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" />
<TextView
android:id="#+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="48dp"
android:layout_marginStart="48dp"
android:text="Version 1.0"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout >
</LinearLayout >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#bdb9b8" >
<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_gravity="center"
android:gravity="center"
android:text="Group of Companies"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
</LinearLayout >
<android.support.v4.view.ViewPager
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/pager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginLeft="3dp"
android:layout_marginTop="10dp"
android:layout_weight="3" >
</android.support.v4.view.ViewPager >
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#000" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#bdb9b8" >
<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_gravity="center"
android:gravity="center"
android:text="Global Representativess"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
</LinearLayout >
<android.support.v4.view.ViewPager
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/pager2"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginLeft="3dp"
android:layout_marginTop="10dp"
android:layout_weight="3" >
</android.support.v4.view.ViewPager >
<LinearLayout
android:id="#+id/last"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal"
android:weightSum="6" >
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="Agro-Products" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="Agro-Products" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="Agro-Products" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="Agro-Products" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="Agro-Products" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="Agro-Products" />
</LinearLayout >
</LinearLayout >
</ScrollView >
</LinearLayout >

Bottom bar hides the scrollview content

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>

Can't implements Scrollview in XML

why I can not show the scroll view in my project, when run does not look scrollview in my project, do I put scrollview not quite right? How Scrollview placement should be, so that all items that are in my project can get scrollview This my XML Code
activity.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="5dp"
tools:context=".BoxOfficeDetailActivity" >
<ImageView
android:id="#+id/ivPosterImage"
android:layout_width="150dp"
android:layout_height="200dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:adjustViewBounds="true"
android:maxHeight="300dp"
android:src="#drawable/large_movie_poster" />
<TextView
android:id="#+id/tvCriticsScore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tvTitle"
android:layout_below="#+id/tvTitle"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/ivPosterImage"
android:text="#string/critics_score"
android:textSize="14sp" />
<TextView
android:id="#+id/tvCast"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tvAudienceScore"
android:layout_below="#+id/tvAudienceScore"
android:text="#string/cast"
android:layout_marginTop="5dp"
android:textSize="14sp" />
<TextView
android:id="#+id/tvTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#+id/ivPosterImage"
android:layout_marginLeft="8dp"
android:layout_toRightOf="#+id/ivPosterImage"
android:text="#string/movie_title"
android:layout_marginTop="5dp"
android:textSize="18sp" />
<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/ivPosterImage"
android:layout_marginTop="10dp"
android:id="#+id/scrollView1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
</LinearLayout>
</ScrollView>
<TextView
android:id="#+id/tvAudienceScore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tvCriticsScore"
android:layout_below="#+id/tvCriticsScore"
android:layout_marginTop="5dp"
android:text="#string/audi_score"
android:textSize="14sp" />
<TextView
android:id="#+id/tvSynopsis"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/scrollView1"
android:layout_below="#+id/tvCriticsConsensus"
android:layout_marginTop="48dp"
android:textSize="17sp"
android:text="#string/synopsis" />
<TextView
android:id="#+id/tvCriticsConsensus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/scrollView1"
android:layout_alignTop="#+id/scrollView1"
android:text="#string/cosensus"
android:textSize="17sp" />
</RelativeLayout>
Your scrollview height should not be defined in wrap because you want it to scroll.
Also the linear inside the scroll should be in wrap for its height and have some elements inside.
Suggestion if you don't mind using linears :
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="5dp"
tools:context=".BoxOfficeDetailActivity" >
<ScrollView
android:id="#+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageView
android:id="#+id/ivPosterImage"
android:layout_width="150dp"
android:layout_height="200dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:adjustViewBounds="true"
android:maxHeight="300dp"
android:src="#drawable/large_movie_poster" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="#+id/tvTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#+id/ivPosterImage"
android:layout_marginLeft="8dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/ivPosterImage"
android:text="#string/movie_title"
android:textSize="18sp" />
<TextView
android:id="#+id/tvCriticsScore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tvTitle"
android:layout_below="#+id/tvTitle"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/ivPosterImage"
android:text="#string/critics_score"
android:textSize="14sp" />
<TextView
android:id="#+id/tvAudienceScore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tvCriticsScore"
android:layout_below="#+id/tvCriticsScore"
android:layout_marginTop="5dp"
android:text="#string/audi_score"
android:textSize="14sp" />
<TextView
android:id="#+id/tvCast"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tvAudienceScore"
android:layout_below="#+id/tvAudienceScore"
android:layout_marginTop="5dp"
android:text="#string/cast"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
<TextView
android:id="#+id/tvCriticsConsensus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/cosensus"
android:textSize="17sp" />
<TextView
android:id="#+id/tvSynopsis"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/tvCriticsConsensus"
android:layout_marginTop="48dp"
android:text="#string/synopsis"
android:textSize="17sp" />
</LinearLayout>
</ScrollView>
</RelativeLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="5dp"
tools:context=".BoxOfficeDetailActivity" >
<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:id="#+id/scrollView1">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<ImageView
android:id="#+id/ivPosterImage"
android:layout_width="150dp"
android:layout_height="200dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:adjustViewBounds="true"
android:maxHeight="300dp"
android:src="#drawable/large_movie_poster" />
<TextView
android:id="#+id/tvCriticsScore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tvTitle"
android:layout_below="#+id/tvTitle"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/ivPosterImage"
android:text="#string/critics_score"
android:textSize="14sp" />
<TextView
android:id="#+id/tvCast"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tvAudienceScore"
android:layout_below="#+id/tvAudienceScore"
android:text="#string/cast"
android:layout_marginTop="5dp"
android:textSize="14sp" />
<TextView
android:id="#+id/tvTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#+id/ivPosterImage"
android:layout_marginLeft="8dp"
android:layout_toRightOf="#+id/ivPosterImage"
android:text="#string/movie_title"
android:layout_marginTop="5dp"
android:textSize="18sp" />
<TextView
android:id="#+id/tvAudienceScore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tvCriticsScore"
android:layout_below="#+id/tvCriticsScore"
android:layout_marginTop="5dp"
android:text="#string/audi_score"
android:textSize="14sp" />
<TextView
android:id="#+id/tvSynopsis"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/scrollView1"
android:layout_below="#+id/tvCriticsConsensus"
android:layout_marginTop="48dp"
android:textSize="17sp"
android:text="#string/synopsis" />
<TextView
android:id="#+id/tvCriticsConsensus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/cosensus"
android:textSize="17sp" />
</RelativeLayout>
</ScrollView>
</RelativeLayout>

Make style for single listview item (unwanted scaling)

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

How to create a form that have autolookup in Android

I want to use auto look up for searching .
I have partially created this layout . This is my XML code.
Now how can i use autol lookup in this?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:id="#+id/imageView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:src="#drawable/logo_demo" />
</LinearLayout>
<LinearLayout
android:id="#+id/linearLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/imageView1"
android:layout_marginTop="10dp"
android:background="#drawable/flight_bar"
android:orientation="horizontal" >
<TextView
android:id="#+id/roundtripTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="23dp"
android:layout_marginTop="5dp"
android:layout_weight="0.01"
android:text="Round trip"
android:textColor="#android:color/white" />
<TextView
android:id="#+id/OneWayTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="23dp"
android:layout_marginTop="5dp"
android:layout_weight="0.01"
android:text="OneWay"
android:textColor="#android:color/white" />
<TextView
android:id="#+id/multicityTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="23dp"
android:layout_marginTop="5dp"
android:layout_weight="0.03"
android:text="MultiCity"
android:textColor="#android:color/white" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:id="#+id/linearLayout4"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout1"
android:background="#drawable/from2"
android:orientation="horizontal" >
<TextView
android:id="#+id/fromTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginTop="7dp"
android:layout_weight=".05"
android:text="From" />
<TextView
android:id="#+id/toTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginTop="7dp"
android:layout_weight=".05"
android:text="To" />
</LinearLayout>
</RelativeLayout>
i have to use a auto look up box same below to the to i have to use autolook up and in the middle of both there will be image .So i have done till from and to part now i am not able to create to separate auto look up box below from and to.
Try this 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="fill_parent" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:src="#drawable/ic_launcher" />
<LinearLayout
android:id="#+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_below="#+id/imageView1"
android:layout_marginTop="10dp"
android:orientation="horizontal" >
<TextView
android:id="#+id/roundtripTextView"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:background="#FF0000FF"
android:gravity="center"
android:text="Round trip"
android:textColor="#android:color/white"
android:textSize="20sp" />
<TextView
android:id="#+id/OneWayTextView"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="1dp"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:background="#FF0000FF"
android:gravity="center"
android:text="OneWay"
android:textColor="#android:color/white"
android:textSize="20sp" />
<TextView
android:id="#+id/multicityTextView"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="1dp"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:background="#FF0000FF"
android:gravity="center"
android:text="MultiCity"
android:textColor="#android:color/white"
android:textSize="20sp" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/linearLayout1"
android:orientation="horizontal" >
<LinearLayout
android:id="#+id/linearLayout4"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:orientation="vertical" >
<EditText
android:id="#+id/fromTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7dp"
android:gravity="center_horizontal"
android:hint="From" />
<TextView
android:id="#+id/textView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="LON"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/textView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="London Great Britain"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<ImageView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#android:color/darker_gray"
android:src="#drawable/ic_launcher" />
<LinearLayout
android:id="#+id/linearLayout5"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:orientation="vertical" >
<EditText
android:id="#+id/toTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7dp"
android:gravity="center_horizontal"
android:hint="To" />
<TextView
android:id="#+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="DXB"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/textView4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="Dubai United Arab Emirates"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
Edit
Put below layout after "from/to" layout.
<LinearLayout
android:id="#+id/linearLayout4"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_below="#+id/linear3"
android:orientation="horizontal" >
<AutoCompleteTextView
android:id="#+id/textView1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="bottom"
android:text="LON" />
<ImageView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#android:color/darker_gray"
android:src="#drawable/ic_launcher" />
<AutoCompleteTextView
android:id="#+id/textView3"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="bottom"
android:text="DXB" />
</LinearLayout>

Categories

Resources