android-coordinatorlayout

footer scrolls off screen when used in CoordinatorLayout

北战南征 提交于 2019-12-01 08:23:01
I have HomeActivity which contains fragment and at the bottom it has custom navigation view as shown below. By clicking on profile pic, it replaces the fragment with UserProfileView fragment. userProfileView fragment has Collapsing toolbar inside coordinatorLayout. userprofileview.xml <?xml version="1.0" encoding="utf-8"?> <layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:bind="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"> <data> <variable name="resource" type="com.example.app

CoordinatorLayout status bar padding disappears during fragment transactions

折月煮酒 提交于 2019-12-01 06:11:22
With the 22.2.1 Design Support Library and API 22(have not tested on earlier versions yet), I'm running into issues with the status bar padding when switching between fragments. The initial fragment loads fine, but after a fragment transaction, the status bar padding disappears, pushing all the views up where they shouldn't be. The same thing happens to the original fragment after popping the back stack. Rotating the device fixes it, as does opening the soft keyboard(but only in portrait, not in landscape). main fragment on initial load or after rotation(desired) main fragment after back

Collapsible Toolbar - Make Fragment Footer Always Visible in Android

∥☆過路亽.° 提交于 2019-12-01 03:41:40
I am making an app that has a ProfilePage with three fragments - About | Posts | Gallery, and I am using a collapsible toolbar with user's image. My second and third fragment will have a footer that should always be visible, but this is what I get: When my image is expanded the footer disappears. What I want is for my two fragments to have these footers always visible and not depending on toolbar being collapsed or not. My gallery footer should be similar to post footer. profile_layout.xml: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android=

How to make custom CoordinatorLayout.Behavior with parallax scrolling effect for google MapView?

你离开我真会死。 提交于 2019-11-30 15:44:01
I try to make a parallax scrolling effect for google MapView and RecycleView using CoordinatorLayour . so base on some tutorials found on web I made below code. The 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" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <com.google.android.gms.maps.MapView android:id="@+id/map_view" android

CoordinatorLayout messing up setError popup position

荒凉一梦 提交于 2019-11-30 15:08:29
问题 I'm facing an issue with EditText setError popup position. I'm using the following code in to create the layout: activity_profile.xml <?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:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" tools

How to create AppBarLayout which overlaps content of CoordinatorLayout

孤人 提交于 2019-11-30 15:00:59
问题 When using a CoordinatorLayout with AppBarLayout on some activities I need the content to be under the AppBarLayout, i.e. the Toolbar is using some transparent color and overlays the content. By default CoordinatorLayout + AppBarLayout arrange things so that toolbar and scrolling content are next to eachother, without any overlapping. Android developer guides have the documentation on this here and it looks like this (but those flags do not seem to work with Toolbar and appcompat - I tried):

CoordinatorLayout crashes app with IndexOutOfBoundsException

别说谁变了你拦得住时间么 提交于 2019-11-30 14:04:43
问题 I'm getting a crash (from Crashlytics, unable to reproduce locally) in my app from the onLayout function in the CoordinatorLayout : Fatal Exception: java.lang.IndexOutOfBoundsException: Invalid index 3, size is 3 at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255) at java.util.ArrayList.get(ArrayList.java:308) at android.support.design.widget.CoordinatorLayout.onLayout(SourceFile:848) at android.view.View.layout(View.java:15237) at android.view.ViewGroup.layout(ViewGroup

CoordinatorLayout messing up setError popup position

时间秒杀一切 提交于 2019-11-30 13:50:54
I'm facing an issue with EditText setError popup position. I'm using the following code in to create the layout: activity_profile.xml <?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:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" tools:context=".ProfileActivity" android:orientation="vertical"> <android.support.design.widget.AppBarLayout

How to create AppBarLayout which overlaps content of CoordinatorLayout

五迷三道 提交于 2019-11-30 13:45:43
When using a CoordinatorLayout with AppBarLayout on some activities I need the content to be under the AppBarLayout, i.e. the Toolbar is using some transparent color and overlays the content. By default CoordinatorLayout + AppBarLayout arrange things so that toolbar and scrolling content are next to eachother, without any overlapping. Android developer guides have the documentation on this here and it looks like this (but those flags do not seem to work with Toolbar and appcompat - I tried): So I need something that looks like on image above, but with all the scrolling goodies provided by

How to enable/disable FloatingActionButton Behavior

北城以北 提交于 2019-11-30 13:06:16
I am working on app in some fragment i want to hide FloatingActionButtton. When i set android:visibility="gone" . Behavior animation show me FloatingActionButtton when i swipe up and down. is there is any way i can disable/enable FloatingActionButtton behavior. Thank you advance. here is my code QuickReturnFooterBehavior.java package com.app.common; import android.animation.Animator; import android.content.Context; import android.support.design.widget.CoordinatorLayout; import android.support.v4.view.ViewCompat; import android.support.v4.view.animation.FastOutSlowInInterpolator; import android