Recyclerview is not scrolling - android

The .xml file is attached below.
The issue is my recycler view is not scrolling.
Also, to show how I'm adding Linearlayout manager, the code is below.
variantRecycler.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
ViewCompat. setNestedScrollingEnabled(variantRecycler, false);
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:layout_behavior="#string/appbar_scrolling_view_behavior"
android:layout_width="match_parent"
android:background="#color/transparent"
android:layout_height="match_parent">
<TextView
android:id="#+id/cross_icon"
style="#style/icon"
android:layout_width="#dimen/_30dp"
android:layout_height="#dimen/_30dp"
android:layout_gravity="right"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginEnd="#dimen/_10dp"
android:layout_marginRight="#dimen/_20dp"
android:layout_marginBottom="#dimen/_30dp"
android:background="#drawable/circular_cross_button" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_40dp"
android:background="#color/app_grey"
android:orientation="vertical">
<RelativeLayout
android:id="#+id/product_details_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/white">
<TextView
android:id="#+id/pick_your_option_label"
style="#style/subheading_manrope_bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/_15dp"
android:layout_marginTop="#dimen/_15dp"
android:layout_marginBottom="#dimen/_10dp"
android:text="#string/pick_your_option"
android:textColor="#color/product_name_lite_black_color"
android:textSize="#dimen/_18dp"
android:visibility="gone" />
<View
android:id="#+id/line1"
android:layout_width="match_parent"
android:layout_height="#dimen/_1dp"
android:layout_below="#id/pick_your_option_label"
android:layout_marginLeft="#dimen/_15dp"
android:layout_marginTop="#dimen/_10dp"
android:layout_marginRight="#dimen/_15dp"
android:layout_marginBottom="#dimen/_15dp"
android:background="#color/line_color"
android:visibility="invisible" />
<androidx.viewpager2.widget.ViewPager2
android:id="#+id/view_pager"
android:layout_width="#dimen/_136dp"
android:layout_height="#dimen/_136dp"
android:layout_below="#id/line1"
android:layout_marginLeft="#dimen/_16dp"
android:layout_marginTop="#dimen/_12dp"
android:layout_marginRight="#dimen/_12dp"
android:layout_marginBottom="#dimen/_8dp"
android:background="#drawable/grey_border_rounder_rectangle_8dp"
android:padding="#dimen/_1dp"
android:transitionName="#string/image" />
<LinearLayout
android:id="#+id/pager_dots"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/view_pager"
android:layout_gravity="center"
android:layout_marginLeft="#dimen/_16dp"
android:layout_marginBottom="#dimen/_15dp"
android:background="#android:color/transparent"
android:orientation="horizontal" />
<ImageView
android:id="#+id/product_image"
android:layout_width="#dimen/_120dp"
android:layout_height="#dimen/_120dp"
android:layout_marginLeft="#dimen/_10dp"
android:layout_marginRight="#dimen/_8dp"
android:layout_marginBottom="#dimen/_15dp"
android:transitionName="#string/image"
android:visibility="gone" />
<ImageView
android:id="#+id/elite_image"
android:layout_width="#dimen/_16dp"
android:layout_height="#dimen/_16dp"
android:layout_below="#id/line1"
android:layout_marginLeft="#dimen/_15dp"
android:visibility="gone"
app:srcCompat="#drawable/elite_icon" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
</RelativeLayout>
<TextView
android:id="#+id/product_name"
style="#style/body_manrope_bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/line1"
android:layout_marginTop="#dimen/_12dp"
android:layout_marginRight="#dimen/_10dp"
android:layout_toRightOf="#id/view_pager"
android:ellipsize="end"
android:maxLines="2"
android:textColor="#color/product_name_lite_black_color" />
<View
android:id="#+id/view"
android:layout_width="1dp"
android:layout_toRightOf="#id/product_name"
android:layout_marginTop="#dimen/_12dp"
android:layout_marginLeft="#dimen/_3dp"
android:background="#color/divider_grey"
android:layout_height="#dimen/_35dp"/>
<TextView
style="#style/icon"
android:id="#+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_12dp"
android:layout_gravity="center"
android:layout_toRightOf="#+id/view"
android:layout_marginLeft="#dimen/_3dp"
android:layout_marginRight="#dimen/_5dp"
android:background="?selectableItemBackground"
android:gravity="center"
android:text="#string/camera_icon_id"
android:textSize="#dimen/_24dp"
android:textStyle="bold" />
<TextView
android:id="#+id/try_on"
style="#style/subheading_manrope_bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_3dp"
android:layout_toRightOf="#id/view"
android:layout_below="#+id/icon"
android:textColor="#color/add_to_cart_violet" />
<TextView
android:id="#+id/price"
style="#style/subheading_manrope_bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/product_name"
android:layout_marginTop="#dimen/_8dp"
android:layout_toRightOf="#id/view_pager"
android:textColor="#color/product_name_lite_black_color" />
<TextView
android:id="#+id/offer_price"
style="#style/subheading_manrope_bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/product_name"
android:layout_marginLeft="#dimen/_4dp"
android:layout_marginTop="#dimen/_8dp"
android:layout_toRightOf="#id/price"
android:textColor="#color/product_mrp_lite_gray_color" />
<TextView
android:id="#+id/save_offer"
style="#style/caption_manrope_medium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/product_name"
android:layout_marginLeft="#dimen/_4dp"
android:layout_marginTop="#dimen/_10dp"
android:layout_toRightOf="#id/offer_price"
android:textColor="#color/product_offer_price_color"
android:textSize="#dimen/_13dp"
android:visibility="gone" />
<TextView
android:id="#+id/offer_percantage"
style="#style/caption_manrope_medium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/product_name"
android:layout_marginLeft="#dimen/_2dp"
android:layout_marginTop="#dimen/_10dp"
android:layout_toRightOf="#id/save_offer"
android:textColor="#color/product_offer_price_color"
android:textSize="#dimen/_13dp" />
<include
layout="#layout/new_rating_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/price"
android:layout_marginTop="#dimen/_8dp"
android:layout_toRightOf="#id/view_pager" />
<TextView
android:id="#+id/product_qty"
style="#style/caption_manrope_medium2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/new_rating_layout"
android:layout_marginLeft="#dimen/_12dp"
android:layout_marginTop="#dimen/_11dp"
android:layout_toRightOf="#id/view_pager"
android:gravity="center_vertical"
android:text="20ml"
android:textColor="#color/ash_gray"
android:textSize="#dimen/_10dp" />
<HorizontalScrollView
android:layout_below="#+id/product_qty"
android:layout_toRightOf="#id/view_pager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_6dp"
android:layout_marginLeft="#dimen/_12dp"
android:scrollbars="none">
<com.google.android.material.chip.ChipGroup
android:id="#+id/chip_group"
app:singleLine="true"
app:singleSelection="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</HorizontalScrollView>
<View
android:id="#+id/line2"
android:layout_width="match_parent"
android:layout_height="#dimen/_1dp"
android:layout_below="#id/view_pager"
android:layout_marginLeft="#dimen/_15dp"
android:layout_marginTop="#dimen/_10dp"
android:layout_marginRight="#dimen/_15dp"
android:layout_marginBottom="#dimen/_10dp"
android:background="#color/line_color"
android:visibility="invisible" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/product_details_layout"
android:layout_marginTop="#dimen/_8dp"
android:background="#color/white">
<TextView
android:id="#+id/shades_label"
style="#style/body_manrope_bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/_2dp"
android:layout_marginTop="#dimen/_8dp"
android:layout_marginBottom="#dimen/_5dp"
android:layout_toRightOf="#+id/shade"
android:textColor="#color/dark_gray_color"
android:textStyle="bold"
android:visibility="gone" />
<androidx.recyclerview.widget.RecyclerView
android:id="#+id/variant_recycler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"
android:layout_below="#+id/shade"
/>
</RelativeLayout>
</RelativeLayout>
<include
layout="#layout/variant_pop_up_bottom_bar_layout"
android:visibility="visible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

