Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Development > Application Development

Application Development Dev Lounge for the Coder Folks



Reply
 
LinkBack Thread Tools
Old December 22nd, 2010, 04:41 PM   #1 (permalink)
New Member
 
Join Date: Dec 2010
Posts: 2
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Cool Help With Dialog title alignment

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

rbhdroid is offline  
Reply With Quote
Sponsors
Reply

Bookmarks

Tags
alignment, dialog box, hebrew, title


Go Back   Android Forums > Android Development > Application Development User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
General Screen alignment option kenthandsfree Sony Ericsson Xperia X10 0 December 23rd, 2010 08:16 AM
Support widget alignment UdvVrf Samsung Galaxy S 0 August 18th, 2010 07:23 PM
Beautiful Widget Text Alignment Problem shiki Droid X - Support and Troubleshooting 1 July 28th, 2010 10:42 AM
GUI Controls for JIT, Apps2SD, Zip Alignment and more! andrizoid Eris - All Things Root 2 June 18th, 2010 05:27 PM



All times are GMT -5. The time now is 11:36 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo