Reputation:
According to below codes
<LinearLayout android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical|center_horizontal"
android:layout_marginTop="15dip">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="نوع"
android:gravity="left"
android:layout_weight="1"
android:id="@+id/txt_type" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="تاریخ: ۱۳۹۲/۰۳/۲۸"
android:layout_weight="1"
android:gravity="right"
android:id="@+id/txt_date" />
</LinearLayout>
TextViews are not well aligned and both are not in exact line.
It's like what exactly showed in below picture.
Upvotes: 0
Views: 1113
Reputation: 896
Please check the parent layout and try to set orientation to horizontal. I tried different cases but found that its working in all cases...
Upvotes: 1