android-support-design

ways to add 18dpx18dp size image right of title in collapsing toolbar layout? but not in toolbar

烈酒焚心 提交于 2019-12-11 22:40:52
问题 I want to put an icon right to title in collapsing tool bar, shown as below but After collapsing i don't want it to show in tool bar. i want to hide after collapsing. i have done some thing. using collapsingToolbarLayout.setTitle(item.getName()); collapsingToolbarLayout.setForeground(getResources().getDrawable(R.drawable.ic_photo_library_white_24dp)); which look like this. i am still trying to adjust that image. but i want to hide that image after collapsing. bez it looks like this. here is

NullPointerException on TextInputLayout.passwordVisibilityToggleRequested

无人久伴 提交于 2019-12-10 13:47:49
问题 I got an error in Firebase crash reporting about Password toggle button on an app in release mode in some real devices. The problem is the stack trace error is all about android.support.design code like you will see in the following log taken from firebase console: Exception java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference android.graphics.drawable.AnimatedVectorDrawable.isStarted (AnimatedVectorDrawable.java:427)

How to use selectors to change icons with the new TabLayout

我们两清 提交于 2019-12-09 08:05:50
问题 I'm using the new support TabLayout from Android. The thing is that I wanted to use selectors to change the icon when a tab is selected. I've been looking into the source code and it seems to me that the it never changes the state of the view (and for that reason I can't use the selector). Does anyone knows some workaround? Thank you! 回答1: There is way to set customView as a tab with setCustomView(View view) method. So you can create a textview and set a selector to it and set this view to

Import new Android Design Support library

喜夏-厌秋 提交于 2019-12-08 15:07:57
问题 Hi i'am trying to import the new android support library like this com.android.support:support-design:22.0.0 but i got this error after sync the gradle : failed to find 回答1: You have to update your Android Support Repository in SDK Manager, then just add this dependency to your build.gradle : compile 'com.android.support:design:22.2.0' com.android.support:support-design:22.0.0 is wrong. 回答2: dependencies { implementation 'com.android.support:design:28.0.0' } 回答3: The docs has it wrong. It

CollapsingToolbarLayout & NestedScrollView don't work together

南楼画角 提交于 2019-12-08 10:28:19
问题 I'm trying to make CollapsingToolbarLayout work with NestedScrollView , but it doesn't follow the scrolling of NestedScrollView correctly. It moves a little bit when the NestedScrollView reaches the top or bottom end, but that's clearly not the intended behavior. Oh, and the contentScrim covers the ImageView immediately as well. Here's a video of what happens: https://youtu.be/1GlTJq5fd0U And here's the xml: <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas

BottomNavigationView hides when scrolling up instead of down

本小妞迷上赌 提交于 2019-12-08 00:25:45
问题 The new BottomNavigationView from support library v25.0.0 is supposed to hide when scrolling down, in order to see all the items from a list. However, in my testing scenario, the view hides when scrolling up. Any ideas what can cause this reverse behavior? The inner_fragment is set up as a Fragment inserted inside the activity_main_framelayout_content Framelayout. XML layouts below: main_activity.xml: <android.support.design.widget.CoordinatorLayout android:id="@+id/activity_main

SwipeRefreshLayout prevents AppBarLayout scrolling down with showing refresh circle after updating support libs to 23.2.0

删除回忆录丶 提交于 2019-12-07 07:51:14
问题 After updating google libs to 23.2.0 faced issue, that was in previous support libs version (as I remember it was 22+ or 23.1.0 ). I have RecyclerView in SwipeRefreshLayout , which is in CoordinatorLayout that have AppBarLayout with CollapsingToolbarLayout . So when I now have CollapsingToolbarLayout not fully expanded and try to expand it the swipeRefresh indicator appears, instead of expanding CollapsingToolbarLayout . What can I do? 回答1: So seems to be that it's an old-new bug in 23.2.0

BottomNavigationView hides when scrolling up instead of down

我与影子孤独终老i 提交于 2019-12-06 13:26:05
The new BottomNavigationView from support library v25.0.0 is supposed to hide when scrolling down, in order to see all the items from a list. However, in my testing scenario, the view hides when scrolling up. Any ideas what can cause this reverse behavior? The inner_fragment is set up as a Fragment inserted inside the activity_main_framelayout_content Framelayout. XML layouts below: main_activity.xml: <android.support.design.widget.CoordinatorLayout android:id="@+id/activity_main_coordinatorlayout" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support

SwipeRefreshLayout prevents AppBarLayout scrolling down with showing refresh circle after updating support libs to 23.2.0

雨燕双飞 提交于 2019-12-05 17:35:16
After updating google libs to 23.2.0 faced issue, that was in previous support libs version (as I remember it was 22+ or 23.1.0 ). I have RecyclerView in SwipeRefreshLayout , which is in CoordinatorLayout that have AppBarLayout with CollapsingToolbarLayout . So when I now have CollapsingToolbarLayout not fully expanded and try to expand it the swipeRefresh indicator appears, instead of expanding CollapsingToolbarLayout . What can I do? mohax So seems to be that it's an old-new bug in 23.2.0 version of support library. When I change my depencies to older version ( 23.1.1 ) bug dissapears. Now

How to hide toolbar after collapsing while recyclerView scrolling down

守給你的承諾、 提交于 2019-12-05 11:26:36
How to hide toolbar after collapsing while recyclerView scrolling down, show toolbar when recyclerView scrolling up, and expand CollapsingToolbarLayout at the end of list? Now CollapsingToolbarLayout just collapse, and toolbar is showing all time when scrolling. <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:id="@+id/coordinatorlayout" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="