android-design-library

CollapsingToolbarLayout setTitle() not working anymore

[亡魂溺海] 提交于 2019-12-09 00:30:18
问题 The setTitle() method from CollapsingToolbarLayout had some bugs already (like showing only after a scroll, fixed in v22.2.1 ). Today I updated to v23.0.0 , and it is simply not working, like no title is shown. By calling it multiple times with a delay, I can see that sometimes the title is there, but it is really not reliable (like, you switch to another fragment, then back to the first, and there's no title anymore). I found there's a new attribute, app:titleEnabled or

Stop scroll on CollapsingToolbarLayout so it doesn't completely collapse

自作多情 提交于 2019-12-08 23:03:33
问题 I have a CollapsingToolbarLayout setup and im placing a wallpaper there. I want to be able to stop it from collapsing all the way. I have tried minheight and many other things but can't figure it out. How can i get it to stop collapsing to the second screenshot? View when activity is loaded Desired Stopping Point Current Stopping Point 回答1: CollapsingToolbarLayout works really closely with Toolbar and as such the collapsed height depends on the toolbar. I was able to solve your problem using

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

View which can be pulled up with a floating action button like google maps app

流过昼夜 提交于 2019-12-08 11:56:19
问题 I am trying to make something seen in Google Maps App when one clicks on a POI on the map a view comes up having a floating action button anchored to it. In my scenario it is like this but there is already a FAB which is already visible and when an action is triggered a small view is visible with an anchored FAB showing some details and when it is pulled up it covers the screen just like an activity (something visible in the aforementioned google maps app). I am compiling the app with SDK

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

Navigation Drawer statusbar

て烟熏妆下的殇ゞ 提交于 2019-12-08 05:18:45
问题 I'm having trouble making Navigation drawer over statusbar . I'm using new Design support library. In blogspot thay said: NavigationView takes care of the scrim protection of the status bar for you, ensuring that your NavigationView interacts with the status bar appropriately on API21+ devices. But it has no documentation so I'm very confused how to use Drawer to achieve desired effect. I tried inserting following attributes in my styles-v21: <item name="android

In TextInputLayout change the color of hint for single letter or alphabet

丶灬走出姿态 提交于 2019-12-07 17:34:14
问题 I have defined TextInputLayout programmatically in my Activity. I have added EditText inside that TextInputLayout, that to programmatically. Now, I have to set the color of hint of that edittext. Here I just have to change the color of single alphabet of the hint. Example - Hint is like, Firstname *. Here i want to change the color of "*" to Red and remaining hint as black in color. I have already tried Html and Spannable String, but both are not working for TextInputLayout. For Spannable i

CollapsingToolbarLayout | Scrolling and layout issues

时间秒杀一切 提交于 2019-12-07 12:35:19
问题 Related Questions CollapsingToolbarLayout | Scrolling and layout issues 2 Question I have been working with the Android Support Design Library and successfully implemented the CoordinatorLayout that causes the Toolbar and TabLayout to scroll out of view when scrolling. This works very well, so I figured I would try my luck with the new CollapsingToolbarLayout . In a seperate activity, I have been having issue-after-issue with implementing CollapsingToolbarLayout . I am, as they say, close but

CoordinatorLayout adds space between AppBarLayout and RecyclerView

杀马特。学长 韩版系。学妹 提交于 2019-12-07 06:14:04
问题 CoordinatorLayout adds space between AppBarLayout and RecyclerView . Not sure whether its the Toolbar or AppBarLayout . Screenshot of the rendered layout on phone: The design rendering on Studio doesn't how this space. Any idea on what's going on? The Code Itself. <?xml version="1.0" encoding="utf-8"?> <FrameLayout 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

NavigationView slow to open / Skipping frames (Android Design Lib)

拟墨画扇 提交于 2019-12-07 06:07:19
问题 I'm using a NavigationView supplied by the Android Design Library. I've found after adding a few items to it that is performing quite poorly. On first launch it takes a second or so to open for the firs time. Here's a screenshot of the UI. I'll try to post some of the relevant bits of code. Drawer XML <group android:checkableBehavior="single"> <item android:id="@+id/home" android:checked="false" android:icon="@drawable/ic_home" android:title="Home" /> <item android:id="@+id/about" android