Different width for Navigation Drawer in Tablet and Phone
android, android-layout, android-screen-support, material-design, tablet
Solution
Create values-sw600dp folder in your project and add dimens.xml file in it. Define width in dimens.xml file of both values and values-sw600dp folder
For values-sw600dp/dimens.xml
<resources>
<dimen name="width">300dp</dimen></resources>
For values/dimens.xml
<resources><dimen name="width">150dp</dimen> </resources>
Call this in this manner
android:layout_width="@dimens/width"
Problem
I was trying to implement material design for one of my project and here, the following is mentioned, The maximum width of the nav drawer is 5 times the standard increment (56dp on mobile and 64dp on tablet). So I would like to know how to implement these width for navigation drawer for mobile and tablets. I want to make different width to respective devices, either phone or tablets. I would love to use XML even if this also can be done using Java. Thank you.