Etwas von einem Neuling, wenn es um Android geht, arbeitete nur für ein paar Tage richtig, aber selbst nach all den Suchen, die ich getan habe, bin ich ratlos und niemand scheint zu wissen, wie man mir hilft. Ich habe dies so weit:LinearLayout - Wie erhält man Text rechts von einem Icon?
http://img263.imageshack.us/i/sellscreen.jpg
Wie kann ich den Text zu bewegen neben jedem Symbol zu sein, anstatt unter ihm? Hoffentlich wird die Galerie auch nicht bewegt. Hier ist der Code ich habe:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scroller"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true" >
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Gallery xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gallery"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<ImageView
android:id="@+id/test_image"
android:src="@drawable/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="The offcial UK driving theory test application. Over 190 questions."
/>
<ImageView
android:id="@+id/test_image"
android:src="@drawable/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="The offcial UK driving theory test application. Over 190 questions."/>
<ImageView
android:id="@+id/test_image"
android:src="@drawable/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="The offcial UK driving theory test application. Over 190 questions."/>
<ImageView
android:id="@+id/test_image"
android:src="@drawable/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="The offcial UK driving theory test application. Over 190 questions."/>
<ImageView
android:id="@+id/test_image"
android:src="@drawable/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="The offcial UK driving theory test application. Over 190 questions."
/>
</LinearLayout>
</ScrollView>
Top Hälfte meines Code aus irgendeinem Grunde nicht zu zeigen, scheint aber es ist nur die Öffnung des linearen Layouts. Ich werde jedem, der mir helfen kann, ewig dankbar sein, ich habe tagelang meinen Verstand verloren und bin nirgendwohin gekommen. Wirklich gestresst dadurch. Danke im Voraus!!
Ich denke, die Leute sind nur faul, seit ich es auf zwei Android-Foren veröffentlicht. Oh, naja, so sehr, dass ich mir den Kopf zerbrochen habe, als es in einer Sekunde repariert wurde. Vielen Dank! –
@RED_: Sicher Sache. Aber bedenke auch @ Mayras Antwort. Ich bin mir nicht sicher, ob die Verwendung eines relativen Layouts in DIESEM SPEZIFISCHEN FALL effizienter ist, aber es ist generell besser, relative Layouts zu verwenden als tief verschachtelte lineare Layouts. – Falmarri
Yeah macht Sinn, RelativeLayouts verwirren die Hölle von mir im Moment. Wie man alles an der richtigen Stelle bekommt, ist die Hauptsache, aber ich bin sicher, dass ich es aufheben werde, je mehr ich es habe. –