• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Help With Dialog title alignment

rbhdroid

Lurker
Hi All,

Can not figured out yet how to align dialog title to the right.
My application is Hebrew based (right to left) and i struggled and did notn
found an appropriate reference on how to right align dialog title to the right.
In short i show this dialog when clicking on image view.

Here is the dialog layout:
<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:textSize="50px">
<ScrollView android:id="@+id/ScrollView01"
android:layout_width="wrap_content"
android:layout_below="@+id/ImageView01"
android:layout_height="200px">
<TextView android:text="@+id/TextView01"
android:id="@+id/TextView01"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:textSize = "15sp"/>
</ScrollView>

<Button android:id="@+id/Button01"
android:layout_below="@id/ScrollView01"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:text="&#1505;&#1490;&#1493;&#1512;" />
</RelativeLayout>

Here is the code:

dialog.setContentView(R.layout.maindialog);

dialog.setTitle("THIS IS ONLY TEST");

dialog.setCancelable(true);

dialog.show();

//set up text
txt = (TextView)dialog.findViewById(R.id.TextView01);

btn=(Button) dialog.findViewById(R.id.Button01);

btn.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
dialog.dismiss();

}
});
txt.setText("This is only text");

The problem is that "
THIS IS ONLY TEST" is aligned to the left.

Any Ideas??

10X

RBHDROID
 
Back
Top Bottom