<style name="TextShadow">
<item name="android:shadowColor">#000000</item>
<item name="android:shadowDx">1</item>
<item name="android:shadowDy">1</item>
<item name="android:shadowRadius">4</item>
</style>
<style name="TextShadow">
<item name="android:shadowColor">#000000</item>
<item name="android:shadowDx">1</item>
<item name="android:shadowDy">1</item>
<item name="android:shadowRadius">4</item>
</style>
sudo /usr/sbin/apachectl restart
UIControlContentHorizontalAlignment를 통해서 해야한다.
<activity android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard"/>
<activity android:name=".WakeMeUpMain" android:label="@string/app_name" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden|keyboard"/>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button
android:id="@+id/button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Button"
>
</Button>
<Button
android:id="@+id/button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Button"
/>
</LinearLayout>
Button button = (Button) findViewById(R.id.button);
button.setText("First");
<Button
android:id="@+id/button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Button"
>
</Button>
<LinearLayout
android:id="@+id/linear"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Button"
>
</Button>
</LinearLayout>
android:src="@android:drawable/ic_input_delete"
<ListView android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawSelectorOnTop="false"/>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/settings">
<CheckBoxPreference
android:key="alarm_in_silent_mode"
android:title="@string/alarm_in_silent_mode_title"
android:summary="@string/alarm_in_silent_mode_summary" />
<VolumePreference
android:title="@string/alarm_volume_title"
android:summary="@string/alarm_volume_summary"
android:dialogTitle="@string/alarm_volume_title"
android:persistent="false"
android:streamType="alarm" />
<ListPreference
android:key="snooze_duration"
android:title="@string/snooze_duration_title"
android:entries="@array/snooze_duration_entries"
android:entryValues="@array/snooze_duration_values"
android:defaultValue="10"
android:dialogTitle="@string/snooze_duration_title" />
<ListPreference
android:key="volume_button_setting"
android:title="@string/volume_button_setting_title"
android:dialogTitle="@string/volume_button_dialog_title"
android:entries="@array/volume_button_setting_entries"
android:entryValues="@array/volume_button_setting_values"
android:summary="@string/volume_button_setting_summary"
android:defaultValue="2" />
</PreferenceScreen>
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.settings); } @Override public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { if (KEY_ALARM_IN_SILENT_MODE.equals(preference.getKey())) { CheckBoxPreference pref = (CheckBoxPreference) preference; int ringerModeStreamTypes = Settings.System.getInt( getContentResolver(), Settings.System.MODE_RINGER_STREAMS_AFFECTED, 0); if (pref.isChecked()) { ringerModeStreamTypes &= ~ALARM_STREAM_TYPE_BIT; } else { ringerModeStreamTypes |= ALARM_STREAM_TYPE_BIT; } Settings.System.putInt(getContentResolver(), Settings.System.MODE_RINGER_STREAMS_AFFECTED, ringerModeStreamTypes); return true; } return super.onPreferenceTreeClick(preferenceScreen, preference); } public boolean onPreferenceChange(Preference pref, Object newValue) { final ListPreference listPref = (ListPreference) pref; final int idx = listPref.findIndexOfValue((String) newValue); listPref.setSummary(listPref.getEntries()[idx]); return true; }