Das folgende Layout wird in eine Listenansicht auf einem separaten Tab eingefügt, aber ich habe Probleme mit dieser Ansicht für meinen benutzerdefinierten Adapter.Ich kann das Android-Layout, das ich will, nicht bekommen
Die erste imageView ID 'Symbol' möchte ich auf der linken Seite. Die TextView-ID 'item' möchte ich in der Mitte rechts von id icon und die textView 'textView1' möchte ich unter dem Element, das ist in Ordnung, denn das ist in Ordnung, auch der Text rechts neben dem Symbol ist in Ordnung.
Das Problem, das ich habe, ist mit der ID-Pause und ID-Symbol2. Ich möchte diese ganz rechts von den Textansichten und Bildansichten oben sehen.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:orientation="horizontal">
<ImageView
android:id="@+id/icon"
android:layout_width="60dp"
android:layout_height="60dp"
android:padding="5dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:weightSum="1">
<TextView
android:id="@+id/item"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:padding="2dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#4CBE99"
android:textAllCaps="true"
android:textStyle="bold"
/>
<ImageView
android:id="@+id/pause"
android:layout_gravity="left"
android:layout_width="35dp"
android:layout_height="35dp"
android:padding="5dp"
android:orientation="horizontal"
/>
<ImageView
android:id="@+id/icon2"
android:layout_gravity="right"
android:layout_width="35dp"
android:layout_height="35dp"
android:padding="5dp"
android:orientation="horizontal"
android:layout_toRightOf="@id/pause"
/>
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp" />
<com.google.android.gms.ads.NativeExpressAdView
android:id="@+id/adView"
android:layout_width="420dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="visible"
ads:adUnitId="ca-app-pub-3940256099942544/2793859312"
ads:adSize="200x80"
android:layout_weight="3.40"></com.google.android.gms.ads.NativeExpressAdView>
</LinearLayout>
</LinearLayout>
Edit:
Es ist besser, zeigen Sie Bild oder Screenshot von dem, was Sie erreichen möchten. Es wird helfen – Inducesmile
@Inducesmile ist das oben in Ordnung? – Sam
Also ist dies ein Layout für Zeilen in einer Liste? – Mehmed