I'm trying to utilize elevation attributes to display drop shadows. As you can see from the images, it displays fine in Android Studio but when run on the device, one of the drop shadows disappears. Why would one show but not the other?
Image from Android Studio
Screenshot from Marshmallow device
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/white_80"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="#+id/booking_details_top_block"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:elevation="4dp"
>
<LinearLayout
android:id="#+id/image_block"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_horizontal"
>
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_margin="8dp"
android:background="#color/black"
/>
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_margin="8dp"
android:background="#color/black"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_horizontal"
android:layout_margin="16dp"
android:padding="16dp"
android:background="#drawable/booking_detail_date_background"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
tools:text ="Tuesday, September 1"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
tools:text ="4:00 PM - 6:00 PM"
/>
</LinearLayout>
<TextView
android:id="#+id/bookings_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:paddingRight="16dp"
android:paddingLeft="16dp"
android:gravity="center_horizontal"
android:layout_gravity="center_horizontal"
android:background="#drawable/status_background"
android:textColor="#color/white"
tools:text="CONFIRMED"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_horizontal"
android:layout_marginTop="8dp"
android:padding="8dp"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:text ="#string/booking_details_brig"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
tools:text ="Lorena M."
/>
</LinearLayout>
<RatingBar
android:id="#+id/rate_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:stepSize="1"
style="#style/Widget.CustomRatingBar"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"
android:layout_marginBottom="24dp"
android:layout_marginRight="#dimen/dialog_horizontal_margin"
android:layout_marginLeft="#dimen/dialog_horizontal_margin"
/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
/>
</LinearLayout>
<include layout="#layout/widget_booking_details" />
</LinearLayout>
widget_booking_details
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/white"
android:elevation="2dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="8dp"
android:paddingBottom="8dp"
>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="#dimen/booking_details_margin"
android:paddingTop="#dimen/booking_details_padding"
android:paddingBottom="#dimen/booking_details_padding"
android:layout_gravity="center_vertical"
android:text="#string/booking_details_address"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:layout_gravity="center_vertical"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="22 Phitsanulok Rd, apt. 3"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="Khwaeng Dusit, Dusit"/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#color/white"
android:layout_marginStart="#dimen/booking_details_margin"
android:layout_marginEnd="#dimen/booking_details_margin"
/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="#dimen/booking_details_padding"
android:paddingBottom="#dimen/booking_details_padding"
>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="#dimen/booking_details_margin"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_gravity="center_vertical"
android:text="#string/booking_details_services"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:layout_gravity="center_vertical"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="Waves after waves,"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="Evening glam"/>
</LinearLayout>
</LinearLayout>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="#dimen/booking_details_margin"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="#drawable/up_arrow"
android:background="#color/cream"
/>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#color/white"
android:layout_marginStart="#dimen/booking_details_margin"
android:layout_marginEnd="#dimen/booking_details_margin"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="#dimen/booking_details_padding"
android:paddingBottom="#dimen/booking_details_padding"
>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="#dimen/booking_details_margin"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_gravity="center_vertical"
android:text="#string/booking_details_cost"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center_vertical"
tools:text="24,600B"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#color/white"
android:layout_marginStart="#dimen/booking_details_margin"
android:layout_marginEnd="#dimen/booking_details_margin"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="#dimen/booking_details_padding"
android:paddingBottom="#dimen/booking_details_padding"
>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="#dimen/booking_details_margin"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_gravity="center_vertical"
android:text="#string/booking_details_payment"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center_vertical"
tools:text="Mastercard ending 1234"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#color/white"
android:layout_marginStart="#dimen/booking_details_margin"
android:layout_marginEnd="#dimen/booking_details_margin"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="#dimen/booking_details_padding"
android:paddingBottom="#dimen/booking_details_padding"
>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="#dimen/booking_details_margin"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_gravity="center_vertical"
android:text="#string/booking_details_booking_ref"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center_vertical"
tools:text="1639460503"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="#dimen/booking_details_padding"
android:paddingBottom="#dimen/booking_details_padding"
android:background="#color/white"
>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="#dimen/booking_details_margin"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_gravity="center_vertical"
android:text="#string/booking_details_booking_help"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:text="#string/booking_details_booking_help_email"/>
<!--TODO make email an actual link-->
</LinearLayout>
Odd solution but I merely had to put a background color in:
<LinearLayout
android:id="#+id/booking_details_top_block"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="#color/white"
android:elevation="4dp"
>
Related
I am working on android app
and i have cart activity which have multi row of products
and then the total of cart and button to continue..
This layout have top and buttom bars and then Scrollview have linearLayout as child...
This child contain:
Recyclerview
Textboxes
Button
My problem is: I cant scroll to the last item in my layout (The Button) .
This is my xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:layout_alignParentTop="true">
<ImageView
android:id="#+id/ProgressBar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitCenter"
android:src="#drawable/progress_rec"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="#+id/overview_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="#drawable/backgroudn"/>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="#+id/tt"
>
<LinearLayout
android:layout_width = "match_parent"
android:layout_height = "70dp"
android:elevation="12dp"
android:padding="8dp"
android:background="#drawable/white_action_bar"
android:id="#+id/first"
android:orientation="horizontal"
android:weightSum="1">
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:elevation="12dp"
android:id="#+id/btnActionBar11"
android:drawableStart="#drawable/ic_arrow_back_black_24dp"
android:drawableLeft="#drawable/ic_arrow_back_black_24dp"
android:drawablePadding="8dp"
android:drawableTint="#color/colorPrimaryDark"
android:padding="8dp"
android:background="#android:color/transparent"
android:layout_weight="0.2" />
<TextView
android:layout_width = "0dp"
android:layout_height = "wrap_content"
android:gravity="center"
android:textSize="14sp"
android:padding="8dp"
android:text="#string/cart"
android:layout_marginTop="8dp"
android:id="#+id/tvActionBar"
android:textColor="#color/colorPrimaryDark"
android:layout_weight="0.5"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:id="#+id/btnActionBarEnd11"
android:padding="8dp"
android:drawableEnd="#drawable/ic_shopping_cart_black_24dp"
android:drawableRight="#drawable/ic_shopping_cart_black_24dp"
android:drawablePadding="8dp"
android:drawableTint="#color/colorPrimaryDark"
android:textColor="#color/colorPrimaryDark"
android:background="#android:color/transparent"
android:layout_weight="0.3"
android:textSize="12sp"
android:visibility="gone"/>
</LinearLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="true"
android:layout_below="#+id/first">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/no_data"
android:text="#string/no_data"
android:textSize="24sp"
android:textAlignment="center"
android:gravity="center"
android:textColor="#color/colorPrimary"
android:visibility="gone"/>
<ProgressBar
android:foregroundGravity="center"
android:id="#+id/progress"
android:layout_below="#+id/no_data"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="#android:color/transparent"
android:layout_gravity="center"
android:visibility="gone" />
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/cartContentList"
android:layoutAnimation="#anim/layout_animation"
app:layout_behavior="#string/appbar_scrolling_view_behavior"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="8dp"
android:weightSum="1"
android:id="#+id/totalLayout">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="1"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.3"
android:text="#string/total"
android:textSize="#dimen/medium"
android:textColor="#color/colorPrimaryDark"
android:gravity="center"
/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:text="#string/zero_dollar"
android:textSize="#dimen/medium"
android:textColor="#color/colorPrimaryDark"
android:gravity="center"
android:id="#+id/tvTotal"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="#drawable/round_button"
android:text="#string/continue_"
android:textColor="#color/white"
android:textSize="#dimen/medium"
android:layout_margin="8dp"
android:padding="8dp"
android:gravity="center"
android:id="#+id/btnContinue" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="8dp"
android:paddingTop="8dp"
android:id="#+id/any"
android:background="#drawable/white_menu_bar"
android:layout_alignParentBottom="true"
android:elevation="24dp">
<LinearLayout
android:layout_width = "match_parent"
android:layout_height = "40dp"
android:elevation="12dp"
android:padding="2dp"
android:id="#+id/end"
android:orientation="horizontal"
android:weightSum="1"
android:gravity="center_horizontal">
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.25"
android:background="#android:color/transparent"
android:drawableTop="#drawable/home_1"
android:layout_margin="8dp"
android:gravity="center"
android:layout_gravity="center"
android:textColor="#color/colorPrimaryDark"
android:paddingEnd="15dp"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.25"
android:background="#android:color/transparent"
android:textColor="#color/colorPrimaryDark"
android:gravity="center"
android:layout_gravity="center"
android:id="#+id/btnMyOrder"
android:drawableTop="#drawable/my_orders_1"
android:layout_margin="8dp"
android:paddingEnd="15dp"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.25"
android:background="#android:color/transparent"
android:textColor="#color/colorPrimaryDark"
android:gravity="center"
android:layout_gravity="center"
android:drawableTop="#drawable/notifications_1"
android:layout_margin="8dp"
android:paddingEnd="18dp"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.25"
android:background="#android:color/transparent"
android:drawableTop="#drawable/side_menu_1"
android:layout_marginTop="8dp"
android:drawableTint="#color/colorPrimaryDark"
android:layout_gravity="center"
android:paddingEnd="15dp"/>
</LinearLayout>
<LinearLayout
android:layout_width = "match_parent"
android:layout_height = "20dp"
android:elevation="12dp"
android:id="#+id/end1"
android:orientation="horizontal"
android:weightSum="1"
android:gravity="center_horizontal">
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:id="#+id/gr1Home1"
android:drawableTop="#drawable/component1"
android:background="#android:color/transparent"
android:layout_weight="0.25"
android:paddingTop="8dp"
android:drawablePadding="15dp"
android:visibility="visible"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:id="#+id/gr2Notification1"
android:drawableTop="#drawable/component1"
android:background="#android:color/transparent"
android:layout_weight="0.25"
android:padding="8dp"
android:drawablePadding="15dp"
android:visibility="invisible"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:id="#+id/gr3Message1"
android:drawableTop="#drawable/component1"
android:background="#android:color/transparent"
android:layout_weight="0.25"
android:padding="8dp"
android:drawablePadding="15dp"
android:visibility="invisible"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:id="#+id/gr4Calender1"
android:drawableTop="#drawable/component1"
android:background="#android:color/transparent"
android:layout_weight="0.25"
android:padding="8dp"
android:drawablePadding="15dp"
android:visibility="invisible"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
.
This is my Cart Activity XMl:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/cart_bg"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/cart_bg"
android:orientation="vertical">
<include
android:id="#+id/abl_main1"
layout="#layout/app_header_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="#string/appbar_scrolling_view_behavior" />
<LinearLayout
android:id="#+id/ll_item_count"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/abl_main1"
android:orientation="horizontal">
<TextView
android:id="#+id/tv_item_count_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="#font/montserrat"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingRight="5dp"
android:paddingBottom="10dp"
android:text="#string/my_cart"
android:textColor="#color/text_item"
android:textSize="#dimen/text_size_18"
android:textStyle="bold" />
<TextView
android:id="#+id/tv_item_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="#font/montserrat"
android:paddingLeft="0dp"
android:paddingTop="10dp"
android:paddingRight="5dp"
android:paddingBottom="10dp"
android:text="#string/my_cart"
android:textColor="#color/gray_9E"
android:textSize="#dimen/text_size_12"
android:textStyle="normal" />
<TextView
android:id="#+id/tv_total"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:fontFamily="#font/montserrat"
android:gravity="right"
android:padding="10dp"
android:text="#string/total_caps"
android:textColor="#color/text_item"
android:textStyle="bold"
android:visibility="gone" />
</LinearLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="#+id/ll_item_count">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="60dp"
android:visibility="visible">
<LinearLayout
android:id="#+id/ll_listing"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:visibility="visible">
<androidx.recyclerview.widget.RecyclerView
android:id="#+id/rcv_cart"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="5dp"
android:background="#android:color/transparent"
android:clipToPadding="false"
android:orientation="vertical"
android:visibility="visible"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<androidx.cardview.widget.CardView
style="#style/CardView.Light"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="#color/white"
app:cardCornerRadius="4dp">
<LinearLayout
android:id="#+id/ll_playable"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="5dp"
android:visibility="gone">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:fontFamily="#font/montserrat"
android:text="#string/cart_total"
android:textColor="#color/text_item"
android:textStyle="normal" />
<TextView
android:id="#+id/tv_cart_total"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:fontFamily="#font/montserrat"
android:gravity="right"
android:text=""
android:textColor="#color/text_item"
android:textStyle="normal" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="5dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:fontFamily="#font/montserrat"
android:text="#string/total"
android:textColor="#color/text_item"
android:textStyle="bold" />
<TextView
android:id="#+id/tv_sub_total"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:fontFamily="#font/montserrat"
android:gravity="right"
android:text=""
android:textColor="#color/text_item"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="5dp"
android:visibility="gone">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:fontFamily="#font/montserrat"
android:text="#string/discount"
android:textColor="#color/text_item"
android:textStyle="normal" />
<TextView
android:id="#+id/tv_discount"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:fontFamily="#font/montserrat"
android:gravity="right"
android:text=""
android:textColor="#color/text_item"
android:textStyle="normal" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="5dp"
android:visibility="gone">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:fontFamily="#font/montserrat"
android:text="#string/dilivery"
android:textColor="#color/text_item"
android:textStyle="normal" />
<TextView
android:id="#+id/tv_delivery"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:fontFamily="#font/montserrat"
android:gravity="right"
android:text=""
android:textColor="#color/text_item"
android:textStyle="normal" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="5dp"
android:visibility="gone">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:fontFamily="#font/montserrat"
android:text="#string/total_payable"
android:textColor="#color/text_item"
android:textStyle="bold" />
<TextView
android:id="#+id/tv_total_payable"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:fontFamily="#font/montserrat"
android:gravity="right"
android:text=""
android:textColor="#color/text_item"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="5dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="#font/montserrat"
android:maxLines="2"
android:text="#string/tax_and_shipping_calculated"
android:textColor="#color/text_item"
android:textSize="#dimen/text_size_15"
android:textStyle="normal" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="vertical"
android:paddingTop="10dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/margin5dp"
android:fontFamily="#font/montserrat"
android:text="#string/add_order_note"
android:textColor="#color/text_item" />
<EditText
android:id="#+id/ed_order_note"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#drawable/shape_rectangle_transperant_bg_app_color_border"
android:focusable="true"
android:focusableInTouchMode="true"
android:gravity="top|left"
android:hint="#string/how_can_we_help_you"
android:imeOptions="actionDone"
android:isScrollContainer="false"
android:lines="3"
android:maxLines="3"
android:overScrollMode="always"
android:padding="#dimen/margin5dp"
android:scrollbarStyle="insideInset"
android:scrollbars="vertical"
android:textColor="#color/text_item" />
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
</RelativeLayout>
</ScrollView>
<RelativeLayout
android:id="#+id/rr_empty_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="#+id/ll_item_count"
android:layout_centerInParent="true"
android:background="#color/white"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:gravity="center_vertical"
android:orientation="vertical">
<LinearLayout
android:id="#+id/ll_backgorund_circle_cart"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_horizontal"
android:background="#drawable/circle_drawable"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="#+id/iv_background_icon_cart"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center_horizontal"
android:src="#mipmap/iv_red_heart"
android:visibility="visible" />
</LinearLayout>
<TextView
android:id="#+id/tv_empty_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/padding_10"
android:layout_marginTop="#dimen/text_size_20"
android:layout_marginRight="#dimen/padding_10"
android:fontFamily="#font/montserrat"
android:gravity="center"
android:text="#string/your_bag_is_empty"
android:textColor="#color/text_item"
android:textSize="20dp"
android:textStyle="bold"
android:visibility="visible" />
<TextView
android:id="#+id/tv_empty_sub_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/padding_10"
android:layout_marginTop="#dimen/padding_10"
android:layout_marginRight="#dimen/padding_10"
android:layout_marginBottom="30dp"
android:fontFamily="#font/montserrat"
android:gravity="center"
android:text="#string/item_added_to_bag"
android:textColor="#color/gray_9E"
android:textSize="16dp"
android:textStyle="normal"
android:visibility="visible" />
<LinearLayout
android:id="#+id/ll_shopping_now"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="#drawable/shape_rectangle_transperant_bg_app_color_border_new"
android:gravity="center"
android:orientation="vertical"
android:paddingLeft="20dp"
android:paddingRight="20dp">
<TextView
android:id="#+id/tv_shopping_now"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/input_layout_password"
android:layout_alignParentStart="true"
android:layout_gravity="center_horizontal"
android:fontFamily="#font/montserrat"
android:gravity="center"
android:padding="#dimen/padding_10"
android:text="#string/shopping_now"
android:textColor="#color/black"
android:textSize="16dp" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
<View
android:id="#+id/v_order_place"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_above="#+id/ll_place_order"
android:background="#color/light_gray" />
<LinearLayout
android:id="#+id/ll_place_order"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="#color/white"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight=".5"
android:gravity="center"
android:orientation="vertical"
android:padding="5dp">
<TextView
android:id="#+id/tv_place_order_total"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fontFamily="#font/montserrat"
android:gravity="center"
android:text=""
android:textColor="#color/text_item"
android:textStyle="bold" />
</LinearLayout>
<com.wpa3.productshopify.util.RippleView
rv_centered="true"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".5"
app:rv_type="rectangle"
app:rv_zoom="true">
<TextView
android:id="#+id/tv_place_order"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="5dp"
android:layout_weight=".5"
android:background="#drawable/shape_round_corner_rectangle"
android:fontFamily="#font/montserrat"
android:gravity="center"
android:padding="10dp"
android:text="#string/place_order"
android:textAllCaps="true"
android:textColor="#color/white"
android:textSize="15sp" />
</com.wpa3.productshopify.util.RippleView>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
Right now i'm busy so did not seen your XML but check my code snippet.
Hope this may help you
I am working on this project and I am designing the layout specifically in adding a product that deals with multiple cards.
The android studio that I am working on has an SDKVersion of 28. I have tried checking out some answers from other posts but none of them helped. In addition, I saw some tutorials on YouTube that you have to use an itemAdapter but it will only show you cards with same information. Mine is different.
The picture below that I designed is the one that I want. However, after executing the my code below, it is only showing the first CardView and nothing about "Discount" CardView when I scroll down on my app which shows on the second picture.
activity_add_product.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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".AddProductActivity"
android:orientation="vertical"
android:background="#color/colorWhiteBG">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.CardView
android:id="#+id/cv_prod"
android:layout_width="600dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="#color/colorWhite"
android:padding="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="20dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="10dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Product Name"
android:textStyle="bold"
android:textColor="#color/colorDarkText"
android:textSize="#dimen/card_title"/>
<EditText
android:id="#+id/editTextProdName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textAutoComplete"
android:padding="5dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="10dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Category"
android:textColor="#color/colorDarkText"
android:textSize="#dimen/card_title"
android:textStyle="bold"/>
<Spinner
android:id="#+id/spinnerCategory"
android:layout_width="match_parent"
android:layout_height="50dp"
android:entries="#array/prodcategorylist"
android:padding="5dp"></Spinner>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="10dp">
<CheckBox
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:buttonTint="#color/colorPrimary"
android:text="This item is available for sale."/>
</LinearLayout>
<LinearLayout
android:id="#+id/conditionlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:layout_marginTop="10dp"
android:paddingRight="10dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Condition"
android:textStyle="bold"
android:textSize="#dimen/card_title"
android:textColor="#color/colorDarkText"/>
<Spinner
android:id="#+id/spinnerCondition"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:entries="#array/conditionlist"
android:padding="5dp"></Spinner>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:layout_marginTop="10dp"
android:paddingLeft="10dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Item Count"
android:textSize="#dimen/card_title"
android:textColor="#color/colorDarkText"
android:textStyle="bold"/>
<EditText
android:id="#+id/editTextConditionCount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:inputType="number"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text=""/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Quantity of an item according to it's condition."
android:textSize="6dp"
android:layout_marginLeft="20dp"/>
</LinearLayout>
<LinearLayout
android:id="#+id/expirationdatelayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:layout_marginTop="10dp"
android:paddingRight="10dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Expiration Date"
android:textStyle="bold"
android:textSize="#dimen/card_title"
android:textColor="#color/colorDarkText"/>
<EditText
android:id="#+id/spinnerExpiration"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="date"
android:padding="5dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:layout_marginTop="10dp"
android:paddingLeft="10dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Item Count"
android:textSize="#dimen/card_title"
android:textColor="#color/colorDarkText"
android:textStyle="bold"/>
<EditText
android:id="#+id/editTextExpCount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:inputType="number"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text=""/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Quantity of an item according to it's expiration date."
android:textSize="6dp"
android:layout_marginLeft="20dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="10dp">
<ImageView
android:id="#+id/imageaddBtn1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_add_circle_black_24dp"
android:tint="#color/colorPrimary" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingLeft="10dp"
android:text="ADD EXPIRATION DATE"
android:textColor="#color/colorDarkText" />
</LinearLayout>
<LinearLayout
android:id="#+id/soldbyandunitlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="10dp"
android:layout_gravity="center">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
android:paddingRight="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sold by"
android:textColor="#color/colorDarkText"
android:textSize="#dimen/card_title"
android:textStyle="bold"
android:layout_gravity="center"/>
<RadioGroup
android:id="#+id/radioGroupSoldBy"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
android:layout_gravity="center"
android:paddingLeft="10dp">
<RadioButton
android:id="#+id/radioBtnEach"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/stringEach"
android:buttonTint="#color/colorPrimary"/>
<RadioButton
android:id="#+id/radioBtnWeight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="#string/stringWeight"
android:buttonTint="#color/colorPrimary"/>
</RadioGroup>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:paddingLeft="10dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Unit"
android:textColor="#color/colorDarkText"
android:textSize="#dimen/card_title"
android:textStyle="bold"/>
<Spinner
android:id="#+id/spinnerSoldbyUnit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:entries="#array/unitlist"
android:padding="5dp"></Spinner>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="#+id/pricelayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:layout_marginTop="10dp"
android:paddingRight="10dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Price"
android:textStyle="bold"
android:textSize="#dimen/card_title"
android:textColor="#color/colorDarkText"/>
<EditText
android:id="#+id/editTextPrice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:hint="0.00"
android:padding="5dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:layout_marginTop="10dp"
android:paddingLeft="10dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="QR Code"
android:textSize="#dimen/card_title"
android:textColor="#color/colorDarkText"
android:textStyle="bold"/>
<EditText
android:id="#+id/editTextQRCode1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:inputType="text"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</ScrollView>
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.CardView
android:id="#+id/cv_discounts"
android:layout_width="600dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="#color/colorWhite"
android:padding="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="15dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Discounts"
android:textSize="#dimen/card_title_name"
android:textColor="#color/colorDarkText"
android:textStyle="bold"
android:layout_marginTop="10dp"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="15dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="In Stock"
android:textStyle="bold"
android:textColor="#color/colorDarkText"
android:textSize="#dimen/card_title" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="ROP"
android:textColor="#color/colorDarkText"
android:textSize="#dimen/card_title"
android:textStyle="bold"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<EditText
android:id="#+id/editTextProdInStock"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:inputType="number"
android:hint="0"/>
<EditText
android:id="#+id/editTextProdVal"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:inputType="number"
android:hint="0"/>
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</ScrollView>
</LinearLayout>
my xml layout is working fine, everything coming in single screen no need to scroll in below 5.5 screens
but in 5.5 not able to see all thing in single screen i have to scroll to see remaining content that is two buttons showing bottom `
This is the screenshot.
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/layout_container"
android:layout_marginBottom="20dp"
android:orientation="horizontal">
<ImageView
android:id="#+id/left_p"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="20dp"
android:src="#drawable/left_arrow" />
<TextView
android:id="#+id/date_p"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="5"
android:gravity="center_horizontal"
android:paddingLeft="60dp"
android:paddingRight="60dp"
android:text="Monday, 24 August, 2015"
android:textColor="#color/White" />
<ImageView
android:id="#+id/right_p"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="20dp"
android:src="#drawable/right_arrow" />
</LinearLayout>
<LinearLayout
android:id="#+id/layout_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:layout_marginTop="2dp"
android:gravity="center_horizontal"
android:orientation="horizontal">
<LinearLayout
android:id="#+id/morning_layout"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_margin="1dp"
android:layout_weight="1"
android:background="#drawable/inactive_box"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal"
android:paddingBottom="10dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
android:orientation="vertical">
<ImageView
android:id="#+id/morning_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/morning_icon" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:orientation="vertical">
<TextView
android:id="#+id/morning"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Morning"
android:textColor="#color/SlateGray" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="vertical">
<LinearLayout
android:id="#+id/tab_list1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="20dp"
android:orientation="horizontal">
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="#+id/noon_layout"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_margin="1dp"
android:layout_weight="1"
android:background="#drawable/inactive_box"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
android:orientation="vertical">
<ImageView
android:id="#+id/noon_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/noon_icon" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:orientation="vertical">
<TextView
android:id="#+id/noon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Noon"
android:textColor="#color/SlateGray" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="vertical">
<LinearLayout
android:id="#+id/tab_list2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="20dp"
android:orientation="horizontal">
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:gravity="center_horizontal"
android:orientation="horizontal">
<LinearLayout
android:id="#+id/evening_layout"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_margin="1dp"
android:layout_weight="1"
android:background="#drawable/inactive_box"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal"
android:paddingBottom="6dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
android:orientation="vertical">
<ImageView
android:id="#+id/evening_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/evening_icon" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:orientation="vertical">
<TextView
android:id="#+id/evening"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Evening"
android:textColor="#color/SlateGray" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="vertical">
<LinearLayout
android:id="#+id/tab_list3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="20dp"
android:orientation="horizontal">
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="#+id/night_layout"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_margin="1dp"
android:layout_weight="1"
android:background="#drawable/inactive_box"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
android:orientation="vertical">
<ImageView
android:id="#+id/night_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/night_icon" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:orientation="vertical">
<TextView
android:id="#+id/night"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Night"
android:textColor="#color/SlateGray" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="vertical">
<LinearLayout
android:id="#+id/tab_list4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="20dp"
android:orientation="horizontal">
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:gravity="left"
android:orientation="vertical">
<ImageView
android:id="#+id/pillbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="7dp"
android:background="#drawable/pill_box_icon" />
<TextView
android:id="#+id/pill_box"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Pill Box"
android:textColor="#color/White"
android:textSize="13dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:gravity="right"
android:orientation="vertical">
<ImageView
android:id="#+id/plus_icon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="#drawable/plus_icon" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
I have tested my application in genymotion emulator using two Android OSs. Lollipop and Ice Cream Sandwich. Worked fine in both devices. Problem is when I tested in real devices, item positions and sizes get changed.
In my xiomi mi4c (lollipop) screen looks ok
But in micromax canves (Ice Cream Sandwich) this problem happens
I want my app look like the same as in my mi4c in every devices.
This is my xml file.
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/drawer_layout_widget"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/bg_register"
android:orientation="vertical"
app:layout_behavior="#string/appbar_scrolling_view_behavior"
tools:context="com.ceatkelanisrilanka.dushanmadushanka.ceat.CeatMainActivity"
tools:showIn="#layout/activity_ceat_main">
<include
android:id="#+id/app_bar"
layout="#layout/app_toolbar_welcome_menu"></include>
<LinearLayout
android:id="#+id/mainLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="#+id/firstLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="5dp">
<LinearLayout
android:id="#+id/enMonth"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
android:paddingLeft="10dp"
android:paddingStart="10dp">
<TextView
android:id="#+id/txtMonth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Month"
android:textColor="#ffffff"
android:textSize="24sp" />
<TextView
android:id="#+id/yearTextV"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="year"
android:layout_gravity="center"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#ffffff" />
</LinearLayout>
<LinearLayout
android:id="#+id/pViewLayout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<com.rey.material.widget.ProgressView
android:id="#+id/pViewew"
cpd_strokeColor="#android:color/holo_red_dark"
cpd_strokeSecondaryColor="#android:color/holo_blue_bright"
cpd_strokeSize="25dp"
android:layout_width="50dp"
android:layout_height="50dp"
app:pv_autostart="true"
app:pv_circular="true"
app:pv_progressMode="indeterminate"
app:pv_progressStyle="#style/Material.Drawable.CircularProgress" />
</LinearLayout>
<LinearLayout
android:id="#+id/snMonthLayout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="right"
android:orientation="vertical"
android:paddingEnd="10dp"
android:paddingRight="10dp">
<TextView
android:id="#+id/txtMonthSn"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="MonthSn"
android:textColor="#ffffff"
android:textSize="24sp" />
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:id="#+id/secondLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="15dp">
<com.github.lzyzsd.circleprogress.ArcProgress
android:id="#+id/arc_progress"
android:layout_width="220dp"
android:layout_height="220dp"
android:layout_marginLeft="15dp"
android:layout_marginStart="15dp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:gravity="center"
android:orientation="vertical"
android:paddingRight="15dp"
android:paddingTop="25dp">
<com.hookedonplay.decoviewlib.DecoView
android:id="#+id/dynamicArcView"
android:layout_width="100dp"
android:layout_height="100dp"
android:padding="5dp" />
<TextView
android:id="#+id/pView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0 %"
android:textColor="#4B73C4"
android:textSize="20sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Precentage"
android:textColor="#4B73C4"
android:textSize="15sp" />
</LinearLayout>
</RelativeLayout>
<LinearLayout
android:id="#+id/thirdLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
android:paddingLeft="10dp"
android:paddingTop="20dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="#+id/txtMtar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Monthly Target"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffff" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="#+id/txtMAch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Achievment"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffff" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="#+id/txtPre"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Percentage"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffff" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1.1"
android:orientation="vertical"
android:paddingTop="20dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:id="#+id/txtTarget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="M"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffff" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:id="#+id/txtAchievement"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="M"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffff" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:id="#+id/txtCollection"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="M"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffff" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
android:paddingTop="20dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal">
<Button
android:id="#+id/bTon"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:text="Ton"
android:textColor="#color/border_gray" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal">
<Button
android:id="#+id/bValue"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:text="Value"
android:textColor="#color/border_gray" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal">
<Button
android:id="#+id/bCollection"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:text="Collection"
android:textColor="#color/border_gray" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<fragment
android:id="#+id/fragment_navigation_drawer"
android:name="com.ceatkelanisrilanka.dushanmadushanka.ceat.fragments.NavigationDrawerFragment"
android:layout_width="#dimen/nav_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
app:layout="#layout/fragment_navigation_drawer"
tools:layout="#layout/fragment_navigation_drawer"></fragment>
</android.support.v4.widget.DrawerLayout>
Try This:
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="#+id/drawer_layout_widget"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ff0000"
android:orientation="vertical"
app:layout_behavior="#string/appbar_scrolling_view_behavior">
<include
android:id="#+id/app_bar"
layout="#layout/app_toolbar_welcome_menu"></include>
<LinearLayout
android:id="#+id/mainLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="#+id/firstLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="5dp">
<LinearLayout
android:id="#+id/enMonth"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
android:paddingLeft="10dp"
android:paddingStart="10dp">
<TextView
android:id="#+id/txtMonth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Month"
android:textColor="#ffffff"
android:textSize="24sp" />
<TextView
android:id="#+id/yearTextV"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="year"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#ffffff" />
</LinearLayout>
<LinearLayout
android:id="#+id/pViewLayout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<com.rey.material.widget.ProgressView
android:id="#+id/pViewew"
cpd_strokeColor="#android:color/holo_red_dark"
cpd_strokeSecondaryColor="#android:color/holo_blue_bright"
cpd_strokeSize="25dp"
android:layout_width="50dp"
android:layout_height="50dp"
app:pv_autostart="true"
app:pv_circular="true"
app:pv_progressMode="indeterminate"
app:pv_progressStyle="#style/Material.Drawable.CircularProgress" />
</LinearLayout>
<LinearLayout
android:id="#+id/snMonthLayout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="right"
android:orientation="vertical"
android:paddingEnd="10dp"
android:paddingRight="10dp">
<TextView
android:id="#+id/txtMonthSn"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="MonthSn"
android:textColor="#ffffff"
android:textSize="24sp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="#+id/secondLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="10dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight=".5"
android:padding="5dp">
<com.github.lzyzsd.circleprogress.ArcProgress
android:id="#+id/arc_progress"
android:layout_width="220dp"
android:layout_height="220dp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_weight=".5"
android:gravity="center"
android:layout_gravity="center_vertical"
android:orientation="vertical"
android:padding="5dp">
<com.hookedonplay.decoviewlib.DecoView
android:id="#+id/dynamicArcView"
android:layout_width="100dp"
android:layout_height="100dp"
android:padding="5dp" />
<TextView
android:id="#+id/pView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0 %"
android:textColor="#4B73C4"
android:textSize="20sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Precentage"
android:textColor="#4B73C4"
android:textSize="15sp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="#+id/thirdLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:padding="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
android:paddingLeft="10dp"
android:paddingTop="20dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="#+id/txtMtar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Monthly Target"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffff" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="#+id/txtMAch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Achievment"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffff" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="#+id/txtPre"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Percentage"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffff" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
android:paddingTop="20dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:id="#+id/txtTarget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="M"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffff" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:id="#+id/txtAchievement"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="M"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffff" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:id="#+id/txtCollection"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="M"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffff" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
android:paddingTop="20dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal">
<Button
android:id="#+id/bTon"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:text="Ton"
android:textColor="#000000" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal">
<Button
android:id="#+id/bValue"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:text="Value"
android:textColor="#000000" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal">
<Button
android:id="#+id/bCollection"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:text="Collection"
android:textColor="#000000" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!--<fragment
android:id="#+id/fragment_navigation_drawer"
android:name="com.ceatkelanisrilanka.dushanmadushanka.ceat.fragments.NavigationDrawerFragment"
android:layout_width="#dimen/nav_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
app:layout="#layout/fragment_navigation_drawer"
tools:layout="#layout/fragment_navigation_drawer"></fragment>-->
</android.support.v4.widget.DrawerLayout>
When the items that I used started to fill whole screen I decided to use scrollview,but when I use it,ScrollView compressing the layouts of items and put them in a smaller part of screen as the following:
And here is my xml.
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#A4A4A4">
<ScrollView
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">
<ImageView
android:id="#+id/imageview"
android:layout_width="match_parent"
android:layout_height="40dp"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageButton
android:id="#+id/image_button"
android:layout_width="40dp"
android:layout_height="48dp"
android:layout_marginRight="-9dp"
android:src="#drawable/home_ico"
/>
<Button
android:id="#+id/internet"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="9sp"
android:layout_marginRight="-9dp"
android:text="#string/internet"
android:textColor="#ffffff"
android:layout_weight="1"/>
<Button
android:id="#+id/servisler"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="9sp"
android:layout_marginRight="-9dp"
android:text="#string/servisler"
android:textColor="#ffffff"
android:layout_weight="1"/>
<Button
android:id="#+id/kampanya"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="9sp"
android:layout_marginRight="-9dp"
android:text="#string/kampanya"
android:textColor="#ffffff"
android:layout_weight="1"/>
<Button
android:id="#+id/hakkımızda"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="9sp"
android:layout_marginRight="-9dp"
android:text="#string/hakkımızda"
android:textColor="#ffffff"
android:layout_weight="1"/>
<Button
android:id="#+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="9sp"
android:layout_marginRight="-9dp"
android:textColor="#ffffff"
android:text="Diğer" />
</LinearLayout>
<LinearLayout
android:layout_height="0dp"
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_weight="0.5">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="0.8">
<android.support.v4.view.ViewPager
android:id="#+id/pager"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="0.9"
/>
<com.viewpagerindicator.CirclePageIndicator
android:id="#+id/indicator"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="0.1"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:gravity="bottom"
android:padding="5dp"
app:centered="true"
app:fillColor="#ff0099"
app:pageColor="#FF0000"
app:snap="false" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:orientation="vertical">
<TextView
android:id="#+id/textView4"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:textColor="#ffffff"
android:text="#string/textView4"/>
<TextView
android:id="#+id/textView5"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:textColor="#ffffff"
android:text="#string/textView5"/>
<TextView
android:id="#+id/textView6"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:textColor="#ffffff"
android:text="#string/textView6"/>
<TextView
android:id="#+id/textView7"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:textColor="#ffffff"
android:text="#string/textView7"/>
<TextView
android:id="#+id/textView8"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:textColor="#ffffff"
android:text="#string/textView8"/>
<TextView
android:id="#+id/textView9"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:textColor="#ffffff"
android:text="#string/textView9"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#FF0000FF" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.5"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.5"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:orientation="vertical">
<TextView
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="wefwfw"/>
<ImageView
android:id="#+id/image"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.8"
android:drawable="#drawable/adsl"/>
<TextView
android:layout_gravity="bottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="qwgq"/>
<TextView
android:layout_gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="qwgq"/>
</LinearLayout>
<View
android:layout_width="1dp"
android:layout_height="fill_parent"
android:background="#FF0000FF" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:orientation="vertical">
<TextView
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="wefwfw"/>
<ImageView
android:id="#+id/image2"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.8"
android:drawable="#drawable/adsl"/>
<TextView
android:layout_gravity="bottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="qwgq"/>
<TextView
android:layout_gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="qwgq"/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#FF0000FF" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.5"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:orientation="vertical">
<TextView
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="wefwfw"/>
<ImageView
android:id="#+id/image3"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.8"
android:drawable="#drawable/adsl"/>
<TextView
android:layout_gravity="bottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="qwgq"/>
<TextView
android:layout_gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="qwgq"/>
</LinearLayout>
<View
android:layout_width="1dp"
android:layout_height="fill_parent"
android:background="#FF0000FF" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:orientation="vertical">
<TextView
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="wefwfw"/>
<ImageView
android:id="#+id/image4"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.8"
android:drawable="#drawable/adsl"/>
<TextView
android:layout_gravity="bottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="qwgq"/>
<TextView
android:layout_gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="qwgq"/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#FF0000FF" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
So what is my problem?
Thanks in advance...