Related

ScrollView is not working inside drawer layout. I have put scroll inside navigation view.but it's not working

ScrollView is not working inside drawer layout. I have put scroll inside navigation view.but it's not working .
In following code HomeView.cs is View to show drawer layout. SliderView.cs is layout of the drawer.I have taken listview to show menu inside navigation drawer.but it's not working
I have taken frame layout because I want to show inside fragment.
//HomeView.axml
<?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:background="#color/colorWhite"
android:id="#+id/rootLayout"
android:layout_height="wrap_content">
<ImageView
android:layout_height="match_parent"
android:src="#drawable/back_radient"
android:id="#+id/bluryImg"
android:visibility="gone"
android:scaleType="centerCrop"
android:layout_width="match_parent"/>
<RelativeLayout
android:visibility="visible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/NotificationDrawerLayout"
android:background="#37CADD">
<RelativeLayout
android:layout_width="match_parent"
android:background="#37CADD"
android:padding="10dp"
android:id="#+id/notificationDrawerBarLayout"
android:minHeight="50dp"
android:layout_height="wrap_content">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="#dimen/textSize_15"
android:id="#+id/NotificationDrawerText"
android:textColor="#ffffff"
android:textStyle="normal"
android:gravity="center"
android:layout_centerInParent="true"
android:text="Composition Created Successfully" />
</RelativeLayout>
</RelativeLayout>
<android.support.v4.widget.DrawerLayout
android:id="#+id/drawer"
android:visibility="visible"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
android:id="#+id/headerLayout"
layout="#layout/HeaderView"
android:layout_alignParentTop="true" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="#+id/contentFrameRootLayout"
android:layout_below="#+id/headerLayout">
<FrameLayout
android:id="#+id/content_frameLayout"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
</RelativeLayout>
<FrameLayout
android:id="#+id/navigation_frame"
android:layout_height="match_parent"
android:layout_width="wrap_content"
android:layout_gravity="left|start" />
</android.support.v4.widget.DrawerLayout>
</RelativeLayout>
//SliderView.axml
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="#+id/scroll"
android:layout_width="match_parent"
android:fillViewport="true"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="wrap_content"
android:orientation="vertical"
android:layout_height="match_parent">
<android.support.design.widget.NavigationView
android:id="#+id/navigation_view"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:background="#drawable/side_menu"
android:layout_gravity="start">
<RelativeLayout
android:layout_width="match_parent"
android:id="#+id/topSliderView"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/btnDrawerClose"
android:layout_marginLeft="#dimen/margin_05"
android:layout_marginTop="#dimen/margin_25"
android:padding="#dimen/padding_10"
android:src="#drawable/humbergerclose"
android:background="#null"
android:tint="#ffffff" />
<refractored.controls.CircleImageView
android:id="#+id/profile"
android:layout_below="#+id/btnDrawerClose"
android:layout_width="80dp"
android:scaleType="centerCrop"
android:layout_height="80dp"
android:transitionName="EXTRA_IMAGE"
android:src="#drawable/user2"
app:civ_border_width="0dp"
android:layout_centerHorizontal="true" />
<TextView
android:id="#+id/txtViewName"
android:layout_width="match_parent"
android:layout_below="#id/profile"
android:layout_height="wrap_content"
android:text="Darshan Prajpati"
android:textSize="#dimen/textSize_16"
android:textColor="#color/colorWhite"
android:gravity="center_horizontal"
android:layout_marginTop="#dimen/margin_10" />
<TextView
android:id="#+id/txtViewEmail"
android:layout_width="match_parent"
android:layout_below="#id/txtViewName"
android:layout_height="wrap_content"
android:text="dkprajpati18#gmail.com"
android:textSize="#dimen/textSize_14"
android:textColor="#color/colorWhite"
android:gravity="center_horizontal"
android:layout_marginTop="#dimen/margin_10" />
<ListView
android:id="#+id/menuItemListView"
android:scrollbars="none"
android:layout_marginTop="#dimen/margin_10"
android:layout_width="match_parent"
android:layout_below="#id/txtViewEmail"
android:layout_height="wrap_content"
android:divider="#null" />
</RelativeLayout>
<Space
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:id="#+id/setting2ItemLayout"
android:layout_height="49dp"
android:layout_width="match_parent"
android:layout_marginLeft="#dimen/margin_20"
android:padding="#dimen/padding_05">
<ImageView
android:id="#+id/SettingImgView"
android:layout_height="wrap_content"
android:src="#drawable/Settings"
android:layout_width="18dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true" />
<TextView
android:id="#+id/SettingsTxtView"
android:text="Settings"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="#dimen/textSize_16"
android:textColor="#color/colorWhite"
android:layout_toRightOf="#+id/SettingImgView"
android:layout_marginLeft="#dimen/margin_20"
android:layout_centerVertical="true" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/setting1ItemLayout"
android:layout_height="49dp"
android:layout_below="#+id/setting2ItemLayout"
android:layout_width="match_parent"
android:layout_marginLeft="#dimen/margin_20"
android:padding="#dimen/padding_05">
<ImageView
android:id="#+id/SettingImgView"
android:layout_height="wrap_content"
android:src="#drawable/Settings"
android:layout_width="18dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true" />
<TextView
android:id="#+id/SettingsTxtView"
android:text="Settings"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="#dimen/textSize_16"
android:textColor="#color/colorWhite"
android:layout_toRightOf="#+id/SettingImgView"
android:layout_marginLeft="#dimen/margin_20"
android:layout_centerVertical="true" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/settingItemLayout"
android:layout_below="#+id/setting1ItemLayout"
android:layout_height="49dp"
android:layout_width="match_parent"
android:layout_marginLeft="#dimen/margin_20"
android:padding="#dimen/padding_05">
<ImageView
android:id="#+id/SettingImgView"
android:layout_height="wrap_content"
android:src="#drawable/Settings"
android:layout_width="18dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true" />
<TextView
android:id="#+id/SettingsTxtView"
android:text="Settings"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="#dimen/textSize_16"
android:textColor="#color/colorWhite"
android:layout_toRightOf="#+id/SettingImgView"
android:layout_marginLeft="#dimen/margin_20"
android:layout_centerVertical="true" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/FAQItemLayout"
android:layout_below="#+id/settingItemLayout"
android:layout_height="49dp"
android:layout_width="match_parent"
android:layout_marginLeft="#dimen/margin_20"
android:padding="#dimen/padding_05">
<ImageView
android:id="#+id/FAQImgView"
android:layout_height="wrap_content"
android:src="#drawable/faq"
android:layout_width="18dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true" />
<TextView
android:id="#+id/FAQTxtView"
android:text="FAQs"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="#dimen/textSize_16"
android:textColor="#color/colorWhite"
android:layout_toRightOf="#+id/FAQImgView"
android:layout_marginLeft="#dimen/margin_20"
android:layout_centerVertical="true" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/LogoutItemLayout"
android:layout_below="#+id/FAQItemLayout"
android:layout_height="49dp"
android:layout_width="match_parent"
android:layout_marginLeft="#dimen/margin_20"
android:padding="#dimen/padding_05">
<ImageView
android:id="#+id/LogoutImgView"
android:layout_height="wrap_content"
android:src="#drawable/Logout"
android:layout_width="18dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true" />
<TextView
android:id="#+id/LogoutTxtView"
android:text="Logout"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="#dimen/textSize_16"
android:textColor="#color/colorWhite"
android:layout_toRightOf="#+id/LogoutImgView"
android:layout_marginLeft="#dimen/margin_20"
android:layout_centerVertical="true" />
</RelativeLayout>
<ImageView
android:id="#+id/betaLogo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ratiomenulogo"
android:layout_centerHorizontal="true"
android:layout_below="#+id/LogoutItemLayout"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
/>
<TextView
android:id="#+id/versionTxtView"
android:text="Version 1.1.20"
android:layout_height="wrap_content"
app:fontFamily="#font/lato_regular"
android:layout_width="wrap_content"
android:textSize="#dimen/textSize_12"
android:textColor="#1DD5A5"
android:layout_toRightOf="#+id/LogoutImgView"
android:layout_marginBottom="20dp"
android:layout_below="#id/betaLogo"
android:layout_marginLeft="#dimen/margin_20"
android:layout_centerHorizontal="true" />
</RelativeLayout>
</LinearLayout>
</RelativeLayout>
</android.support.design.widget.NavigationView>
</LinearLayout>
</ScrollView>
//HomeView.cs
public class HomeView : MvxAppCompatActivity<BaseViewModel>
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
SetContentView(Resource.Layout.HomeView);
if (savedInstanceState == null)
{
MenuFragment menuFragment = new MenuFragment();
var fragmenttransaction = this.SupportFragmentManager.BeginTransaction();
fragmenttransaction.Replace(Resource.Id.navigation_frame, menuFragment, "MenuFragment");
fragmenttransaction.AddToBackStack("MenuFragment");
fragmenttransaction.Commit();
NavigateToFragment<ProposalListFragment>("ProposalListFragment", true);
}
}
}

