آموزش های این وب سایت به صورت رایگان در دسترس است. اطلاعات بیشتر
بروز خطا
   [message]
اشتراک در سوال
رای ها
[dataList]

وسط چین کردن لیست ویو

MaxPain  11 سال پیش  11 سال پیش
0 0

سلام بنده یه لیست ویو ساختم که 5 آیتم توش قرار دادم ، توی گوشی 5 اینج که وسط چین نشون میده اما توی تبلت ها یکم بالا هست

کد لایوت:

 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<android.support.v7.widget.Toolbar
android:id="@+id/toolbar_actionbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize" >
</android.support.v7.widget.Toolbar>

<android.support.v4.widget.DrawerLayout
android:id="@+id/drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/toolbar_actionbar" >

<!-- Content -->

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_gravity="center">

<ListView
android:id="@+id/list_maine"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop= "40dp"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip">
</ListView>

</LinearLayout>
</RelativeLayout>

<!-- Side Drawer -->

<LinearLayout
android:id="@+id/drawer_view"
android:layout_width="280dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="#3F51B5"
android:orientation="vertical" >

<ImageView
android:id="@+id/img_pish"
android:layout_width="280dp"
android:layout_height="180dp"
android:src="@drawable/ic_launcher" />

<ListView
android:id="@+id/list_nav"
android:layout_width="280dp"
android:layout_height="match_parent"
android:layout_gravity="end" >
</ListView>
</LinearLayout>
</android.support.v4.widget.DrawerLayout>

</RelativeLayout>

گراویتی سنتر رو به جای Margin ها به لیست ویو میدم اما باز تکون نمیخوره

 
0 0
فعالا به کجا چنین شتابان؟:\ (11 سال پیش)
 برای این سوال پاسخی وجود ندارد.

پاسخگویی و مشاهده پاسخ های این سوال تنها برای اعضای ویژه سایت امکان پذیر است .
چنانچه تمایل دارید به همه بخش ها دسترسی داشته باشید میتوانید از این بخش لایسنس این آموزش را خریداری نمایید .