extrnlz more strings; added ActionBar support

This commit is contained in:
Nathan Freitas 2012-02-27 06:50:35 -05:00
parent 82deb40dae
commit e3da83657b
7 changed files with 188 additions and 5 deletions

View File

@ -23,7 +23,7 @@
<TextView android:id="@+id/radioModeText" <TextView android:id="@+id/radioModeText"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="powered by The Tor Project " android:text="@string/powered_by"
android:layout_marginTop="8px" android:layout_marginTop="8px"
android:layout_marginRight="0px" android:layout_marginRight="0px"
android:gravity="right" android:gravity="right"

View File

@ -23,7 +23,7 @@
<TextView android:id="@+id/radioModeText" <TextView android:id="@+id/radioModeText"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="powered by The Tor Project " android:text="@string/powered_by"
android:layout_marginTop="8px" android:layout_marginTop="8px"
android:layout_marginRight="0px" android:layout_marginRight="0px"
android:gravity="right" android:gravity="right"

View File

@ -26,7 +26,7 @@
<TextView android:id="@+id/radioModeText" <TextView android:id="@+id/radioModeText"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="powered by The Tor Project " android:text="@string/powered_by"
android:layout_marginTop="8px" android:layout_marginTop="8px"
android:layout_marginRight="0px" android:layout_marginRight="0px"
android:gravity="right" android:gravity="right"

View File

@ -21,7 +21,7 @@
<Button android:id="@+id/btnSettingsSave" <Button android:id="@+id/btnSettingsSave"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="40px" android:layout_height="40px"
android:text="Save Settings" android:text="@string/btn_save_settings"
android:layout_margin="0sp" android:layout_margin="0sp"

91
res/menu-v11/main.xml Executable file
View File

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (C) 2008 Esmertec AG.
* Copyright (C) 2008 The Android 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.
*/
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/menu_start"
android:title="@string/menu_start"
android:icon="@drawable/menu_start"
android:showAsAction="ifRoom"
/>
<item android:id="@+id/menu_settings"
android:title="@string/menu_settings"
android:icon="@drawable/menu_settings"
android:showAsAction="always"
/>
<item android:id="@+id/menu_verify"
android:title="@string/menu_verify"
android:icon="@drawable/ic_menu_check"
android:showAsAction="always"
/>
<item android:id="@+id/menu_about"
android:title="@string/menu_about"
android:icon="@drawable/ic_menu_about"
android:showAsAction="ifRoom"
/>
<item android:id="@+id/menu_wizard"
android:title="@string/menu_wizard"
android:icon="@drawable/ic_menu_goto"
android:showAsAction="ifRoom"
/>
<item android:id="@+id/menu_exit"
android:title="@string/menu_exit"
android:icon="@drawable/ic_menu_exit"
android:showAsAction="ifRoom"
/>
</menu>
<!--
MenuItem mItem = null;
mItemOnOff = menu.add(0, 1, Menu.NONE, getString(R.string.menu_start));
mItemOnOff.setIcon(android.R.drawable.ic_media_play);
mItemOnOff.setAlphabeticShortcut('t');
mItemOnOff.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
mItem = menu.add(0, 4, Menu.NONE, getString(R.string.menu_settings));
mItem.setIcon(R.drawable.ic_menu_settings);
mItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
mItem = menu.add(0, 7, Menu.NONE, getString(R.string.menu_verify));
mItem.setIcon(R.drawable.ic_menu_check);
mItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
mItem = menu.add(0,6, Menu.NONE, getString(R.string.menu_about));
mItem.setIcon(R.drawable.ic_menu_about);
mItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
mItem = menu.add(0, 3, Menu.NONE, getString(R.string.menu_wizard));
mItem.setIcon(R.drawable.ic_menu_goto);
mItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
mItem = menu.add(0, 8, Menu.NONE, getString(R.string.menu_exit));
mItem.setIcon(R.drawable.ic_menu_exit);
mItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
-->

91
res/menu-v13/main.xml Executable file
View File

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (C) 2008 Esmertec AG.
* Copyright (C) 2008 The Android 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.
*/
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/menu_start"
android:title="@string/menu_start"
android:icon="@drawable/menu_start"
android:showAsAction="ifRoom"
/>
<item android:id="@+id/menu_settings"
android:title="@string/menu_settings"
android:icon="@drawable/menu_settings"
android:showAsAction="always"
/>
<item android:id="@+id/menu_verify"
android:title="@string/menu_verify"
android:icon="@drawable/ic_menu_check"
android:showAsAction="always"
/>
<item android:id="@+id/menu_about"
android:title="@string/menu_about"
android:icon="@drawable/ic_menu_about"
android:showAsAction="ifRoom"
/>
<item android:id="@+id/menu_wizard"
android:title="@string/menu_wizard"
android:icon="@drawable/ic_menu_goto"
android:showAsAction="ifRoom"
/>
<item android:id="@+id/menu_exit"
android:title="@string/menu_exit"
android:icon="@drawable/ic_menu_exit"
android:showAsAction="ifRoom"
/>
</menu>
<!--
MenuItem mItem = null;
mItemOnOff = menu.add(0, 1, Menu.NONE, getString(R.string.menu_start));
mItemOnOff.setIcon(android.R.drawable.ic_media_play);
mItemOnOff.setAlphabeticShortcut('t');
mItemOnOff.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
mItem = menu.add(0, 4, Menu.NONE, getString(R.string.menu_settings));
mItem.setIcon(R.drawable.ic_menu_settings);
mItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
mItem = menu.add(0, 7, Menu.NONE, getString(R.string.menu_verify));
mItem.setIcon(R.drawable.ic_menu_check);
mItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
mItem = menu.add(0,6, Menu.NONE, getString(R.string.menu_about));
mItem.setIcon(R.drawable.ic_menu_about);
mItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
mItem = menu.add(0, 3, Menu.NONE, getString(R.string.menu_wizard));
mItem.setIcon(R.drawable.ic_menu_goto);
mItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
mItem = menu.add(0, 8, Menu.NONE, getString(R.string.menu_exit));
mItem.setIcon(R.drawable.ic_menu_exit);
mItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
-->

View File

@ -41,7 +41,6 @@
<string name="menu_verify">Check</string> <string name="menu_verify">Check</string>
<string name="menu_exit">Exit</string> <string name="menu_exit">Exit</string>
<string name="powered_by">powered by the Tor Project</string>
<string name="press_to_start">- long press to start -</string> <string name="press_to_start">- long press to start -</string>
<string name="pref_trans_proxy_group">Transparent Proxying (Requires Root)</string> <string name="pref_trans_proxy_group">Transparent Proxying (Requires Root)</string>
@ -266,4 +265,6 @@
<string name="wizard_locale_title">Choose Language</string> <string name="wizard_locale_title">Choose Language</string>
<string name="wizard_locale_msg">Leave default or switch the current language</string> <string name="wizard_locale_msg">Leave default or switch the current language</string>
<string name="powered_by">powered by The Tor Project </string>
<string name="btn_save_settings">Save Settings</string>
</resources> </resources>