android-collapsingtoolbarlayout

How to resize TextView using MotionLayout

烈酒焚心 提交于 2020-03-19 06:55:27
问题 I'm trying to create a CollapsingToolbar animation using MotionLayout . I've successfully animated everything to behave just like a CollapsingToolbar with a high level of flexibility, which means I can easily create awesome animations without writing a large amount of code. My problem is no matter what I tried; I can't resize the title's TextView in a natural way. I'm currently using ConstraintLayout version 2.0.0-beta3 Trial #1 CustomAttribute of textSize <ConstraintSet android:id="@+id/dish

CollapsingToolbarLayout: custom contentScrim similar to Facebook

只谈情不闲聊 提交于 2020-02-26 07:19:06
问题 I want to create a custom contentScrim for my collapsingToolbarLayout . My collapsingToolbarLayout has an imageview inside. When it scrolls, in theory the imageview is suppose to fade out and my scrim color is suppose to fade in. We all know we can create a scrim like this: <android.support.design.widget.CollapsingToolbarLayout android:id="@+id/collapsing_toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" app:contentScrim="?attr/colorPrimary" android:background=

How to have a collapsing of top view into a smaller sized view?

六月ゝ 毕业季﹏ 提交于 2020-02-17 06:50:12
问题 This question was asked before in a too broad and unclear way here, so I've made it much more specific, with full explanation and code of what I've tried. Background I'm required to mimic the way the Google Calendar has a view at the top, that can animate and push down the view at the bottom, yet it has extra, different behavior. I've summarized what I'm trying to do on 3 characteristics: Pressing on the toolbar will always work, to toggle expanding/collapsing of the top view, while having an

AppBarLayout CollapsingToolbar how to disable expand on EditText click?

懵懂的女人 提交于 2020-02-02 04:39:05
问题 In my test app I disable expansion of AppBarLayout when it is collapsed (by scrolling RecycleView ). I do that by adding addOnOffsetChangedListener to AppBarLayout . However, when I click EditText it expands again but, I do not want it to expand. How to disable the expansion of AppBarLayout when I click EditText ? I have put the whole code, so that everyone can copy/paste the code, create new project and test this fast. Here is how the .gif looks Here is XML code: <?xml version="1.0" encoding

How to set background of collapsing toolbar with custom behavior to fit whole screen

孤者浪人 提交于 2020-01-22 20:09:27
问题 I'm following nice repo which shows how to make custom behavior of collapsing toolbar WhatsApp-ProfileCollapsingToolbar. What I don't like is when picture below toolbar (toolbar's font is white) is white then toolbar is not visible. So I'm trying to set background of toolbar to some color. First I added to widget_header_view.xml android:background="@android:color/holo_red_light" and now I have it like: <?xml version="1.0" encoding="utf-8"?> <com.anton46.whatsapp_profile.HeaderView xmlns

(Design Support Library) CollapsingToolbarLayout — Toolbar not getting pinned on collapse

余生颓废 提交于 2020-01-22 09:00:26
问题 I'm having trouble integrating the Design Support Library into my application. For some reason, the toolbar collapses with the CollapsingToolbarLayout, and does not leave it pinned like in the Cheesesquare example by Chris Banes. https://github.com/chrisbanes/cheesesquare I didn't do anything different to my layout. In fact, I replaced my styles with his, and dropped in his layout. I wonder if using Toolbar, instead of android.support.v7.widget.Toolbar is causing this. Here is the problem.

How to increase font size of title in CollapsingToolbarLayout?

爷,独闯天下 提交于 2020-01-16 04:38:05
问题 I tried to add this on my Collapsing Toolbar Layout . app:expandedTitleTextAppearance="@style/TextAppearance.AppCompat.Title" app_bar_home.xml <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:id="@+id/CoordinatorLayout" android:fitsSystemWindows="true">

Snackbar and CollapsingToolbarLayout with TranslucentNavigation

时间秒杀一切 提交于 2020-01-14 03:39:47
问题 I have Created an app with Scrolling Activity from the Android Studio Templets to test my coding of my main App affects that behavior or not, so I have just add to the code : <item name="android:windowTranslucentNavigation" tools:targetApi="kitkat">true</item> that shows the Snackbar behind the navigation bar as this screenshot (PS : I am using Xstane for redesigning my Navigation bar on my mobile but I think that does not affect the code cuz i have tried TranslucentNavigation with Snackbar

How to fix a view in collapsing toolbar while scrolling?

孤人 提交于 2020-01-11 03:16:06
问题 I want to implement collapsing toolbar with two EditText in it, for the purpose of user input. I'm following this answer. The answer gives perfect solution for adding two EditText into the collapsing toolbar. But the behavior is not as expected. What I've achieved: Expected Behavior: My XML 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:layout_width="match_parent"

CoordinatorLayout with multiple snapping points

落爺英雄遲暮 提交于 2020-01-10 11:36:31
问题 Here I've got quite a complex animation that may be resolved (I believe) in a simple way using the CoordinatorLayout. It has 3 states: Initial (left screen) - Header view is shown fully (orange background): Toolbar, grey roundrect (it's actually a photo there) plus some other views below (TextViews, RatingBar etc) Scrolling the content up (middle screen) - roundrect is zooming up with a changing green foreground alpha level over it, so it becomes green while scrolling (well, it is not obvious