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"
androidrientation="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="סגור" />
</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
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"
androidrientation="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="סגור" />
</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