coordinator-layout

BottomNavigationView overlapping FrameLayout in CoordinatorLayout

ε祈祈猫儿з 提交于 2019-12-12 08:25:48
问题 The following is my layout xml. The problem now is that the BottomNavigationView is overlapping the FrameLayout. I wanted the FrameLayout to stretch to the top of the BottomNavigationView. I tried with trick such as adding paddingBottom in the FrameLayout but I wonder if there is other better solution. Thanks. <?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

View can not be anchored to the parent CoordinatorLayout

自作多情 提交于 2019-12-10 03:17:14
问题 I just updated to appcompat library from 23.1.1 to 23.2 and now application stopped working on java.lang.IllegalStateException: View can not be anchored to the the parent CoordinatorLayout. java.lang.IllegalStateException: View can not be anchored to the the parent CoordinatorLayout Crash comes from resolveAnchorView method of CoordinatorLayout when parent (CoordinatorLayout is not in edit mode). Layout is used as root element in base activity and contains different layouts (toolbar,

Is it possible to do a simple image view parallax with coordinator layout without the collpsing toolbar layout?

☆樱花仙子☆ 提交于 2019-12-08 17:11:50
问题 Hello lets say I have a layout which contains the following <ScrollView android:id="@+id/scroll" android:layout_below="@+id/toolbar" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_above="@+id/button"> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView android:id="@+id/image" android:layout_width="match_parent" android:layout_height="240dp" android:scaleType="centerCrop" android:src="@drawable/android" /

How to use coordinator layout with fragment as “scrolling view”

蓝咒 提交于 2019-12-05 03:30:22
I'm trying to use a coordinator layout with an appbar layout that hosts a fragment as the "scrolling view". The fragment consists of a recyclerView and a bottom aligned layout holding a button, like so: However, the bottom section is hidden by default: and only shows up after I scroll. From my activity class: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TestFragment fragment = (TestFragment) getFragmentManager().findFragmentByTag("Test"); if (fragment == null) fragment = new TestFragment();

RuntimeException: Could not inflate Behavior subclass

余生颓废 提交于 2019-12-04 16:36:53
问题 I new in android and I've troubles with FloatingActionButton behaivors My custom behavoir class: public class ScrollingFABBehavior extends FloatingActionButton.Behavior { private static final String TAG = "ScrollingFABBehavior"; public ScrollingFABBehavior(Context context, AttributeSet attrs, Handler mHandler) { super(); } @Override public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout, FloatingActionButton child, View directTargetChild, View target, int nestedScrollAxes) {

BottomNavigationView overlapping FrameLayout in CoordinatorLayout

耗尽温柔 提交于 2019-12-04 02:11:54
The following is my layout xml. The problem now is that the BottomNavigationView is overlapping the FrameLayout. I wanted the FrameLayout to stretch to the top of the BottomNavigationView. I tried with trick such as adding paddingBottom in the FrameLayout but I wonder if there is other better solution. Thanks. <?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" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/container" android:layout

CoordinatorLayout leaves empty space at the bottom after scrolling

╄→尐↘猪︶ㄣ 提交于 2019-12-03 11:11:17
问题 I am trying to implement Google's newest design tricks with CoordinatorLayout and have problems with scrolling and parallax effect. After Activity is displayed, everything looks ok but the problem occurs when I try to scroll. It seems the bottom View is not expanded correctly and after it's scrolled up, empty space appears below. Bottom View seems to be big only how much it has on initial display between top View and nav bar. It looks something like this: Relevant code: <FrameLayout xmlns

RuntimeException: Could not inflate Behavior subclass

≡放荡痞女 提交于 2019-12-03 11:04:15
I new in android and I've troubles with FloatingActionButton behaivors My custom behavoir class: public class ScrollingFABBehavior extends FloatingActionButton.Behavior { private static final String TAG = "ScrollingFABBehavior"; public ScrollingFABBehavior(Context context, AttributeSet attrs, Handler mHandler) { super(); } @Override public boolean onStartNestedScroll(CoordinatorLayout coordinatorLayout, FloatingActionButton child, View directTargetChild, View target, int nestedScrollAxes) { return nestedScrollAxes == ViewCompat.SCROLL_AXIS_VERTICAL || super.onStartNestedScroll

How to add an ImageView with the title in collapsingtoolbarlayout in Android

瘦欲@ 提交于 2019-12-01 14:05:33
I am using CoordinatorLayout to get this effect Here is the layout code. <?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="match_parent" android:layout_height="match_parent" android:id="@+id/coordinatorRootLayout" android:background="@android:color/background_light" android:fitsSystemWindows="true" > <android.support.design.widget.AppBarLayout android:id="@+id/android_appbar_layout" android:layout_width="match_parent" android

How to add an ImageView with the title in collapsingtoolbarlayout in Android

纵然是瞬间 提交于 2019-12-01 12:17:45
问题 I am using CoordinatorLayout to get this effect Here is the layout code. <?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="match_parent" android:layout_height="match_parent" android:id="@+id/coordinatorRootLayout" android:background="@android:color/background_light" android:fitsSystemWindows="true" > <android.support.design