androiddesignsupport

Fragment within CollapsingToolbarLayout with ViewPager won't slide down

蓝咒 提交于 2019-12-03 00:51:56
I have an activity with a CollapsingToolbarLayout and a TabLayout. When I slide right and left it moves perfectly between fragments. However when I try to scroll down (red arrow in the screenshot) it ignores it. I tried adding a ScrollView to the fragment but it did not make a different. Any ideas why? BTW - Somehow on the second fragment, a RecycleView, the sliding down works. This is seen on the right Screenshot: MainActivity's XML: <android.support.design.widget.CoordinatorLayout android:id="@+id/root_coordinator" android:layout_width="match_parent" android:layout_height="match_parent">

Panning google map in CoordinatorLayout causes recyclerview to scroll in android design support library 23.0.1

ぃ、小莉子 提交于 2019-12-02 23:21:14
The map is in a collapsingToolbarLayout which is nested in an appBarLayout. In versions 22.2.0 and 22.2.1 of the android design support library, I could pan around the map independently of the coordinatorLayout but in 23.0.1, if i try to pan across the map in the north/south axis, it causes the recyclerview to scroll up/down. Is this a bug or is there a way to pass the touch events from the appBarLayout to the mapFragment? <android.support.design.widget.AppBarLayout android:id="@+id/app_bar_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android

How to implement animated vector drawables using the design support library 23.2?

僤鯓⒐⒋嵵緔 提交于 2019-12-02 19:47:12
I've seen the android developers blog that the new design support library 23.2 supports animated vector. When i searched i came across this link to implement animated vector drawable. Is it the same way to implement animated vector drawables in design support library 23.2? Can someone help me out with the new implementation? Here's a link to an example project on Github implementing the Support Library to make this Floating Action Button. Using the Support Library is very similar to the non-Support Library method in that the xml files for AnimatedVectorDrawables are the same, as are the

What is the difference between AppBarLayout vs Toolbar?

Deadly 提交于 2019-12-02 14:07:43
I want to include Toolbar in my app, but the design support library just came out with AppBarLayout , so I just need clarification on what the difference is and when I would use one over the other. The AppBarLayout is used to achieve various scrolling behaviors such as collapse, flex space, and quick return. http://www.google.com/design/spec/patterns/scrolling-techniques.html http://android-developers.blogspot.com/2015/05/android-design-support-library.html If you want just to include the Toolbar without any scrolling effects you can use Toolbar. But if you want to make some scrolling effects

How to add an ImageView with the title in collapsingtoolbarlayout in Android

瘦欲@ 提交于 2019-12-01 14:05:33
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

How to add an ImageView with the title in collapsingtoolbarlayout in Android

纵然是瞬间 提交于 2019-12-01 12:17:45
问题 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

Move cardview on Snackbar - Co-ordinator layout

▼魔方 西西 提交于 2019-12-01 11:41:45
问题 I have a custom textview in a cardview at the bottom of the screen and using snackbar to display error messages on logging in. Now when the snackbar shows, the sign up textview should move up. I have tried using co-ordinator layout but it does not work. This is the image 回答1: You need to implement a layout behavior for your View and reference it from your layout xml file. It is simple to implement your own layout behavior. In your case, you only need to set the translation y of your view when

Viewpager not appearing when using CollapsingToolbarLayout

心已入冬 提交于 2019-12-01 06:07:39
I've been playing around with the Design Support Library and have come across a little problem that I hope someone can help me out with. I'm using a CollapsingToolbar which contain an ImageView which collapses in parralax. In the CollapsingToolbar, I alse have a TabLayout which is supposed to scroll my ViewPager. My issue is that the ViewPager doesn't appear. The issue seems to arise only when I set my ViewPager layout_height to match_parent or wrap_content. If I set it to 600dp, then the problem is gone but then the view ends up being a fixed length which isn't very nice. Any help would be

Viewpager not appearing when using CollapsingToolbarLayout

六眼飞鱼酱① 提交于 2019-12-01 04:04:20
问题 I've been playing around with the Design Support Library and have come across a little problem that I hope someone can help me out with. I'm using a CollapsingToolbar which contain an ImageView which collapses in parralax. In the CollapsingToolbar, I alse have a TabLayout which is supposed to scroll my ViewPager. My issue is that the ViewPager doesn't appear. The issue seems to arise only when I set my ViewPager layout_height to match_parent or wrap_content. If I set it to 600dp, then the

TabLayout selected tab gravity

时间秒杀一切 提交于 2019-12-01 03:15:39
TabLayout is set up with ViewPager , has a lot of tabs, MODE_SCROLLABLE and keyline app:tabContentStart="72dp" . When user selects a tab, TabLayout tries to scroll the selected tab to the center. I would like the selected tab to be left aligned to keyline, not centered. Is it possible? Android Design Support Library v22.2.0. Unfortunately the method calculateScrollXForTab() of TabLayout is private and then not replaceable by subclasses. Either way you can copy the source TabLayout in your project, then possibly extending it with your class, and change the method calculateScrollXForTab() like