android-collapsingtoolbarlayout

Android Toolbar collapseMode issue

南笙酒味 提交于 2019-11-28 09:24:21
I have an Issue making " toolbar with Title text " Not to Collapse while scrolling upwards in CollapsingToolbarLayout. I have tried a few tweaks, by using app:layout_collapseMode="none" as attribute in my android.support.v7.widget.Toolbar but its not working. Maybe there is a problem with my layout. Below is what i am trying to achieve. But when i scroll to the top, the Toolbar also collapse, and the tabBar also scrolls inside, and become non-visible. below is what i have now. This is my Layout Code <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk

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

collapsing toolbar layout like google play store

断了今生、忘了曾经 提交于 2019-11-28 06:00:44
i want to make a collapsing toolbar layout like google play store. like this: https://sendvid.com/ugjspx8r and here is my layout: http://sendvid.com/s4mx3xem how can i do that with new android support library? here is my layout xml file: <android.support.design.widget.CoordinatorLayout xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:focusableInTouchMode="true"> <android.support.design.widget.AppBarLayout android:id="@+id/appBarLayout" android:layout

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"

Android Material Design - How to change background color of Toolbar after CollapsingToolbarLayout is collapsed

天大地大妈咪最大 提交于 2019-11-28 04:30:00
After the user scrolls down the screen, the image in the CollapsingToolbarLayout disappears and is left with a toolbar with the back button, content title, and settings menu. I want to know how to change the background color of that toolbar only when its in a 'collapsed' state. The action I am referring to is similar to this where the toolbar background color changes to green: Below the CollapsingToolbarLayout I have a NestedScrollView with CardViews I think you're after app:contentScrim . <android.support.design.widget.CollapsingToolbarLayout ... app:contentScrim="?attr/colorPrimary"> <!--

Using AppBarLayout.Behavior.DragCallback to control scroll of collapsing toolbar layout

半腔热情 提交于 2019-11-28 03:45:45
问题 I want to be able to enable and disable the scroll of collapsing toolbar. Can anyone show me an example how to use AppBarLayout.Behavior.DragCallback? https://developer.android.com/reference/android/support/design/widget/AppBarLayout.Behavior.DragCallback.html 回答1: In order to enable/disable the scroll of the collapsing toolbar you can provide a custom DragCallback as part of your AppBarLayout's behavior. Here is a sample code: private void setAppBarDragging(final boolean newValue) {

How to avoid CollapsingToolbarLayout not being snapped or being “wobbly” when scrolling?

限于喜欢 提交于 2019-11-28 03:16:28
Background Suppose you have an app you've created that has a similar UI as the one you can create via the wizard of "scrolling activity", yet you wish the scrolling flags to have snapping, as such: <android.support.design.widget.CollapsingToolbarLayout ... app:layout_scrollFlags="scroll|exitUntilCollapsed|snap" > The problem As it turns out, on many cases it has issues of snapping. Sometimes the UI doesn't snap to top/bottom, making the CollapsingToolbarLayout stay in between. Sometimes it also tries to snap to one direction, and then decides to snap to the other . You can see both issues on

Show CollapsingToolbarLayout Title ONLY when collapsed

末鹿安然 提交于 2019-11-28 02:47:21
the title says it all. I've tried setExpandedTitleColor and setCollapsedTitleColor (switching to and from transparent) with no luck. I can't see any built in methods that'll do what I'm looking for, either. I only want to show the title when the CollapsingToolbarLayout is fully collapsed, otherwise, I need it hidden. Any hints? steven274 You can add OnOffsetChangedListener to AppBarLayout to determine when CollapsingToolbarLayout is collapsed or expanded and set it's title. final CollapsingToolbarLayout collapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id

Android RecyclerView with CollapsingToolbarLayout smooth scroll issue

痴心易碎 提交于 2019-11-28 01:29:57
问题 I want to use CollapsingToolbarLayout with RecyclerView , like Whatsapp . Here is the captured video : https://sendvid.com/0oi2lxx5 So when I scroll up it's okay, but when I scroll down it's not smooth. I want to scroll it smoothly with RecyclerView . So here is my profile_activity.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" android

Error Inflating CollapsingToolbarLayout

ⅰ亾dé卋堺 提交于 2019-11-27 23:05:32
问题 I recently updated the support design library to the latest version and now every activity that has a CollapsingToolbarLayout throws the following exception: java.lang.NoSuchMethodError: No static method setLayoutDirection(Landroid/graphics/drawable/Drawable;I)V in class Landroid/support/v4/graphics/drawable/DrawableCompat; or its super classes (declaration of 'android.support.v4.graphics.drawable.DrawableCompat' appears in /data/data/com.radioafrica.music/files/instant-run/dex/slice-com