androiddesignsupport

TextInputLayout :How to give padding or margin to hint?

为君一笑 提交于 2019-11-26 15:57:54
问题 I have to use TextInputLayout of design support library in my project. I want to give space between hint and EditText in TextInputLayout . I set margin and padding in TextInputLayout and even inside EditText but both are not work.So how to solve this issue. Here i attach screen shot and my coding. ==============================Style================================= <style name="TextHint" parent="Base.TextAppearance.AppCompat"> <item name="android:textSize">18sp</item> <item name="android

How can I change the NavigationView&#39;s item text size?

纵饮孤独 提交于 2019-11-26 15:18:09
问题 Google recently released the android.support.design.widget.NavigationView widget as part of the com.android.support:design:22.2.0 library, which greatly simplified (and standardises) the process of creating a NavigationDrawer. However according to the design specs, the list item should be Roboto Medium, 14sp, 87% #000000 . The NavigationView exposes no textSize or textStyle to customise this. What are my options if I'm pedantic about maintaining the correct design specifications using the

How to get appropriate images in respective android Device in Android Studio

五迷三道 提交于 2019-11-26 14:51:18
问题 I m designing the layout of Music Player, but when im renderin with virtual device Nexus 5, i m not facing any problem at all but when im rendering with Nexus 7 it is showing the same size image. Posting screenshot of my photo too. Hope to get some solution from you guys. 回答1: You have to follow this to support multiple devices : changes in screen density. xlarge screens are at least 960dp x 720dp large screens are at least 640dp x 480dp normal screens are at least 470dp x 320dp small screens

Change the color of a checked menu item in a navigation drawer

你说的曾经没有我的故事 提交于 2019-11-26 12:03:19
I am using the new Android Design Support library to implement a navigation drawer in my application. I can't figure out how to change the color of a selected item! Here is the xml of the menu : <menu xmlns:android="http://schemas.android.com/apk/res/android"> <group android:checkableBehavior="single"> <item android:id="@+id/navigation_item_1" android:icon="@drawable/ic_1" android:title="@string/navigation_item_1"/> <item android:id="@+id/navigation_item_2" android:icon="@drawable/ic_2" android:title="@string/navigation_item_2"/> </group> And here is the navigationview xml which is placed

Status bar turns white and does not show content behind it

ぃ、小莉子 提交于 2019-11-26 10:33:19
问题 I am trying out AppCompat on Marshmallow. And I want to have a transparent status bar however it turns white. I\'ve tried a couple solutions but they didn\'t work for me (Transparent status bar not working with windowTranslucentNavigation="false", Lollipop : draw behind statusBar with its color set to transparent). Here\'s related code. My styles.xml <style name=\"Bacon\" parent=\"Theme.Bacon\"/> <style name=\"Theme.Bacon\" parent=\"Theme.AppCompat.Light.NoActionBar\"> <item name=\

How to set the divider between Tabs in TabLayout of design support library?

纵然是瞬间 提交于 2019-11-26 08:59:55
问题 I am using the new android.support.design.widget.TabLayout of v7-appcompat library, and found a problem, there is no way to set the divider between the tabs, dont know if there is. I have successfully configured the pager adapter and the tabs are looking good but cant set the divider between the tabs. I want this type of tabs Tab1 | Tab2 | Tab3 but currently its showing Tab1 Tab2 Tab3 My xml is <android.support.design.widget.CoordinatorLayout xmlns:android=\"http://schemas.android.com/apk/res

Add views below toolbar in CoordinatorLayout

夙愿已清 提交于 2019-11-26 08:45:01
问题 I have the following layout: <android.support.design.widget.CoordinatorLayout android:id=\"@+id/main_content\" 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.support.design.widget.AppBarLayout android:id=\"@+id/appBar\" android:layout_width=\"match_parent\" android:layout_height=\"wrap_content\" android:theme=\"@style/ThemeOverlay.AppCompat

Remove BottomNavigationView labels

十年热恋 提交于 2019-11-26 07:33:59
问题 Google released new support library v25 with BottomNavigationView is there any way to remove items labels ? 回答1: I hope I am not too late to the party here. But as of Design Support Library 28.0.0-alpha1 you can use the property app:labelVisibilityMode="unlabeled" you can use other values "auto", "labeled" and "selected" as well. 回答2: Would you want to this style ? If so, I recommend you try BottomNavigationViewEx. 回答3: Unfortunately this first version of BottomNavigationView came with a lot

CollapsingToolbarLayout subtitle

拜拜、爱过 提交于 2019-11-26 07:24:02
问题 Am I able to set the title of a CollapsingToolbarLayout via the setTitle method? Is there also a way to set a subtitle? 回答1: If you want the subtitle to go to Toolbar when the AppBar is fully collapsed you should create your custom CoordinatorLayout.Behaviour Like this: Github Guide But if you just want a smaller text behind the title when the AppBar is expanded you can try this layout: <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"

Change the color of a checked menu item in a navigation drawer

为君一笑 提交于 2019-11-26 03:04:48
问题 I am using the new Android Design Support library to implement a navigation drawer in my application. I can\'t figure out how to change the color of a selected item! Here is the xml of the menu : <menu xmlns:android=\"http://schemas.android.com/apk/res/android\"> <group android:checkableBehavior=\"single\"> <item android:id=\"@+id/navigation_item_1\" android:icon=\"@drawable/ic_1\" android:title=\"@string/navigation_item_1\"/> <item android:id=\"@+id/navigation_item_2\" android:icon=\"