android-design-library

TextInputLayout not showing EditText hint before user focus on it

时光毁灭记忆、已成空白 提交于 2019-11-26 19:46:20
I am using recently released Android Design Support Library to show floating label with EditTexts. But i am facing the problem that the Hint on the EditText is not showing when UI is rendered, but i see the Hint after i focus on the EditTexts. My Layout is as follows: <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent"> <ScrollView android:id="@+id/ScrollView01" android:layout

Android NavigationView menu group divider [duplicate]

怎甘沉沦 提交于 2019-11-26 19:17:11
问题 This question already has answers here : How to create a simple divider in the new NavigationView? (13 answers) Closed 2 years ago . Android support design library provide NavigationView: <android.support.design.widget.NavigationView ... app:menu="@menu/navigation_drawer_items" /> menu/navigation_drawer_items: <menu xmlns:android="http://schemas.android.com/apk/res/android"> <group android:checkableBehavior="single"> <item .../> ... </group> <group android:checkableBehavior="single"> <item ..

File res/drawable/abc_ic_ab_back_material.xml from drawable resource ID #0x7f020016 [duplicate]

陌路散爱 提交于 2019-11-26 18:53:24
This question already has an answer here: Update Android Support Library to 23.2.0 cause error: XmlPullParserException Binary XML file line #17<vector> tag requires viewportWidth > 0 31 answers Recently android support library was updated to 23.2.0 . After downloading android sdk and updating android design support library into 23.2.0 , this error happens repeatedly. My project can't even be compiled. The complete error log says: 03-02 12:00:04.945 9324-9324/com.creditease.zhiwang.debug E/AndroidRuntime: FATAL EXCEPTION: main java.lang.RuntimeException: Unable to start activity ComponentInfo

How to mimic Google Maps' bottom-sheet 3 phases behavior?

点点圈 提交于 2019-11-26 18:43:03
问题 Background I'm assigned to make a UI that behaves similar to how Google Maps shows a bottom-sheet for a found result. It has three different phases: Bottom content. The upper area is still touchable and won't scroll anything at the bottom Full screen content, while the upper area has a large header. Full screen content, while the upper area has just the toolbar. Here's what I'm talking about on Google Maps: The problem Thing is, the bottom sheet isn't a part of the design library yet (though

How to change the new TabLayout indicator color and height

做~自己de王妃 提交于 2019-11-26 18:14:24
I was playing around with the new android.support.design.widget.TabLayout , and found a problem, in the class definition, there are no methods to change the indicator color, and default height. Doing some research, found that the default indicator color is taken from the AppTheme. Specifically from here: <item name="colorAccent">#FF4081</item> Now, in my case, if I change the colorAccent , it will affect all the other views which uses this value as background color, for example ProgressBar Now is there any way to change the indicatorColor to other thing besides the colorAccent ? Having the

Change EditText hint color when using TextInputLayout

廉价感情. 提交于 2019-11-26 17:30:38
I am using the new TextInputLayout from the design library. I am able to get it to show and to change the color of the floating label. Unfortunately the actual EditText hint is now always white. I have tried changing the hintColor in XML, styles, and programmatically and also tried using the android.support.v7.widget.AppCompatEditText but the EditText hint always shows white. Here is my XML for my TextInputLayout and EditText <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content" android.support.design:hintTextAppearance="@style

Getting exception : java.lang.NoClassDefFoundError: android.support.v7.app.AppCompatDelegateImplV14

牧云@^-^@ 提交于 2019-11-26 17:16:25
问题 I updated Android Studio and the android design library recently since then I am getting an exception java.lang.NoClassDefFoundError: android.support.v7.app.AppCompatDelegateImplV14 . Not sure what is the problem, I tried almost everything, its working in lollipop 5.1 device(nexus 4) but it does not work in Android 4.4 device and 4.02 device. It was working before the updation in all versions. I tried all solutions mentioned in stackoverflow but nothing worked for me. Also tried removing the

NavigationView and custom Layout

寵の児 提交于 2019-11-26 17:07:45
I'm using the Designs Support Libraries NavigationView like this: <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/drawer_layout" android:layout_height="match_parent" android:layout_width="match_parent" android:fitsSystemWindows="true"> <!-- put your main layout here --> <include layout="@layout/drawer_main_layout"/> <android.support.design.widget.NavigationView android:id="@+id/nav_view" android:layout_height="match_parent" android:layout_width="wrap_content" android:layout

Android TextInputField Inflator Error

梦想的初衷 提交于 2019-11-26 16:39:46
问题 Had a crash while trying to use the new TextInputField for Android and wanted to share my solution. Trying the new TextInputField in the android appcompat library was crashing my app. Here was my layout xml. <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <EditText android:id="@+id/email" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="e-mail" android:inputType="textEmailAddress"

Change font of the floating label EditText and TextInputLayout

99封情书 提交于 2019-11-26 16:07:15
问题 Someone tried to change the font of the floating label? I changed the source of EditText but the font of the floating label did not change, I am very grateful to those who help me Code: <android.support.design.widget.TextInputLayout android:id="@+id/tilTextoDescricao" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_toRightOf="@id/tilValorUnidade" android:layout_marginTop="10dp"> <EditText android:id="@+id/etTextoDescricao" android:layout_width="fill