android-coordinatorlayout

CoordinatorLayout + AppBarLayout + NavigationDrawer

眉间皱痕 提交于 2019-11-28 15:47:04
I have a layouting problem when combining CoordinatorLayout with an AppBarLayout and a NavigationDrawer . The problem is, that the NavigationDrawer and it's content are hidden behind the toolbar. I have already did a lot of research and tried a lot of restructuring, but none of the "solutions" fixed my issue. A demonstration can be found in this little Webm video: https://www.dropbox.com/s/i5zfc2x2ts2fws7/navigation_drawer_stackoverflow32523188.webm?dl=0 The base style is Theme.AppCompat.Light.NoActionBar . My activity_overview.xml looks like this: <?xml version="1.0" encoding="utf-8"?>

Android Material Design profile page [closed]

徘徊边缘 提交于 2019-11-28 15:31:27
问题 I'm new to android and material design. Could some one please help me point to any websites that help me build a profile screen as below as per Google's material design guidelines? 回答1: I was about to write a blog on this screen briefing about CoordinatorLayout . Anyways.. You can have my fully working code.: activity_scrolling.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

Add app bar scrolling view behavior to multiple views in CoordinatorLayout

与世无争的帅哥 提交于 2019-11-28 15:08:28
I am looking to add scroll support to more than just a single, scrollable, child view of CoordinatorLayout in conjunction with an AppBarLayout and CollapsingToolbarLayout . When scrolling the RecyclerView or the AppBarLayout (condensed code below), the app bar and its contents successfully scroll and collapse. However, when attempting to initiate a scroll event on the LinearLayout above the RecyclerView , nothing happens because the LinearLayout does not know to scroll or collapse the view. The goal is to have the LinearLayout act as a sticky header to the RecyclerView and footer to the

CoordinatorLayout with RecyclerView And Collapsing header

爷,独闯天下 提交于 2019-11-28 14:42:33
问题 I have a layout like the following: (Toolbar, Header View, Text View, RecyclerView) I need the header to be collapsed when I scrolling recyclerview's items. So that the view "Choose item" and recyclerview left on the screen. I saw examples when toolbar is being collapsed, but I need toolbar to be present always. Which layouts/behavior should I use to get this work? 回答1: You can achieve it by having this layout: <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas

CoordinatorLayout Toolbar invisible on enter until full height

旧街凉风 提交于 2019-11-28 13:29:07
Included in my activity_main.xml 's DrawerLayout is a CoordinatorLayout called content_layout.xml . Within this CoordinatorLayout is my AppBarLayout containing a Toolbar , then a LinearLayout for a fragment's content. When a fragment containing a RecyclerView is scrolled up, the toolbar exits successfully. The problem lies when scrolling down to bring the toolbar back. The toolbar does not appear until the full height of the toolbar has been scrolled and as such leaves an unsightly white box in its place as shown. toolbar http://i59.tinypic.com/33xil5d.png content_layout.xml <android.support

Content behind CoordinatorLayout AppBarLayout

空扰寡人 提交于 2019-11-28 09:39:20
I was creating a settings activity/layout for my app. I have a CoordinatorLayout with an AppBarLayout and Toolbar , then beneath that it includes content_settings.xml . When the content loads the .xml file is behind the app bar. I'm using this same setup to load the main content and it works fine, but for some reason isn't rendering correctly within the Settings section. activity_settings.xml <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/AppTheme.AppBarOverlay"> <android.support.v7.widget.Toolbar

webview height grows indefinitely inside a nestedScrollView

柔情痞子 提交于 2019-11-28 09:17:48
This is my layout. When i load google.com, the webview's height keeps growing indefinitely. The onSizeChange function of the webview keeps getting called and i can see the webview keeps expanding indefinitely. I've tried 22.2.1 and 23.1.0 of the design and appcompat libraries and no effect. Any solution ? :-| <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:background="@android:color/black"> <android

NestedScrollView + CoodinatorLayout scrollBy() scrollTo() methods do nothing

社会主义新天地 提交于 2019-11-28 09:13:03
问题 I have a NestedScrollView being used with CoordinatorLayout + AppBarLayout + CollapsingToolbarLayout with parallax effect similar to this tutorial I need to scroll the content programmatically (preferably a smooth scroll, i.e. animated), however calling the scroll methods (scrollBy(), scrollTo(), smoothScrollTo(), smoothScrollBy()) do nothing. Note that I am using app:layout_behavior="@string/appbar_scrolling_view_behavior" <-- Not sure if the issue is related to this. I'm calling nsv_form

Add icon with title in CollapsingToolbarLayout

微笑、不失礼 提交于 2019-11-28 05:04:44
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"

NestedScrollView and CoordinatorLayout. Issue on Scrolling

老子叫甜甜 提交于 2019-11-28 04:30:51
I have a strange issue with the CoordinatorLayout and the NestedScrollView (with the design support library 22.2.0) Using a content smaller than NestedScrollView I should have a fixed content. However trying to scroll up and down the content I can obtain that the content is displaced and never again in their own place. Here a little sample: Here the code: <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