如何在不同的值文件夹中设置不同大小的导航抽屉

时间:2015-06-01 08:38:19

标签: android android-studio navigation

我想在layout-largelayout-xlarge之间调整导航抽屉的宽度,因此我创建了不同的文件夹:

res/values-sw480dp
res/values-sw600dp

但它不起作用,所以我尝试了:

res/values-large
res/values-xlarge

但它也不起作用:

<fragment
    android:id="@+id/fragment_navigation_drawer"
    android:name="fr.solutis.solutis.FragmentDrawer"
    android:layout_width="@dimen/nav_drawer_width"
    android:layout_height="match_parent"
    android:layout_gravity="start"
    app:layout="@layout/fragment_navigation_drawer"
    tools:layout="@layout/fragment_navigation_drawer" />

1 个答案:

答案 0 :(得分:0)

res/layout/my_layout.xml              // layout for normal screen size ("default")
res/layout-large/my_layout.xml        // layout for large screen size
res/layout-xlarge/my_layout.xml       // layout for extra-large screen size
res/layout-xlarge-land/my_layout.xml  // layout for extra-large in landscape orientation

res/values-mdpi/your.xml         // xmlfor medium-density
res/values-hdpi/your.xml         // xml for high-density
res/values-xhdpi/your.xml        // xml for extra-high-density
res/values-xxhdpi/your.xml       // xml for extra-extra-high-density
res/values-sw600dp/your.xml       // 7"
res/values-sw720dp/your.xml       // 10"