How can I change the gravity of a preference page to RIGHT?
How can I change the gravity o开发者_开发知识库f a preference page to RIGHT? is there any solution?
All preferences have a Layout Attribute. You can use this to format all your Farsi text. However the layout you give it must have a TextView with the id of "@+android:id/title".
Here is a quick example with an image added and right justified text.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="70dip"
>
<ImageView
android:id="@+id/perf_image"
android:src="@drawable/pin_red"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true" />
<TextView
android:id="@+android:id/title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="23dip"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/perf_image"
android:text="stuff"
style="@android:style/TextAppearance.Widget.TextView.PopupMenu"
android:gravity="right"
/>
</RelativeLayout>
精彩评论