Tuesday, June 19, 2012

[android-developers] Layout issue in preference screen android

I am writing an application for launching a preference screen.
The first item is just a preference.
Second item is a preference with an icon on its right side.
In order to do the second item, what I did was calling a layout which has a textview and an image view.
i.e. <Preference
            android:key="advanced_settings"
            android:persistent="false"
            android:layout="@layout/main"

and the main layout is:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="70sp"
    android:orientation="vertical" >

    
    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:text="Advanced settings" 
        />
    
    <ImageView android:id="@+id/imageview1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_centerVertical="true"
        android:src="@drawable/ic_bt_config"
        />

</RelativeLayout>

But after the launch of application It is seen that text display is  text size is small and the space is not compatible with other space.
I dont want to hard code any thing.

Please help me how can I make the second item of the preference screen as same format that of the first item.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate