I'm trying to organize two TextViews to behave like that:
So, if there is enough space for both TextViews in line, android should place them in line.
If there is not enough space, the second TextView must be placed on the next line with right alignment.
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="@+id/takeoffCity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/flightItem" />
<TextView
android:id="@+id/landingCity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/flightItem" />
</LinearLayout>
<style name="flightItem" parent="@android:style/TextAppearance">
<item name="android:textSize">14dip</item>
<item name="android:textColor">@color/flightItemFont</item>
<item name="android:scrollHorizontally">true</item>
<item name="android:textStyle">bold</item>
</style>