3

by default android PreferenceActivity layouts are left to right and i can not change PreferenceActivity widgets to right from left. for example see this screen shot please:

enter image description here

i want to change this layout like with below screen shot

enter image description here

PreferenceActivity Activity:

public class ActivitySettings extends PreferenceActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        addPreferencesFromResource(R.xml.app_settings);

    }
}

PreferenceActivity layout:

<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
    android:icon="@drawable/img_app_setting" >

    <PreferenceCategory android:title="@string/settings_alarm_title" >
        <CheckBoxPreference
            android:key="PLAY_SOUND"
            android:summaryOff="@string/settings_summary_off_play_sound"
            android:summaryOn="@string/settings_summary_on_play_sound"
            android:title="@string/settings_play_sound" />
        <CheckBoxPreference
            android:key="SHOW_NOTIFICATION"
            android:summaryOff="@string/settings_summary_off_show_notification"
            android:summaryOn="@string/settings_summary_on_show_notification"
            android:title="@string/settings_show_notification" />
    </PreferenceCategory>
</PreferenceScreen>
DolDurma
  • 15,753
  • 51
  • 198
  • 377
  • I think it´s not possible to change the position of the checkbox. You have to do Your own custom preference... – Opiatefuchs Jan 21 '15 at 12:55
  • possible duplicate of [How to right align PreferencesActivity in android?](http://stackoverflow.com/questions/11332340/how-to-right-align-preferencesactivity-in-android) – Vrashabh Irde Jan 21 '15 at 16:02

0 Answers0