aşağıdaki gibi görünmek için ListView satır almaya çalışıyorum: imagebutton ileListView satır stil - sola yaslanmış metin ve sağ hizalı simge
| Text-Text-Text <ImageButton> |
sağ kenarına tersledi. Bunu nasıl yapabilirim? Kullanmakta olduğum geçerli düzen kodu. Neyi yanlış yapıyorum?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layercontainer"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#699">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="left">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="YO HOW SI IT GOESSDA" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="right">
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/trash" />
</LinearLayout>
</LinearLayout>
Kodum anda bu üretir:
+1: Burada
Düzen XML olduğunu. RelativeLayout muhtemelen en uygun olanıdır. –Bunu bir saniye içinde deneyeceğim. – GuyNoir
Hey! İşe yaradı! Çok teşekkürler. Daha önce hiç RelativeLayout kullanmamıştım, bu yüzden onları kullanmayı düşünmedim. – GuyNoir