View Full Version : راست چین کردن لیست ویو
  
mohammad-de
شنبه 22 شهریور 1393, 13:59 عصر
سلام
چطوری میتونم لیست ویو رو راست چین کنم ؟
طوری که متون و تصاویر لیست ویو سمت راست قرار بگیره؟
mohammad-de
شنبه 22 شهریور 1393, 14:59 عصر
لطفا جواب بدید
یه چیز دیگه
چطوری اندازه ی آیتم ها (ردیف) رو عوض کنم؟مثلا 50dp ؟
اینم کد:
<?xml version="1.0" encoding="utf-8"?><TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >
    <TableRow
        android:layout_width="match_parent"
        android:layout_height="20dp"
        android:layout_marginBottom="8dp"
        android:layout_marginTop="8dp"
        android:background="@drawable/title" >
        <ImageView
            android:id="@+id/img"
            android:layout_width="70dp"
            android:layout_height="60dp"
            android:layout_marginLeft="255dp"
            android:layout_marginTop="15dp" />
        <TextView
            android:id="@+id/txt"
            android:layout_width="wrap_content"
            android:layout_height="50dp"
            android:layout_marginLeft="200dp"
            android:layout_marginTop="15dp" />
</TableRow>
</TableLayout>
smemamian
شنبه 22 شهریور 1393, 15:04 عصر
سلام دوست عزیز.
این سوال، یک سوالی است که چندین بار جواب داده شده.
بگذریم...
شما چرا دارید از TableLayout استفاده می کنید ؟!
شما از RelativeLayout استفاده کنید و با تنظیم کردن View مدنظر 
در جای مناسب، به آن چیزی که می خواهید می رسید. مثال :
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >
    
    <ImageView 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_alignParentRight="true"
        android:src="@drawable/ic_launcher"
        />
    
</RelativeLayout>
 
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.