I use this code to make my two textviews have different gravity which are in the same row. but they don’t.
code:
<LinearLayout android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView android:text="@string/text_ceo_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:id="@+id/txt_ceo_name"/>
<TextView android:text="@string/text_ceo_name_title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:id="@+id/txt_ceo_name_title"/>
</LinearLayout>
Its working…
Try giving weight as per you want.