How to keep one layout over another layout in android

This is my xml I want to keep one layout over another layout.
I have progress Bar and try again Textview in same place I am doing visible and invisible Textview and Progressbar programatically, so I want keep Progressbar over try again button, but I am unable to do this.
I have searched from google that we can do using Frame layout but its not working.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/tesco_blue"
android:paddingBottom="#dimen/margin_18"
android:paddingLeft="#dimen/margin_18"
android:paddingRight="#dimen/margin_12"
android:orientation="vertical"
android:paddingTop="#dimen/margin_18">
<LinearLayout
android:id="#+id/securebarcode_error_layout_variant_a"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical"
android:layout_marginLeft="#dimen/margin_56"
android:layout_marginRight="#dimen/margin_56"
android:visibility="visible"
tools:visibility="visible">
<android.support.v4.widget.Space
android:layout_width="match_parent"
android:layout_height="#dimen/margin_40" />
<TextView
android:id="#+id/errortitle"
style="#style/Typeface.Body.Bold.White"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="#android:color/transparent"
android:gravity="center"
android:lineSpacingExtra="4sp"
tools:text="#string/pwp_network_error" />
<TextView
android:id="#+id/errordesc"
style="#style/Typeface.Body.White"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center"
android:layout_marginTop="#dimen/margin_12"
android:lineSpacingExtra="8sp"
tools:text="#string/pwp_network_error_description" />
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_gravity="center"
>
<ProgressBar
android:id="#+id/pwp_progressbarlayout_variant_a"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:visibility="visible"
android:paddingLeft="#dimen/cl_48"
android:paddingRight="#dimen/cl_48"
android:paddingTop="#dimen/padding_12"
android:paddingBottom="#dimen/padding_12"
android:indeterminateDrawable="#drawable/custom_progress_bar"/>
</FrameLayout>
<TextView
android:id="#+id/try_again"
style="#style/Typeface.Body.Bold.HighlightBlue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="#drawable/error_button_background"
android:gravity="center"
android:paddingLeft="#dimen/cl_48"
android:paddingRight="#dimen/cl_48"
android:paddingTop="#dimen/padding_12"
android:paddingBottom="#dimen/padding_12"
android:text="#string/Tryagain"
android:textColor="#color/fdv_pending_state_color" />
<android.support.v4.widget.Space
android:layout_width="match_parent"
android:layout_height="#dimen/margin_40" />
</LinearLayout>
</LinearLayout>
You can simply use constraint layout in your case as basically its
from the family of frame layout , you can implement the code below.just take your root layout as ConstraintLayout
<TextView
android:id="#+id/try_again"
style="#style/Typeface.Body.Bold.HighlightBlue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:background="#drawable/error_button_background"
android:gravity="center"
android:paddingLeft="#dimen/cl_48"
android:paddingRight="#dimen/cl_48"
android:paddingTop="#dimen/padding_12"
android:paddingBottom="#dimen/padding_12"
android:text="#string/Tryagain"
android:textColor="#color/fdv_pending_state_color" />
<ProgressBar
android:id="#+id/pwp_progressbarlayout_variant_a"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="#id/try_again"
app:layout_constraintBottom_toBottomOf="#id/try_again"
app:layout_constraintLeft_toLeftOf="#id/try_again"
app:layout_constraintRight_toRightOf="#id/try_again"
android:visibility="visible"
android:paddingLeft="#dimen/cl_48"
android:paddingRight="#dimen/cl_48"
android:paddingTop="#dimen/padding_12"
android:paddingBottom="#dimen/padding_12"
android:indeterminateDrawable="#drawable/custom_progress_bar"/>
You have to move your try_again TextView to inside of FrameLayout so the your Progressbar will show on TextView
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/tesco_blue"
android:orientation="vertical"
android:paddingLeft="#dimen/margin_18"
android:paddingTop="#dimen/margin_18"
android:paddingRight="#dimen/margin_12"
android:paddingBottom="#dimen/margin_18">
<LinearLayout
android:id="#+id/securebarcode_error_layout_variant_a"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="#dimen/margin_56"
android:layout_marginRight="#dimen/margin_56"
android:orientation="vertical"
android:visibility="visible"
tools:visibility="visible">
<android.support.v4.widget.Space
android:layout_width="match_parent"
android:layout_height="#dimen/margin_40" />
<TextView
android:id="#+id/errortitle"
style="#style/Typeface.Body.Bold.White"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="#android:color/transparent"
android:gravity="center"
android:lineSpacingExtra="4sp"
tools:text="#string/pwp_network_error" />
<TextView
android:id="#+id/errordesc"
style="#style/Typeface.Body.White"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="#dimen/margin_12"
android:gravity="center"
android:lineSpacingExtra="8sp"
tools:text="#string/pwp_network_error_description" />
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center">
<ProgressBar
android:id="#+id/pwp_progressbarlayout_variant_a"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:indeterminateDrawable="#drawable/custom_progress_bar"
android:paddingLeft="#dimen/cl_48"
android:paddingTop="#dimen/padding_12"
android:paddingRight="#dimen/cl_48"
android:paddingBottom="#dimen/padding_12"
android:visibility="visible" />
<TextView
android:id="#+id/try_again"
style="#style/Typeface.Body.Bold.HighlightBlue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="#drawable/error_button_background"
android:gravity="center"
android:paddingLeft="#dimen/cl_48"
android:paddingTop="#dimen/padding_12"
android:paddingRight="#dimen/cl_48"
android:paddingBottom="#dimen/padding_12"
android:text="#string/Tryagain"
android:textColor="#color/fdv_pending_state_color" />
</FrameLayout>
<android.support.v4.widget.Space
android:layout_width="match_parent"
android:layout_height="#dimen/margin_40" />
Here it is the image what you want.
Update your Layout as below - Relative Layout can do the trick
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/tesco_blue"
android:paddingBottom="#dimen/margin_18"
android:paddingLeft="#dimen/margin_18"
android:paddingRight="#dimen/margin_12"
android:orientation="vertical"
android:paddingTop="#dimen/margin_18">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="#+id/securebarcode_error_layout_variant_a"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical"
android:layout_marginLeft="#dimen/margin_56"
android:layout_marginRight="#dimen/margin_56"
android:visibility="visible"
tools:visibility="visible">
<android.support.v4.widget.Space
android:layout_width="match_parent"
android:layout_height="#dimen/margin_40" />
<TextView
android:id="#+id/errortitle"
style="#style/Typeface.Body.Bold.White"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="#android:color/transparent"
android:gravity="center"
android:lineSpacingExtra="4sp"
tools:text="#string/pwp_network_error" />
<TextView
android:id="#+id/errordesc"
style="#style/Typeface.Body.White"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center"
android:layout_marginTop="#dimen/margin_12"
android:lineSpacingExtra="8sp"
tools:text="#string/pwp_network_error_description" />
<TextView
android:id="#+id/try_again"
style="#style/Typeface.Body.Bold.HighlightBlue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="#drawable/error_button_background"
android:gravity="center"
android:paddingLeft="#dimen/cl_48"
android:paddingRight="#dimen/cl_48"
android:paddingTop="#dimen/padding_12"
android:paddingBottom="#dimen/padding_12"
android:text="#string/Tryagain"
android:textColor="#color/fdv_pending_state_color" />
<android.support.v4.widget.Space
android:layout_width="match_parent"
android:layout_height="#dimen/margin_40" />
</LinearLayout>
<ProgressBar
android:id="#+id/pwp_progressbarlayout_variant_a"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_centerInParent="true"
android:visibility="visible"
android:indeterminateDrawable="#drawable/custom_progress_bar"/>
</RelativeLayout>
</LinearLayout>

