【发布时间】:2017-02-27 14:08:07
【问题描述】:
我有下面的导航抽屉,我想将layout_marginLeft 作为-64dp 用于智能手机,wrap_content 用于平板电脑。
请告诉我该怎么做?我不想为智能手机和平板电脑创建单独的laytout.xml 文件,即我只有一个layout.xml 文件。截至目前,我在为智能手机和标签创建的 dimes.xml 文件中指定了不同的维度。
<!-- The navigation drawer -->
<android.support.design.widget.NavigationView
android:id="@+id/navigation"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start"
android:layout_marginLeft="-64dp"
【问题讨论】:
标签: android android-layout android-fragments navigation-drawer