android-coordinatorlayout

Translucent/Transparent status bar + CoordinatorLayout + Toolbar + Fragment

谁都会走 提交于 2019-11-26 19:59:13
问题 I have following setup: I'm using AppCompat MainActivity, that holds a fragment and has a toolbar, that's hiding when scrolling down Fragment with RecyclerView all views that should fit the screen have the according android:fitsSystemWindows="true" in the xml layout The problem is, I can't get the statusbar transparent in this case. What I do is following: Create the activity and call setContent Then I try to adjust the activity to programmatically get a translucent toolbar like following:

Floating Action Button not showing fully inside a fragment

血红的双手。 提交于 2019-11-26 18:58:09
问题 I am using FAB button along with RecyclerView in a Fragment. This Fragment is an instance of a TabViewPager. I am having a issue with the FAB button. I have placed the RecyclerView and the fab button inside a FrameLayout, where the FAB buttton is positioned bottom right. Now the problem that I am facing is the FAB button is not fully visible. Its half of the portion is hidden as shown in the screenshot below. Can any one help me to solve this issue. Thanks in advance. Note: The FAB is

How to mimic Google Maps' bottom-sheet 3 phases behavior?

点点圈 提交于 2019-11-26 18:43:03
问题 Background I'm assigned to make a UI that behaves similar to how Google Maps shows a bottom-sheet for a found result. It has three different phases: Bottom content. The upper area is still touchable and won't scroll anything at the bottom Full screen content, while the upper area has a large header. Full screen content, while the upper area has just the toolbar. Here's what I'm talking about on Google Maps: The problem Thing is, the bottom sheet isn't a part of the design library yet (though

NestedScrollView's smoothScrollTo() behaves weird

拟墨画扇 提交于 2019-11-26 18:38:07
问题 What I am trying to achieve is to scroll to scroll_position_1 when tab1 (and so on) is clicked like this. I don't understand what's happening at all. Below is the structure of my layout. <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v4.widget.NestedScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.constraint

Show/hide BottomNavigationView on scroll in CoordinatorLayout with AppBarLayout

不羁的心 提交于 2019-11-26 18:32:31
问题 I am trying to use both AppBarLayout and BottomNavigationLayout in a single CoordinatorLayout and I'm having difficulties hiding the BottomNavigationLayout as required by the material guideline. I mean something like this: <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android

Theme Error - how to fix?

微笑、不失礼 提交于 2019-11-26 17:29:56
问题 Tried Many Solution But No Helped Ref : Failed to find style 'coordinatorLayoutStyle' in current theme But not Helped Render Problem: Failed to find style 'coordinatorLayoutStyle' in current theme Tip: Try to refresh the layout. build.gradle file of my project is : buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.1.4' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files

How to disable scrolling of AppBarLayout in CoordinatorLayout?

喜欢而已 提交于 2019-11-26 15:59:42
问题 I have MapFragment with parallax effect inside AppBarLayout : I want to disable scrolling on AppBarLayout , because it is not possible to move across map, since touch evenys on the map are always handled as scroll events. I would like to handle collapsing of AppBarLayout by scrolling RecyclerView only, which is on the bottom of the screen. This is my xml: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width="match

Android - footer scrolls off screen when used in CoordinatorLayout

元气小坏坏 提交于 2019-11-26 15:03:33
I have an AppBarLayout that scrolls off screen when scrolling a RecyclerView . Below the RecyclerView there is a RelativeLayout that is a footer. The footer is shown only after scrolling up - it behave like it has layout_scrollFlags="scroll|enterAlways" but it doesn't have any scroll flags - is it a bug or am I doing something wrong? I want it to be always visible before scroll after scroll Update opened a google issue on this - it was marked 'WorkingAsIntended' this still doesn't help because I want a working solution of a footer inside a fragment. Update 2 you can find the activity and the

Failed to find style &#39;coordinatorLayoutStyle&#39; in current theme

此生再无相见时 提交于 2019-11-26 13:03:46
I'm using the latest version of android studio (3.0), along with latest build tools (27) and similar API level. The layout does not get rendered in the design tab and it's causing a lot of trouble especially that I'm using coordinator layout. How do I get around this problem? I solved this rendering problem by simply inserting this line into the application theme (the app theme is usually placed in styles.xml ). [ SDK 28 ] <style name="AppTheme"> <item name="coordinatorLayoutStyle">@style/Widget.Support.CoordinatorLayout</item> </style> [ SDK 27 ] <style name="AppTheme"> <item name=

CoordinatorLayout using the ViewPager&#39;s RecyclerView

扶醉桌前 提交于 2019-11-26 12:55:47
问题 I am using the view CoordinatorLayout from android.support.design . I want to attach the app:layout_behavior to the fragment\'s RecyclerView ? In the example given by Google, they only attach it in the RecyclerView of the same XML file where the CoordinatorLayout was attached. Is there a way to attach CoordinatorLayout to the fragment\'s RecyclerView within the ViewPager ? The sample is in this blog post at Android Developers blog. 回答1: Chris Banes has posted a sample on Github which shows