</intent-filter>
</activity>
+ <activity android:name="KeyboardPicker" android:label="@string/keyboard_layout_title">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <action android:name="android.settings.LOCALE_SETTINGS" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.VOICE_LAUNCH" />
+ </intent-filter>
+ </activity>
+
<activity android:name="LanguageSettings"
android:label="@string/language_keyboard_settings_title"
android:clearTaskOnLaunch="true"
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+ <!--
+ Copyright (C) 2009 The Android-x86 Open Source Project Licensed under the
+ Apache License, Version 2.0 (the "License"); you may not use this file
+ except in compliance with the License. You may obtain a copy of the
+ License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ CONDITIONS OF ANY KIND, either express or implied. See the License for
+ the specific language governing permissions and limitations under the
+ License.
+ -->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical" android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
+
+ <ListView android:id="@android:id/list" android:layout_width="fill_parent"
+ android:layout_height="fill_parent" android:drawSelectorOnTop="false" />
+
+</LinearLayout>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+ <!--
+ Copyright (C) 2009 The Android-x86 Open Source Project Licensed under the
+ Apache License, Version 2.0 (the "License"); you may not use this file
+ except in compliance with the License. You may obtain a copy of the
+ License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ CONDITIONS OF ANY KIND, either express or implied. See the License for
+ the specific language governing permissions and limitations under the
+ License.
+ -->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="horizontal" android:layout_height="wrap_content"
+ android:layout_width="fill_parent" android:gravity="center_vertical"
+ android:minHeight="?android:attr/listPreferredItemHeight"
+ android:padding="5dip">
+ <!--
+ <ImageView android:id="@+id/icon" android:layout_width="wrap_content"
+ android:layout_height="wrap_content" android:focusable="false"
+ android:clickable="false"
+ android:src="@drawable/place_holder_for_locale" />
+ -->
+ <TextView android:id="@+id/keyboard" android:layout_width="wrap_content"
+ android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceLarge" />
+</LinearLayout>
<string name="softkeyboard_enable">SoftKeyBoard Enable</string>
<string name="softkeyboard_enable_summary">Enable SoftKeyBoard</string>
+ <string name="keyboard_layout_title">Keyboard layout setting</string>
+ <string name="keyboard_layout_summary">Choose a keyboard layout</string>
</resources>
android:targetClass="com.android.settings.LocalePicker"/>
</PreferenceScreen>
+ <PreferenceScreen android:title="@string/keyboard_layout_title"
+ android:summary="@string/keyboard_layout_summary">
+ <intent android:action="android.intent.action.MAIN"
+ android:targetPackage="com.android.settings" android:targetClass="com.android.settings.KeyboardPicker" />
+ </PreferenceScreen>
+
<PreferenceCategory android:key="text_category"
android:title="@string/text_category" />
--- /dev/null
+package com.android.settings;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import android.app.ListActivity;
+import android.os.Bundle;
+import android.os.SystemProperties;
+import android.util.Log;
+import android.view.View;
+import android.widget.ArrayAdapter;
+import android.widget.ListView;
+import android.widget.Toast;
+
+public class KeyboardPicker extends ListActivity{
+ int getContentView() {
+ return R.layout.keyboard_picker;
+ }
+
+ @Override
+ public void onCreate(Bundle icicle) {
+ super.onCreate(icicle);
+ setContentView(getContentView());
+ int layoutId = R.layout.keyboard_picker_item;
+ int fieldId = R.id.keyboard;
+ List<String> mKeyboardLayout = new ArrayList<String>();
+ mKeyboardLayout.add("American(Standard keyboard)");
+ mKeyboardLayout.add("Finnish");
+ mKeyboardLayout.add("French");
+ mKeyboardLayout.add("German");
+ mKeyboardLayout.add("Ireland");
+ mKeyboardLayout.add("Russia");
+ mKeyboardLayout.add("Spanish(Latin America)");
+
+
+ ArrayAdapter<String> adapter =
+ new ArrayAdapter<String>(this, layoutId, fieldId, mKeyboardLayout);
+ getListView().setAdapter(adapter);
+ }
+ @Override
+ protected void onListItemClick(ListView l, View v, int position, long id) {
+ switch(position){
+ case 1:
+ SystemProperties.set("persist.sys.keylayout","fn");
+ break;
+ case 2:
+ SystemProperties.set("persist.sys.keylayout","fr");
+ break;
+ case 3:
+ SystemProperties.set("persist.sys.keylayout","de");
+ break;
+ case 4:
+ SystemProperties.set("persist.sys.keylayout","Ireland");
+ break;
+ case 5:
+ SystemProperties.set("persist.sys.keylayout","ru");
+ break;
+ case 6:
+ SystemProperties.set("persist.sys.keylayout","spanish_latin");
+ break;
+ default:
+ SystemProperties.set("persist.sys.keylayout","qwerty");
+ break;
+ }
+
+ Toast.makeText(this, "Please reboot your machine to enable the new keyboard layout.", Toast.LENGTH_LONG).show();
+ }
+}