Ich fange mit Android an. Ich habe Probleme, ein einfaches Layout in Gang zu bringen.
Ich möchte mit a LinearLayoutzwei TextViewsin einer Reihe positionieren . Eine TextViewauf der linken Seite, die andere auf der rechten Seite (analog zu float: left, float: right in CSS).
Ist das möglich oder muss ich eine andere ViewGroupoder weitere Layout-Verschachtelung verwenden, um dies zu erreichen?
Folgendes habe ich bisher:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="horizontal" android:padding="10sp">
<TextView android:id="@+id/mytextview1" android:layout_height="wrap_content" android:text="somestringontheleftSomestring" android:layout_width="wrap_content"/>
<TextView android:id="@+id/mytextview2" android:layout_height="wrap_content" android:ellipsize="end"
android:text="somestringontheright" android:layout_width="wrap_content"/>
</LinearLayout>


