android-coordinatorlayout

CoordinatorLayout inside another CoordinatorLayout

偶尔善良 提交于 2020-01-09 04:17:51
问题 CorodinatorLayout inside another CoordinatorLayout such that scrolling the child-view should also scroll the Parent CoordinatorLayout . I have a coordinatorLayout with ViewPager that contains different Fragment such that on Scroll will hide the tabLayout I have another coordinatorLayout that has a viewPager . This fragment is inflated in ViewPager of parent fragment(parent Coordinator layout ). The problem is onScrolling the child fragment in childViewpager only reflects in coordinator layout

Android - the item inside RecyclerView can't be clicked after scroll

对着背影说爱祢 提交于 2020-01-09 04:17:30
问题 I just upgraded to API 26 and support library 26.0.2. But I found that my RecyclerView items is not clickable right after the scrolling. If you wait for a second, it will work. But if you click the item immediately, it won't. Even if the RecyclerView is not scrolling at all(e.g. has scrolled to the top). When I downgraded to support library 25.4.0 everything goes fine again. The key point is that my RecyclerView is in a CoordinatorLayout and has a SCROLL_FLAG_SCROLL flag on my Toolbar of the

Different toolbar for each fragment or change Scroll Behaviour in new Coordinator Layout?

不羁的心 提交于 2020-01-07 09:05:35
问题 I implemented the Navigation Drawer by using the template provided by Google in New Android Studio 1.4. Here it automatically created everything including the layout and class. This is my activity_main.xml <?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" android:layout_width=

How to place views exactly in the center in coordinator layout?

杀马特。学长 韩版系。学妹 提交于 2020-01-06 18:34:13
问题 I have a fragment with recycler view and a textview which will be shown when no data is available. fragment is hosted in the activity which is having coordinator layout. Now the problem is that text view is not exactly in center of screen but when toolbar collapse it comes in center. I want the textview exactly in the center. How to do that. state]2]2 Activity's Layout <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http:/

How to place views exactly in the center in coordinator layout?

大城市里の小女人 提交于 2020-01-06 18:34:08
问题 I have a fragment with recycler view and a textview which will be shown when no data is available. fragment is hosted in the activity which is having coordinator layout. Now the problem is that text view is not exactly in center of screen but when toolbar collapse it comes in center. I want the textview exactly in the center. How to do that. state]2]2 Activity's Layout <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http:/

BottomNavigationView with FloatingActionButton inside CoordinatorLayout dont match position

别来无恙 提交于 2020-01-03 21:12:51
问题 I want to hide my bottom bar on scroll but a FAB should stay on the screen. If I put the FAB on top of BottomNavigationView using anchors but it appears behind it. If I put layout_insetEdge="bottom" to the BottomNavigationView then it works but make my tests fail (https://issuetracker.google.com/issues/70162122) so I cannot use that at the moment. Layout: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res

Fragment layout with FAB conflict with CoordinatorLayout

陌路散爱 提交于 2020-01-03 17:24:33
问题 Im using MaterialDrawer with a MainDrawerActivity where I replace each fragment inside container FrameLayout based on selected item, but I want to add a FAB (just for this fragment) that interacts with CoordinatorLayout so it can handle cool animations. MainDrawer layout: <?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:layout_width=

Failed to Load fragments when tabs + viewpager inside scrollview ?

…衆ロ難τιáo~ 提交于 2020-01-02 04:20:28
问题 using material design tablayout +viewpager material design tablayout everything works perfectly but if i m trying to put parent view as ScrollView so that my whole screen can scroll once user try to see tabs fragment content as fragment contains listview so it is getting very low height on small devices.After adding scrollview my fragments of viewpager are not being displayed ?how to overcome in this situation ? <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas

ViewPager's height in Coordinator layout is more than available

大憨熊 提交于 2020-01-01 08:55:46
问题 I have a CoordinatorLayout with a Toolbar and a TabLayout inside the AppBarLayout . Additionally, I have a ViewPager inside the CoordinatorLayout but outside the ViewPager . The problem is that the ViewPager's height is bigger than what is actually available, resulting in some views from my Fragment being cut. <?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

Move views up when SnackBar appears in CoordinatorLayout

情到浓时终转凉″ 提交于 2020-01-01 04:57:05
问题 I have a TextView at the bottom of the CoordinatorLayout . But when I show a SnackBar , it will cover the TextView . I know I have to customize a Behavior for the TextView and override layoutDependsOn and onDependentViewChanged ,but it doesn't fix very well. Could you give me some advice if you know? Thanks. 回答1: You need to add a behavior to your LinearLayout and embed it in a CoordinatorLayout . Here is how you do that. MoveUpwardBehavior.class import android.os.Build; import android