android-design-library

Gradle error after add android support design library

北城以北 提交于 2019-12-07 04:27:37
问题 I'm getting this error after add compile 'com.android.support:design:22.2.0' to my gradle file: .../app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.0/res/values/values.xml with this message Error:(1) Attribute "insetForeground" has already been defined . I have this on my build.gradle file: ` compile 'com.android.support:design:22.2.0' compile 'com.android.support:cardview-v7:22.2.0' compile 'com.android.support:recyclerview-v7:22.2.0' compile 'com.google.android

Single fling to uncollapse Android's CollapsingToolbarLayout

﹥>﹥吖頭↗ 提交于 2019-12-07 03:32:07
问题 I have implemented a CollapsingToolbarLayout with a parallax view. When I scroll back up the RecyclerView in one continuous scroll it uncollapses the CollapsingToolbarLayout . But when I issue a 'fling' the nested scroll view, it stops at the top of the nested scroll view. You have to fling again to uncollapse the CollapsingToolbarLayout , The ScrollingActivity template in Android Studio 2.0 demonstrates this problem. And Chris Bain's Cheesecake project, in the detail view, demonstrates the

Why are my buttons' click areas too small inside a CollapsingToolbarLayout?

时光毁灭记忆、已成空白 提交于 2019-12-07 02:24:19
问题 I've got three buttons inside a CollapsingToolbarLayout . When expanded, the idea is to modify a filter on the image gallery being displayed, or pop up an edit dialog. I was getting inconsistent results–the buttons were only responding to clicks intermittently. Eventually, I realized the issue was that the clickable area was much smaller than the client rect of the view. Horizontally, they seem normal, but vertically the clickable area is much shorter than the button. In the emulator I was

setError for TextInputLayout showing Error

送分小仙女□ 提交于 2019-12-07 00:53:48
问题 TextInputLayout working fine, when tried to set Error it showing error. Code: if (etFirstName.getText().length() == 0) { etFirstName.requestFocus(); tvFirstName.setError("Please enter firstname"); } else { tvFirstName.setError(null); tvFirstName.setErrorEnabled(false); } Check Log: java.lang.RuntimeException: Failed to resolve attribute at index 24 at android.content.res.TypedArray.getColor(TypedArray.java:401) at android.widget.TextView.<init>(TextView.java:692) at android.widget.TextView.

Styling text on TabLayout

自作多情 提交于 2019-12-06 22:10:13
问题 I'm trying to style the new TabLayout from android design library. <style name="NavigationTab" parent="Widget.Design.TabLayout"> <item name="tabBackground">@drawable/background_tab</item> <item name="tabIndicatorColor">@color/blue</item> <item name="tabTextAppearance">@style/NavigationTabTextAppeareance</item> </style> And the text is defined right here <style name="NavigationTabTextAppeareance" parent="TextAppearance.Design.Tab"> <item name="android:textColor">@color/primary_light</item>

CoordinatorLayout not working

ぃ、小莉子 提交于 2019-12-06 20:36:02
问题 I am attempting to implement a CoordinatorLayout from the newly announced Android Design Support Library and I have used the following code in my XML layout as per the sample here: <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/main_content" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.AppBarLayout android

FrameLayout Shown Above AppBarLayout

强颜欢笑 提交于 2019-12-06 02:31:07
问题 I have a simple CoordinatorLayout with a AppBarLayout and FrameLayout , but the FrameLayout contents are being displayed over the AppBarLayout regardless of the layout_behavior attribute on the FrameLayout . I've tried adding that attribute elsewhere (like on my RecyclerView ), but it's the same behavior. Here's a picture to show what I mean. Activitiy Layout: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk

CollapsingToolbarLayout | Scrolling and layout issues

吃可爱长大的小学妹 提交于 2019-12-05 20:41:18
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 no cigar. I want to use 2 different fragments Header Image (Currently just an ImageView ) "Scrollable"

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

无人久伴 提交于 2019-12-05 20:32:03
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 did SpannableString redSpannable = new SpannableString(red); redSpannable.setSpan(new

Hide floating button when collapsing toolbar is collapsed

て烟熏妆下的殇ゞ 提交于 2019-12-05 18:02:14
问题 I have a coordinator layout containing a collapsing toolbar, a nestedscrollview and a floating button. My floating button is placed at the bottom right end of the collapsing toolbar. I want the button to disappear when the collapsing toolbar is completely collapsed . And be visible in other situation. My 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