Mode menu setting

This commit is contained in:
serso
2016-03-23 00:15:03 +01:00
parent 4b413022a1
commit d6ea6c742f
16 changed files with 105 additions and 215 deletions

View File

@@ -1,50 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2013 serso aka se.solovyev
~
~ 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.
~
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Contact details
~
~ Email: se.solovyev@gmail.com
~ Site: http://se.solovyev.org
-->
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:layout_width="match_parent"
a:layout_height="match_parent"
a:gravity="center"
a:orientation="vertical">
<TextView
style="@style/WizardLabel"
a:layout_width="wrap_content"
a:layout_height="wrap_content"
a:text="@string/cpp_wizard_layout_title"
a:textAppearance="@android:style/TextAppearance.Large" />
<Spinner
a:id="@+id/wizard_layout_spinner"
style="@style/WizardLabel"
a:layout_width="wrap_content"
a:layout_height="wrap_content" />
<ImageView
a:id="@+id/wizard_layout_image"
style="@style/WizardLabel.Last"
a:layout_width="wrap_content"
a:layout_height="wrap_content" />
</LinearLayout>

View File

@@ -2,6 +2,20 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_mode"
android:title="@string/cpp_mode"
app:showAsAction="never">
<menu>
<item
android:id="@+id/menu_mode_engineer"
android:title="@string/cpp_wizard_mode_engineer" />
<item
android:id="@+id/menu_mode_simple"
android:title="@string/cpp_wizard_mode_simple" />
</menu>
</item>
<item
android:id="@+id/menu_settings"
android:title="@string/cpp_settings"

View File

@@ -66,12 +66,12 @@
<item>"∙"</item>
</string-array>
<string-array name="p_layout_names" tools:ignore="InconsistentArrays">
<item>@string/p_layout_calculator</item>
<item>@string/p_layout_simple</item>
<string-array name="p_layout_names">
<item>@string/cpp_wizard_mode_engineer</item>
<item>@string/cpp_wizard_mode_simple</item>
</string-array>
<string-array name="p_layout_values" translatable="false" tools:ignore="InconsistentArrays">
<item>main_calculator</item>
<string-array name="p_layout_values" translatable="false">
<item>engineer</item>
<item>simple</item>
</string-array>

View File

@@ -241,4 +241,6 @@
<string name="cpp_missing_permission_msg">Please enable \"%1$s\" permission in system settings</string>
<string name="fn_line_width">Line width</string>
<string name="fn_line_color">Line color</string>
<string name="cpp_mode">Mode</string>
<string name="cpp_mode_status">Mode: %1$s</string>
</resources>

View File

@@ -43,9 +43,8 @@
<ListPreference
a:entries="@array/p_layout_names"
a:entryValues="@array/p_layout_values"
a:key="gui.layout"
a:summary="@string/c_calc_layout_summary"
a:title="@string/c_calc_layout" />
a:key="gui.mode"
a:title="@string/cpp_mode" />
<android.preference.CheckBoxPreference
a:defaultValue="true"