android-collapsingtoolbarlayout

CoordinatorLayout leaves empty space at the bottom after scrolling

╄→尐↘猪︶ㄣ 提交于 2019-12-03 11:11:17
问题 I am trying to implement Google's newest design tricks with CoordinatorLayout and have problems with scrolling and parallax effect. After Activity is displayed, everything looks ok but the problem occurs when I try to scroll. It seems the bottom View is not expanded correctly and after it's scrolled up, empty space appears below. Bottom View seems to be big only how much it has on initial display between top View and nav bar. It looks something like this: Relevant code: <FrameLayout xmlns

Collapsible Toolbar: Set how much the toolbar should be collapsed in onCreate

独自空忆成欢 提交于 2019-12-03 10:55:10
I'm creating a ListView and its corresponding DetailView application. My ListView has items which if clicked take the user to the DetailViewActivity . On the DetailViewActivity , I've implemented a Collapsible Toolbar. Now, every time the DetailViewActivity is opened, a different image (with different dimensions) is set onto the ImageView within the Collapsible Toolbar. I want that the Toolbar should be open up to a certain height by default (say 256dp), but if the image height is greater than that, the user should be able to pull down to view the rest of the image. (exactly like Whatsapp) I

How I can multiline the expanded title of CollapsingToolbarLayout?

*爱你&永不变心* 提交于 2019-12-03 10:45:40
问题 My problem is the next. I would use relatively large texts as CollapsingToolbarLayout title so I need to show it as multiline mode. When I try to change text appearance through the setExpandedTitleTextAppearance() method it doesn't work. The code who I used is the next: <style name="ToolbarExpandedTitle"> <item name="android:textSize">48sp</item> <item name="android:shadowColor">#ffffff</item> <item name="android:textColor">@android:color/white</item> <item name="android:singleLine">false<

Expanding And Collapsing Toolbar In Android

末鹿安然 提交于 2019-12-03 09:55:35
问题 I am implementing expanding and collapsing toolbar with the help of collapsing toolbar but I am stuck when my toolbar is collapsed I want to show different toolbar. I have seen so piece of code but cannot be able to find my solution. I have also seen the solution of one of the amazing developer https://github.com/saulmm/CoordinatorLayoutExample but cannot be able to find out my solution properly This is my piece of code which i have implemented activity_collapsing_toolbar.xml <?xml version="1

Menu item on bottom of CollapsingToolbarLayout when expanded

假装没事ソ 提交于 2019-12-03 09:32:25
I've been searching for a while as shown on the following images but unfortunately I was not able to find anything similar edit menu item is moving to bottom of CollapsingToolbarLayout when it is expanded I tried a long combination of atributes for menu item but without success This is my attempt My screen 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" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"

How to put RecyclerView below Toolbar and above TabLayout and ViewPager also handling responses to scrolls in a custom manner?

◇◆丶佛笑我妖孽 提交于 2019-12-03 08:02:10
问题 I want to create a layout like the below image: A CoordinatorLayout which contain : CollapsingToolbarLayout( contain ImageView & Toolbar) RecyclerView TabLayout ViewPager( that each fragment of it contain a RecyclerView) I wanna responding to scroll events in this way: CollapsingToolbarLayout expand and collapse by scrolling Toolbar sticks to the top until TabLayout reach to the top After that toolbar scroll up and TabLayout stick to the top I'm having trouble with the RecyclerView between

Detecting when AppBarLayout/CollapsingToolbarLayout is completely expanded

给你一囗甜甜゛ 提交于 2019-12-03 05:52:05
I have a fragment that uses the new CoordinatorLayout/AppBarLayout/CollapsingToolbarLayout paradigm, and I'd like to be able to detect when the collapsing toolbar is fully expanded so that I can perform an operation on the entire fragment it's in, e.g. popping the fragment off the stack and going to a new one, dismissing the fragment. I have the dismissing code working, I just need to know when and when not to use it. I've experimented a bit with AppBarLayout.OnOffsetChangedListener , but didn't have much luck. Is there a way to use it to determine when things are completely expanded, or is

How to center the title of a CollapsingToolbarLayout?

老子叫甜甜 提交于 2019-12-03 05:45:54
问题 I tried setExpandTitleTextAppearance , but it didn't work. I want to center the expanded title text. 回答1: There is an attribute expandedTitleGravity that you can use with the CollapsingToolbarLayout to center the expanded title text. Add this to your CollapsingToolbarLayout: app:expandedTitleGravity="bottom|center_horizontal" 回答2: In my use case, I set app:titleEnabled to false, I didn't need it anyway. After that, my gravity was respected properly inside the Toolbar layout. 回答3: @Javed,

CollapsingToolbarLayout not collapsing when EditText get focused

倖福魔咒の 提交于 2019-12-03 05:05:57
I am using CollapsingToolBar inside CoordinatorLayout and I've NestScrollView containing some EditText as child views. What i am facing is when edittext get focused and keybaoard appear my complete view doesn't scroll up. Below is the code and image as output of that layout. <android.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="@dimen/app_bar_height" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> <android.support.design.widget.CollapsingToolbarLayout android:id="@+id/collapsing_toolbar" android:layout

CollapsingToolBarLayout - status bar scrim color doesn't change

自作多情 提交于 2019-12-03 04:33:40
I updated my android studio few days ago and started working with the CoordinatorLayout and CollapsingToolbarLayout just trying stuff. It seems that the Toolbar scrim colour override the status bar initial colour and the status bar scrim colour (tried both from xml and code) initial state: started scrolling: scrolled until collapsing: So the questions are: How can I prevent the toolbar to override the status bar when collapsing (not even letting the image I'm collapsing to go above it). How can I change status bar colour after collapsing Another issue I had is that I gave the toolbar initial