android-design-library

Is there a native component for the Floating action button in Android Material Design?

冷暖自知 提交于 2019-11-28 10:31:13
My question revolves around the Floating action button that was introduced in Android Material Design. There are many library offering this component on GitHub as: Android-floating-action-button FloatingActionButton CircularFloatingActionMenu Fab Floating-action-button But my question is: Is there a native component with the last release of android.support.vX that was built for Floating action button ? Components such as : android.support.v7.cardview android.support.v4.widget.DrawerLayout android.support.v7.widget.RecyclerView ... Gabriele Mariotti Today (29/05/2015) it is officially avaiable

RuntimeException while using new TextInputLayout from support design library

心已入冬 提交于 2019-11-28 09:51:50
I have very simple layout where I use new android.support.design.widget.TextInputLayout view from Design Support Library <android.support.design.widget.TextInputLayout android:id="@+id/til" android:layout_width="fill_parent" android:layout_height="wrap_content"> <EditText android:id="@+id/textDialog" android:layout_width="fill_parent" android:layout_height="wrap_content" android:hint="First Name"/> </android.support.design.widget.TextInputLayout> On inflate I get exception: Caused by: java.lang.RuntimeException: Failed to resolve attribute at index 18 at android.content.res.TypedArray.getColor

Customising NavigationView - Adding dynamic headerView, Android Support Design Library

青春壹個敷衍的年華 提交于 2019-11-28 09:02:23
I tried the navigationView from the new android support design library. I want to have a dynamic headerview. Basically, my headerview will show something like quote of the day. I have like around 10 quotes and i want to randomly select a quote and display in a textview in the headerView. I also want to add onClick method for the headerView. Right now, I don't see any possibilities of changing the headerview layout programmatically. Any suggestions to implement this? first create header XML like lay_header.xml <TextView android:id="@+id/tvThought" android:layout_width="wrap_content" android

How to use SwipeDismissBehavior.OnDismissListener on RecyclerView

和自甴很熟 提交于 2019-11-28 07:30:41
问题 I am trying to use the SwipeDismissBehavoir from design support library. I've list items in RecyclerView and swiping an item have to dismiss (like google inbox app) . I've set the listener for the RecyclerView items but the SwipeDismissBehavior onDismiss listener is not getting called. SwipeDismissBehavior behavior = new SwipeDismissBehavior(); CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams)mItemLayout.getLayoutParams(); params.setBehavior(behavior); behavior

NestedScrollView and CoordinatorLayout. Issue on Scrolling

老子叫甜甜 提交于 2019-11-28 04:30:51
I have a strange issue with the CoordinatorLayout and the NestedScrollView (with the design support library 22.2.0) Using a content smaller than NestedScrollView I should have a fixed content. However trying to scroll up and down the content I can obtain that the content is displaced and never again in their own place. Here a little sample: Here the code: <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

CoordinatorLayout with RecyclerView & CollapsingToolbarLayout

走远了吗. 提交于 2019-11-28 03:27:40
I've been attempting to implement a CollapsingToolbar with a RecyclerView using the small amount of guidance here: http://android-developers.blogspot.co.uk/2015/05/android-design-support-library.html and the project here: https://github.com/chrisbanes/cheesesquare , and I currently have the following layout: <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

error can not resolve symbol TabLayout and 'design

被刻印的时光 ゝ 提交于 2019-11-28 01:09:47
Please help: I got error when import android.support.design.widget.TabLayout It say "can not resolve symbol 'design' My build.gradle: compileSdkVersion 26 buildToolsVersion "26.0.0" dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:26' compile 'com.android.support.constraint:constraint-layout:1.0.2' compile 'com.android.support:support-v4:26' testCompile 'junit:junit:4.12' } Nilesh Rathod

ListView nested scrolling on API<21

六眼飞鱼酱① 提交于 2019-11-28 01:06:52
Title is clear. I'm having this layout: _________________ |_______________| <- Toolbar |___|___|___|___| <- Tablayout | | | | | ViewPager | | | |_______________| Both toolbar and tablayout are inside an AppBarLayout , so I can use scroll flags to hide the toolbar on scrolling toward the top. The problem is that this only works with nested-scrolling-supported views. Most of the tabs - I mean, most of the pages - are support.v4.NestedScrollView s, so that is OK; others are (and need to be) ListView s. From Lollipop on, I can simply add android:nestedScrollingEnabled="true" to the list view, and

How to hide ActionBar while scrolling ListView in android?

感情迁移 提交于 2019-11-27 23:37:38
问题 I need to create a GUI with a ListView and an ActionBar which will hide when scrolling down and when scrolling up it must reappear. The following guides didn't help me: https://mzgreen.github.io/2015/06/23/How-to-hideshow-Toolbar-when-list-is-scrolling%28part3%29/ https://github.com/ksoichiro/Android-ObservableScrollView I need something like this: 回答1: If you would like to obtain a list with this behaviour, you should: add the design support library with compile 'com.android.support:design

Android design library CoordinatorLayout, AppBarLayout and DrawerLayout

纵然是瞬间 提交于 2019-11-27 22:52:10
I'm using the Android design library on API 22. I would like to: have a Toolbar and a DrawerLayout inside which there is a RecyclerView have the DrawerLayout be below the Toolbar; for example, when the toolbar is visible, the drawer's main content should be below it, and the (left) drawer should also be below it so that when it is expanded, the toolbar is still visible have Toolbar be scrolled off the screen when the recycler view is scrolled down Is this even possible? I have problems to marry #2 and #3. The way it is now is that the toolbar is always above the drawer layout, covering the