android-support-design
Android BottomSheetDialogFragment does not expand completely
Using this code in onCreateView. getDialog().setOnShowListener(new DialogInterface.OnShowListener() { @Override public void onShow(DialogInterface dialog) { BottomSheetDialog d = (BottomSheetDialog) dialog; FrameLayout bottomSheet = (FrameLayout) d.findViewById(R.id.design_bottom_sheet); CoordinatorLayout coordinatorLayout = (CoordinatorLayout) bottomSheet.getParent(); BottomSheetBehavior bottomSheetBehavior = BottomSheetBehavior.from(bottomSheet); bottomSheetBehavior.setPeekHeight(bottomSheet.getHeight()); coordinatorLayout.getParent().requestLayout(); } });
How to hide ToolBar when I scrolling content up?
you have to do many changes in your both layout. first use CoordinatorLayout in activity_main.XML like below(change theme as per your requirement). <?xml version=”1.0″ encoding=”utf-8″?> <android.support.design.widget.CoordinatorLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” android:id=”@+id/main_content” android:layout_width=”match_parent” android:layout_height=”match_parent” android:fitsSystemWindows=”true”> <android.support.design.widget.AppBarLayout android:layout_width=”match_parent” android:layout_height=”wrap_content” android:theme=”@style/ThemeOverlay.AppCompat.Dark.ActionBar”> <android.support.v7.widget.Toolbar android:id=”@+id/toolbar” android:layout_width=”match_parent” android:layout_height=”?attr/actionBarSize” android:background=”?attr/colorPrimary” android:theme=”@style/ThemeOverlay.AppCompat.Dark.ActionBar” app:layout_scrollFlags=”scroll|enterAlways” app:popupTheme=”@style/ThemeOverlay.AppCompat.Light” /> </android.support.design.widget.AppBarLayout> <include layout=”@layout/content_main” /> </android.support.design.widget.CoordinatorLayout> in content_main.XML use android.support.v4.widget.NestedScrollView instead … Read more
How to enable/disable toolbar scrolling programmatically when using design support library
The Toolbar, being a child of the AppBarLayout, gets its LayoutParams from the AppBarLayout. These layout params have the scroll flags that are set in the XML. So, you get the AppBarLayout.LayoutParams from the Toolbar, and call setScrollFlags() to change the flags to the value you want. Toolbar toolbar = findViewById(R.id.toolbar); // or however you … Read more
AppBarLayout.setExpanded(boolean, true) weird animation in support library 23.1.1
The issue was reported and fixed
Recycler view item fill up entire recycler view height after upgrading support library from “23.1.1” to “23.2.1”
Update It appears that you are updating the LayoutParam for your View in your Adapter. It is possible to tell this because your UI appears absolutely fine until you begin scrolling. This means that your XML is correct as it is defined in your XML layout file. The fact that it changes after scrolling begins, … Read more
How to enable horizontal scroll in tab like Google Play?
TabLayout has a method setTabMode() which can be either MODE_FIXED (default) or MODE_SCROLLABLE which is what you need. You can also define this in XML with app:tabMode=”scrollable”.