android fragment replace fiil_parent with frame layout

according to picture when i replace my fragment into FrameLayout the the size is not fit. for example my button in page is under the main layout object
activity_main layout code
<?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:id="#+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/colorPrimary"
android:orientation="vertical"
tools:context="com.teskaco.bbpos.Activities.MainActivities.MainActivity">
<com.alirezaafkar.toolbar.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/colorPrimary"
android:paddingTop="#dimen/app_bar_top_padding"
app:direction="rtl"
app:font="#string/font_path"
app:navigationIcon="#drawable/m_e_n_u"
app:optionsMenu="#menu/main_menu">
<com.teskaco.bbpos.CustumView.CustomTextView
android:id="#+id/main_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="#string/psp_name"
android:textColor="#color/colorControlNormal"
android:textSize="#dimen/small_text_size" />
</com.alirezaafkar.toolbar.Toolbar>
<FrameLayout
android:id="#+id/main_fragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<include
android:id="#+id/buttonPanel"
layout="#layout/main_top_bar" />
</LinearLayout>
my fragment layout xml code
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:id="#+id/fragment_pay"
tools:context="com.teskaco.bbpos.Activities.MainActivities.PayBillFragment">
<com.teskaco.bbpos.CustumView.CustomButton
android:id="#+id/send_button"
style="#style/LightRaiseColorButtonRippleStyle"
android:layout_width="#dimen/_300sdp"
android:layout_height="#dimen/button_height"
android:layout_gravity="center"
android:layout_marginTop="#dimen/_4sdp"
android:gravity="center"
android:text="#string/send_button"
android:textColor="#color/disable_button"
android:textSize="#dimen/button_text_size" />
<LinearLayout
android:orientation="vertical"
android:gravity="center|top"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="match_parent"
android:layout_marginTop="#dimen/_6sdp"
android:background="#color/white">
<RelativeLayout
android:id="#+id/skech_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_4sdp"
android:background="#color/white">
<ImageView
android:id="#+id/skech_image"
android:layout_width="#dimen/_90sdp"
android:layout_height="#dimen/_101sdp"
android:layout_centerHorizontal="true"
android:src="#drawable/ghabz" />
<com.teskaco.bbpos.CustumView.CustomTextView
android:id="#+id/ghabz_textview"
android:layout_width="#dimen/_250sdp"
android:layout_height="wrap_content"
android:layout_below="#+id/skech_image"
android:layout_centerHorizontal="true"
android:layout_marginTop="#dimen/_21sdp"
android:gravity="center"
android:text="#string/bill_text"
android:textSize="#dimen/mediume_text_size" />
</RelativeLayout>
<LinearLayout
android:id="#+id/name_layout"
android:layout_width="#dimen/_250sdp"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_8sdp"
android:background="#drawable/raduis_bg_edit_text"
android:orientation="horizontal">
<com.teskaco.bbpos.CustumView.CustomTextInputLayout
android:id="#+id/shenase_text_input_layout"
android:layout_width="#dimen/_210sdp"
android:layout_height="wrap_content"
android:layout_margin="#dimen/_5sdp"
android:theme="#style/TextLabel">
<com.teskaco.bbpos.CustumView.CustomEditText
android:id="#+id/id_bill"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="#dimen/_6sdp"
android:layout_marginRight="#dimen/_6sdp"
android:layout_marginTop="#dimen/_4sdp"
android:background="#null"
android:gravity="right"
android:hint="#string/id_Bill_text"
android:inputType="number"
android:paddingBottom="#dimen/_4sdp"
android:textColor="#color/green_blue"
android:textSize="#dimen/defult_text_size" />
</com.teskaco.bbpos.CustumView.CustomTextInputLayout>
<android.support.v7.widget.AppCompatImageView
android:layout_width="#dimen/_16sdp"
android:layout_height="#dimen/_12sdp"
android:layout_gravity="center"
android:layout_marginLeft="#dimen/_5sdp"
android:background="#drawable/user_id" />
</LinearLayout>
<LinearLayout
android:id="#+id/name_layout1"
android:layout_width="#dimen/_250sdp"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_8sdp"
android:background="#drawable/raduis_bg_edit_text"
android:orientation="horizontal">
<com.teskaco.bbpos.CustumView.CustomTextInputLayout
android:id="#+id/payment_text_input_layout"
android:layout_width="#dimen/_210sdp"
android:layout_height="wrap_content"
android:layout_margin="#dimen/_5sdp"
android:theme="#style/TextLabel">
<com.teskaco.bbpos.CustumView.CustomEditText
android:id="#+id/id_payment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="#dimen/_6sdp"
android:layout_marginRight="#dimen/_6sdp"
android:layout_marginTop="#dimen/_4sdp"
android:background="#null"
android:gravity="right"
android:hint="#string/id_payment_text"
android:inputType="number"
android:paddingBottom="#dimen/_4sdp"
android:textColor="#color/green_blue"
android:textSize="#dimen/defult_text_size" />
</com.teskaco.bbpos.CustumView.CustomTextInputLayout>
<android.support.v7.widget.AppCompatImageView
android:layout_width="#dimen/_16sdp"
android:layout_height="#dimen/_12sdp"
android:layout_gravity="center"
android:layout_marginLeft="#dimen/_5sdp"
android:background="#drawable/user_id" />
</LinearLayout>
<com.teskaco.bbpos.CustumView.CustomButton
android:id="#+id/barcode_reader"
style="#style/GrayRaiseColorButtonRippleStyle"
android:layout_width="#dimen/_250sdp"
android:layout_height="#dimen/button_height"
android:layout_gravity="center"
android:layout_marginTop="#dimen/_24sdp"
android:gravity="center"
android:text="#string/barcode_reader_text"
android:textColor="#color/disable_button"
android:textSize="#dimen/button_text_size" />
</LinearLayout>
</LinearLayout>
replace code
fragmentManager = getSupportFragmentManager();
fragmentManager.beginTransaction().replace(R.id.main_fragment, PayBillFragment.newInstance()).addToBackStack("PayBill").commit();
You have to use Parent Layout as RelativeLayout and use RelativeLayout property.
<com.alirezaafkar.toolbar.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/colorPrimary"
android:paddingTop="#dimen/app_bar_top_padding"
app:direction="rtl"
app:font="#string/font_path"
app:navigationIcon="#drawable/m_e_n_u"
app:optionsMenu="#menu/main_menu">
<com.teskaco.bbpos.CustumView.CustomTextView
android:id="#+id/main_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="#string/psp_name"
android:textColor="#color/colorControlNormal"
android:textSize="#dimen/small_text_size" />
</com.alirezaafkar.toolbar.Toolbar>
<FrameLayout
android:id="#+id/main_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="#+id/buttonPanel" />
<include
android:id="#+id/buttonPanel"
layout="#layout/tab_bottom_menus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
</RelativeLayout>

