۱۳۹۵/۰۳/۰۳, ۰۸:۲۴ ب.ظ
(۱۳۹۵/۰۳/۰۳, ۰۱:۰۹ ب.ظ)admin نوشته: سلام.اصلا دقت نکرده بودم!!! خیلی سوال ساده و پیش پا افتاده ای پرسیدم واقعا...
برای Sliding Menu (یا Navigation Drawer) ارائه شده در کلید شماره 3022 ، کد xml لایه گرافیکی دارای شکل کلی زیر است :
کد پیاچپی:<!-- Navigation Drawer (start) -->
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- Navigation Drawer (end) -->
کدهای مربوط به ساختار گرافیکی را در اینجا می نویسید
<!-- Navigation Drawer (start) -->
<ListView
android:id="@+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="#111"/>
</android.support.v4.widget.DrawerLayout>
<!-- Navigation Drawer (end) -->
به بخش زیر از آن توجه کنید :
کد پیاچپی:android:layout_width="240dp"
باید عدد 240 را به مقدار مورد نظر خود تغییر دهید (واحد بر اساس dp می باشد).