android-collapsingtoolbarlayout

CollapsingToolbarLayout expand only when at the top

喜夏-厌秋 提交于 2020-08-21 10:49:42
问题 I have some problems with AppBarLayout and CollapsingToolbarLayout. This is what currently happens: https://www.youtube.com/watch?v=z4yD8rmjSjU The downwards scrolling motion is exactly what I want. However when I scroll up again, the orange bar should appear immediately (which it does), but I want the ImageView to start appearing only when the user has scrolled to the very top. Can anyone help me to achieve this effect? This is my layout xml: <android.support.design.widget.AppBarLayout

CollapsingToolbarLayout expand only when at the top

↘锁芯ラ 提交于 2020-08-21 10:43:17
问题 I have some problems with AppBarLayout and CollapsingToolbarLayout. This is what currently happens: https://www.youtube.com/watch?v=z4yD8rmjSjU The downwards scrolling motion is exactly what I want. However when I scroll up again, the orange bar should appear immediately (which it does), but I want the ImageView to start appearing only when the user has scrolled to the very top. Can anyone help me to achieve this effect? This is my layout xml: <android.support.design.widget.AppBarLayout

Toolbar TitleTextColor not changing in dark mode

别说谁变了你拦得住时间么 提交于 2020-07-22 06:39:15
问题 I'm integrating Dark Mode , i have Collapsing toolbar and toolbar which are wrapped in an appbarlayout , the issue is when i try to set the toolbar title color into white when dark mode is set , it is not working meanwhile in light mode , the color shows accordingly , i tried almost everything but i don't know exactly what is happening , i have color and color night folders and i set up the color for both and added it to to my toolbar but it didn't change anything , if any one could help , i

Issue with CoordinatorLayout and ImageView that adjusts width while scrolling

我是研究僧i 提交于 2020-07-04 06:28:49
问题 I'm attempting to put an ImageView in a CollapsingToolbarLayout in which it takes up the full screen on load and as you scroll the content, the 16x9 resolution image width resizes until the image takes up the full width of the screen. At that point, I'd like the image to parallax with a app:layout_collapseParallaxMultiplier of 0.5 Using this XML Layout: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res

Android : MapView in a CollapsingToolbarLayout

时光毁灭记忆、已成空白 提交于 2020-06-14 06:46:34
问题 I'm currently trying to put a Map View (or a fragment containing the map)inside a CollapsingToolbarLayout . I would want to have the parallax effect on it when the RecyclerView scrolls. Unfortunately, it isn't showing up at all! Not even the grey grid! The collapsing animation is working though. I've search everywhere, but all I was able to find is about ImageView and no other component. So here are my questions : Is it even possible to put anything else than an ImageView in a

Part of the content of a CollapsingToolbarLayout is getting sticky on top, when used with viewpager and recyclerview

社会主义新天地 提交于 2020-05-23 04:31:45
问题 I am trying to implement a layout like this: The issue is that when scrolling up the card touches the toolbar and it does not go up anymore like this: I want it to scroll up till the viewpager to fills the screen ie, at least the rectangle card, should scroll up beyond the toolbar(Even the tabLayout can also scroll up). But I don't want it to stay sticky at the top. The main layout is here: <?xml version="1.0" encoding="utf-8"?> <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns

React native animation scrollview onScroll event not working with external method

白昼怎懂夜的黑 提交于 2020-05-14 01:52:03
问题 I make a collapsing tollbar in ReactNative and i need stop de animation when the Animated.ScrollView contentOffset.y is equal 240. If i put any condition or call the Animated.event in external function it dosn´t work. The Animated.Value.stopAnimation() doesn´t work either. This works: <Animated.ScrollView scrollEventThrottle={1} onScroll={ Animated.event( [{nativeEvent: {contentOffset: {y: this.state.scrollY}}}], {useNativeDriver: true} ) } > ... This doesn´t work: handlerScroll() { Animated

React native animation scrollview onScroll event not working with external method

浪子不回头ぞ 提交于 2020-05-14 01:44:07
问题 I make a collapsing tollbar in ReactNative and i need stop de animation when the Animated.ScrollView contentOffset.y is equal 240. If i put any condition or call the Animated.event in external function it dosn´t work. The Animated.Value.stopAnimation() doesn´t work either. This works: <Animated.ScrollView scrollEventThrottle={1} onScroll={ Animated.event( [{nativeEvent: {contentOffset: {y: this.state.scrollY}}}], {useNativeDriver: true} ) } > ... This doesn´t work: handlerScroll() { Animated

How to restore Collapsing Toolbar Layout State after screen orientation change

…衆ロ難τιáo~ 提交于 2020-05-10 03:44:48
问题 I've been searching for the solution of my problem for some time and didn't find solution. I want to restore my fragment's layout after screen orientation change. I have Collapsing Toolbar Layout with banner image. After screen rotation my toolbar is always expanded, I want to restore it's behavior. How can I achieve this? 回答1: You should set ID to the CoordinatorLayout . It will automatically save its state. Believe me. See here. 回答2: Try using the following AppBarLayout method: public void

How to resize TextView using MotionLayout

梦想的初衷 提交于 2020-03-19 06:56:50
问题 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