Android soft keyboard partially overlapping views

I am using android:windowSoftInputMode="stateHidden|adjustResize" to adjust keyboard on screen. It is not working in Tablets with OS 4.4 but it is working fine in Mobile devices. Below I am attaching image.
Here is my layout
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/bg_main"
android:id="#+id/parentCanvas">
<android.support.v7.widget.Toolbar
android:id="#+id/toolbar_edit_screen"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_alignParentTop="true"
android:background="#color/toolbarTransparent"
android:elevation="4dp"
app:titleTextColor="#color/setting_button"
android:theme="#style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:popupTheme="#style/ThemeOverlay.AppCompat.Light"
></android.support.v7.widget.Toolbar>
<RelativeLayout
android:layout_width="414.75dp"
android:layout_height="233.25dp"
android:id="#+id/parentCanvas1"
android:layout_below="#id/toolbar_edit_screen"
android:layout_marginTop="10.00dp"
android:layout_marginLeft="10.00dp"
android:layout_alignParentLeft="true">
<ImageView
android:id="#+id/imageView1"
android:layout_width="414.75dp"
android:layout_height="233.25dp"
android:background="#android:color/white"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
/>
<ProgressBar
android:id="#+id/progressBarMainImage"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_centerInParent="true"
android:visibility="gone"
/>
</RelativeLayout>
<LinearLayout
android:id="#+id/relativeLayoutButtons"
android:layout_width="64.00dp"
android:layout_height="match_parent"
android:layout_below="#id/toolbar_edit_screen"
android:paddingLeft="10.00dp"
android:paddingRight="10.00dp"
android:layout_alignTop="#id/parentCanvas1"
android:layout_toRightOf="#id/parentCanvas1"
android:weightSum="5"
android:orientation="vertical"
android:layout_alignBottom="#id/parentCanvas1"
>
<ImageButton
android:id="#+id/buttonAdd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_ic__add"
android:background="#android:color/transparent"
android:paddingTop="19dp"
android:paddingBottom="19dp"
android:paddingLeft="19dp"
android:paddingRight="19dp"
android:layout_alignParentTop="true"
android:layout_weight="1"
android:layout_marginBottom="2dp"/>
<ImageButton
android:id="#+id/buttonCopy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/buttonAdd"
android:src="#drawable/ic_dup"
android:background="#android:color/transparent"
android:layout_weight="1"
android:layout_marginBottom="2dp"
android:paddingTop="19dp"
android:paddingBottom="19dp"
android:paddingLeft="19dp"
android:paddingRight="19dp"
/>
<ImageButton
android:id="#+id/buttonSlideShow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/buttonCopy"
android:src="#drawable/ic_play"
android:background="#android:color/transparent"
android:layout_marginBottom="2dp"
android:paddingTop="19dp"
android:paddingBottom="19dp"
android:paddingLeft="19dp"
android:paddingRight="19dp"
android:layout_weight="1"/>
<ImageButton
android:id="#+id/buttonRemove"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/buttonSlideShow"
android:src="#drawable/ic_delete"
android:background="#android:color/transparent"
android:layout_marginBottom="2dp"
android:paddingTop="19dp"
android:paddingBottom="19dp"
android:paddingLeft="19dp"
android:paddingRight="19dp"
android:layout_weight="1"/>
<ImageButton
android:id="#+id/selectImag"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/buttonRemove"
android:src="#drawable/ic_imgimport"
android:background="#android:color/transparent"
android:layout_marginBottom="2dp"
android:layout_marginTop="4dp"
android:paddingTop="15dp"
android:paddingBottom="19dp"
android:paddingLeft="19dp"
android:paddingRight="19dp"
android:layout_weight="1"/>
</LinearLayout>
<View
android:id="#+id/straightLine"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="#android:color/white"
android:layout_toRightOf="#id/relativeLayoutButtons"
android:layout_below="#id/toolbar_edit_screen"
/>
<RelativeLayout
android:id="#+id/relativeLayoutCircleDropdown"
android:layout_width="414.75dp"
android:layout_height="200px"
android:layout_alignParentBottom="true"
android:layout_alignLeft="#id/parentCanvas1"
android:layout_alignRight="#id/parentCanvas1"
android:layout_below="#+id/parentCanvas1">
<ImageButton
android:id="#+id/drawCircle"
android:layout_width="50.75dp"
android:layout_height="50.75dp"
android:scaleType="fitXY"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
android:src="#drawable/circle_img"
android:background="#android:color/transparent"
android:layout_marginRight="6.75dp"/>
<View
android:id="#+id/view_small_line"
android:layout_width="1dp"
android:layout_height="35.50dp"
android:layout_toRightOf="#id/drawCircle"
android:layout_marginLeft="7.00dp"
android:layout_marginRight="7.00dp"
android:layout_centerVertical="true"
android:background="#android:color/white"
android:layout_marginTop="8.00dp"
/>
<ssi.sarissa.views.EditTextWithBackEvent
android:id="#+id/editTextDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="5dp"
android:layout_toRightOf="#id/view_small_line"
android:focusable="true"
android:inputType="text"
android:cursorVisible="false"
android:maxLines="1"
android:maxLength="160"
android:focusableInTouchMode="true"
android:layout_marginRight="3.00dp"
android:layout_centerVertical="true"
android:background="#drawable/edit_text_background"
android:textSize="16sp"
android:hint="Description"
/>
<Spinner
android:id="#+id/spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:background="#drawable/spinner"
android:layout_toRightOf="#id/editTextDescription"
/>
</RelativeLayout>
<RelativeLayout
android:id="#+id/relativeLayoutList"
android:layout_width="158.50dp"
android:layout_height="match_parent"
android:layout_below="#id/toolbar_edit_screen"
android:layout_toRightOf="#id/straightLine"
android:layout_alignParentRight="true"
android:layout_alignTop="#id/relativeLayoutButtons"
>
<android.support.v7.widget.RecyclerView
android:id="#+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="none"
/>
</RelativeLayout>
</RelativeLayout>
I don't know where I am getting wrong.

Disable scroll down from ListView - Android

I have an Activity that has multiple TextViews and one ListView at the end of it. I noticed that the ListView has its own Scroll down, what I want to do is disable the ListView scroll down and create one ScrollView for the whole screen. Can I do that?
This is the XML for the Activity:
Edit: I added a scrollView for the screen but it's somehow affecting the ListView because it only shows one item of the list.
<?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">
<android.support.v7.widget.Toolbar
android:id="#+id/toolbarOrderDetail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:background="#drawable/topbg"
android:minHeight="?attr/actionBarSize">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="#+id/lblBackButtonOrderDetail"
android:layout_width="40dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:onClick="goBackToTabs"
android:layout_marginTop="#dimen/margin_five"
android:drawableLeft="#drawable/back" />
<TextView
android:id="#+id/lblOrderDetailHeader"
fontPath="fonts/Roboto-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:text="Order Details"
android:textSize="21sp" />
</RelativeLayout>
</android.support.v7.widget.Toolbar>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center|left"
android:orientation="vertical"
android:paddingLeft="8dp"
android:paddingRight="8dp">
<TextView
android:id="#+id/lblOrderId"
fontPath="fonts/Roboto-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/toolbarOrderDetail"
android:layout_marginLeft="#dimen/margin_ten"
android:layout_marginTop="#dimen/margin_ten"
android:text="#string/order_id"
android:textSize="#dimen/activity_horizontal_margin" />
<TextView
android:id="#+id/lblOrderIdData"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/lblOrderId"
android:layout_alignTop="#+id/lblOrderId"
android:layout_below="#+id/toolbarOrderDetail"
android:layout_marginLeft="#dimen/margin_ten"
android:layout_toRightOf="#+id/lblOrderId"
android:gravity="center"
android:text="" />
<View
android:id="#+id/viewOrder1"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="#+id/lblOrderId"
android:layout_marginTop="#dimen/margin_ten"
android:background="#color/line_color"></View>
<TextView
android:id="#+id/lblBeestroNameHeader"
fontPath="fonts/Roboto-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/viewOrder1"
android:layout_marginLeft="#dimen/margin_ten"
android:layout_marginTop="#dimen/margin_ten"
android:text="#string/bistro_name"
android:textSize="#dimen/activity_horizontal_margin" />
<TextView
android:id="#+id/lblBistroName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/lblBeestroNameHeader"
android:layout_alignTop="#+id/lblBeestroNameHeader"
android:layout_marginLeft="#dimen/margin_ten"
android:layout_toRightOf="#+id/lblBeestroNameHeader"
android:gravity="center"
android:text="" />
<View
android:id="#+id/viewOrder2"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="#+id/lblBeestroNameHeader"
android:layout_marginTop="#dimen/margin_ten"
android:background="#color/line_color"></View>
<TextView
android:id="#+id/lblOrderStatus"
fontPath="fonts/Roboto-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/viewOrder2"
android:layout_marginLeft="#dimen/margin_ten"
android:layout_marginTop="#dimen/margin_ten"
android:text="#string/order_status"
android:textSize="#dimen/activity_horizontal_margin" />
<TextView
android:id="#+id/lblOrder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/lblOrderStatus"
android:layout_alignTop="#+id/lblOrderStatus"
android:layout_marginLeft="#dimen/margin_ten"
android:layout_toRightOf="#+id/lblOrderStatus"
android:gravity="center"
android:text=""
android:textColor="#android:color/holo_red_light" />
<View
android:id="#+id/viewOrder3"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="#+id/lblOrderStatus"
android:layout_marginTop="#dimen/margin_ten"
android:background="#color/line_color"></View>
<TextView
android:id="#+id/lblPaymentMethodHeader"
fontPath="fonts/Roboto-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/viewOrder3"
android:layout_marginLeft="#dimen/margin_ten"
android:layout_marginTop="#dimen/margin_ten"
android:text="#string/payment_method"
android:textSize="#dimen/activity_horizontal_margin" />
<TextView
android:id="#+id/lblPaymentMethod"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/lblPaymentMethodHeader"
android:layout_alignTop="#+id/lblPaymentMethodHeader"
android:layout_marginLeft="#dimen/margin_ten"
android:layout_toRightOf="#+id/lblPaymentMethodHeader"
android:gravity="center"
android:text="" />
<View
android:id="#+id/viewOrder4"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="#+id/lblPaymentMethod"
android:layout_marginTop="#dimen/margin_ten"
android:background="#color/line_color"></View>
<TextView
android:id="#+id/lblDate"
fontPath="fonts/Roboto-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/viewOrder4"
android:layout_marginLeft="#dimen/margin_ten"
android:layout_marginTop="#dimen/margin_ten"
android:text="Date: "
android:textSize="#dimen/activity_horizontal_margin" />
<TextView
android:id="#+id/lblDateTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/lblDate"
android:layout_alignTop="#+id/lblDate"
android:layout_marginLeft="#dimen/margin_ten"
android:layout_toRightOf="#+id/lblDate"
android:gravity="center"
android:text="" />
<View
android:id="#+id/viewOrder5"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="#+id/lblDate"
android:layout_marginTop="#dimen/margin_ten"
android:background="#color/line_color"></View>
<TextView
android:id="#+id/lblTime"
fontPath="fonts/Roboto-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/viewOrder5"
android:layout_marginLeft="#dimen/margin_ten"
android:layout_marginTop="#dimen/margin_ten"
android:text="Time: "
android:textSize="#dimen/activity_horizontal_margin" />
<TextView
android:id="#+id/lblTimeTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/lblTime"
android:layout_alignTop="#+id/lblTime"
android:layout_marginLeft="#dimen/margin_ten"
android:layout_toRightOf="#+id/lblTime"
android:gravity="center"
android:text="" />
<View
android:id="#+id/viewOrder6"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="#+id/lblTime"
android:layout_marginTop="#dimen/margin_ten"
android:background="#color/line_color"></View>
<TextView
android:id="#+id/lblTotal"
fontPath="fonts/Roboto-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/viewOrder6"
android:layout_marginLeft="#dimen/margin_ten"
android:layout_marginTop="#dimen/margin_ten"
android:text="Total Price: "
android:textSize="#dimen/activity_horizontal_margin" />
<TextView
android:id="#+id/lblTotalTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/lblTotal"
android:layout_alignTop="#+id/lblTotal"
android:layout_marginLeft="#dimen/margin_ten"
android:layout_toRightOf="#+id/lblTotal"
android:gravity="center"
android:text="" />
<View
android:id="#+id/viewOrder7"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="#+id/lblTotal"
android:layout_marginTop="#dimen/margin_ten"
android:background="#color/line_color"></View>
<TextView
android:id="#+id/lblItem"
fontPath="fonts/Roboto-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/viewOrder7"
android:layout_marginLeft="#dimen/margin_ten"
android:layout_marginTop="#dimen/margin_ten"
android:text="Items Ordered:"
android:textSize="#dimen/activity_horizontal_margin" />
<TextView
android:id="#+id/lblItem1"
fontPath="fonts/Roboto-Bold.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/lblItem"
android:layout_marginLeft="#dimen/margin_ten"
android:layout_marginTop="#dimen/margin_ten"
android:text="Name/Quantity/Price"
android:textSize="#dimen/activity_horizontal_margin" />
<ListView
android:id="#+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="#id/lblItem1"
android:layout_marginBottom="#dimen/margin_ten"
android:layout_marginTop="#dimen/margin_ten"
android:background="#android:color/transparent"
android:divider="#color/line_color"
android:dividerHeight="1dp"
android:scrollbars="none" />
<include
android:id="#+id/beeGif"
layout="#layout/view_bee_animation"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_centerInParent="true"></include>
</LinearLayout>
</ScrollView>
</LinearLayout>
This should work.
listView.setOnTouchListener(new OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
return true;
}
});

Categories

Resources