From 96b42902609330cf93fdff376a891640d26a36dd Mon Sep 17 00:00:00 2001 From: serso Date: Sun, 21 Feb 2016 13:25:14 +0100 Subject: [PATCH] Use toolbar instead of action bar in main activity --- app/build.gradle | 1 + app/misc/other/take_screenshots.py | 13 --- app/src/main/AndroidManifest.xml | 7 -- .../calculator/CalculatorActivity.java | 110 +++++++++++++----- .../calculator/CalculatorActivityMobile.java | 49 -------- .../android/calculator/EditorFragment.java | 44 ------- .../android/calculator/Preferences.java | 28 +++-- .../android/fragments/FragmentUtils.java | 72 ------------ ...{main_calculator.xml => activity_main.xml} | 7 +- ...{main_calculator.xml => activity_main.xml} | 9 +- .../activity_main_editor_with_toolbar.xml | 17 +++ app/src/main/res/layout/cpp_app_editor.xml | 24 ++-- app/src/main/res/values/attributes.xml | 1 + app/src/main/res/values/dimens.xml | 1 + app/src/main/res/values/styles.xml | 4 +- app/src/main/res/values/theme.xml | 7 ++ app/src/main/res/values/theme_material.xml | 5 + .../main/res/values/theme_material_light.xml | 5 + app/src/main/res/values/theme_metro_blue.xml | 9 +- app/src/main/res/values/theme_metro_green.xml | 5 + .../main/res/values/theme_metro_purple.xml | 5 + app/src/main/res/values/theme_old_blue.xml | 8 +- app/src/main/res/values/theme_old_gray.xml | 11 +- app/src/main/res/values/theme_old_violet.xml | 8 +- 24 files changed, 179 insertions(+), 271 deletions(-) delete mode 100644 app/src/main/java/org/solovyev/android/calculator/CalculatorActivityMobile.java delete mode 100644 app/src/main/java/org/solovyev/android/fragments/FragmentUtils.java rename app/src/main/res/layout-land/{main_calculator.xml => activity_main.xml} (92%) rename app/src/main/res/layout/{main_calculator.xml => activity_main.xml} (90%) create mode 100644 app/src/main/res/layout/activity_main_editor_with_toolbar.xml diff --git a/app/build.gradle b/app/build.gradle index 71a98c7f..d076ee1d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,6 +63,7 @@ dependencies { compile 'org.solovyev:common-msg:1.0.7' compile 'com.android.support:support-v4:23.1.1' compile 'com.android.support:appcompat-v7:23.1.1' + compile 'com.android.support:cardview-v7:23.1.1' compile 'com.android.support:design:23.1.1' compile('ch.acra:acra:4.7.0') { exclude group: 'org.json' diff --git a/app/misc/other/take_screenshots.py b/app/misc/other/take_screenshots.py index 3c355fab..bfc62756 100644 --- a/app/misc/other/take_screenshots.py +++ b/app/misc/other/take_screenshots.py @@ -12,7 +12,6 @@ print 'Screenshot will be located in ' + outFolder + ' with name ' + outFilename apk = '/home/serso/projects/java/android/calculatorpp/calculatorpp/misc/other/tmp/2012.11.25/calculatorpp.apk' package = 'org.solovyev.android.calculator' activity = 'org.solovyev.android.calculator.CalculatorActivity' -mobileActivity = 'org.solovyev.android.calculator.CalculatorActivityMobile' operatorsActivity = 'org.solovyev.android.calculator.math.edit.CalculatorOperatorsActivity' deviceName = 'emulator-5580' @@ -56,18 +55,6 @@ if device: #outFilename = outFilename + '_' + str(time.time()) takeScreenshot(outFolder, outFilename + '_operators'); - runComponent = package + '/' + mobileActivity - - print 'Starting activity ' + runComponent + '...' - device.startActivity(component=runComponent) - - # sleep while application will be loaded - MonkeyRunner.sleep(4); - - print 'Taking screenshot...' - #outFilename = outFilename + '_' + str(time.time()) - takeScreenshot(outFolder, outFilename + '_mobile'); - print '#########' print 'Finished!' print '#########' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index f03f5dde..c7bf696b 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -56,13 +56,6 @@ - - diff --git a/app/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java index a6c889e9..483b4761 100644 --- a/app/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java +++ b/app/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java @@ -22,26 +22,28 @@ package org.solovyev.android.calculator; -import android.annotation.TargetApi; import android.content.Context; import android.content.SharedPreferences; -import android.content.pm.ActivityInfo; +import android.content.res.Resources; import android.os.Build; import android.os.Bundle; -import android.preference.PreferenceManager; -import android.support.v7.app.ActionBar; +import android.support.v4.app.FragmentManager; +import android.support.v4.app.FragmentTransaction; import android.support.v7.app.AlertDialog; +import android.support.v7.widget.CardView; +import android.support.v7.widget.Toolbar; import android.text.method.LinkMovementMethod; import android.view.*; +import android.widget.FrameLayout; import android.widget.TextView; import butterknife.Bind; import butterknife.ButterKnife; import org.solovyev.android.Activities; import org.solovyev.android.Android; +import org.solovyev.android.calculator.converter.ConverterFragment; import org.solovyev.android.calculator.history.History; import org.solovyev.android.calculator.keyboard.PartialKeyboardUi; import org.solovyev.android.calculator.wizard.CalculatorWizards; -import org.solovyev.android.fragments.FragmentUtils; import org.solovyev.android.prefs.Preference; import org.solovyev.android.wizard.Wizard; import org.solovyev.android.wizard.Wizards; @@ -51,14 +53,14 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; import javax.inject.Inject; -import static android.os.Build.VERSION_CODES.GINGERBREAD_MR1; -import static android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH; +import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_PORTRAIT; +import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; import static android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON; import static org.solovyev.android.calculator.Preferences.Gui.preventScreenFromFading; import static org.solovyev.android.calculator.release.ReleaseNotes.hasReleaseNotes; import static org.solovyev.android.wizard.WizardUi.*; -public class CalculatorActivity extends BaseActivity implements SharedPreferences.OnSharedPreferenceChangeListener { +public class CalculatorActivity extends BaseActivity implements SharedPreferences.OnSharedPreferenceChangeListener, Toolbar.OnMenuItemClickListener { @Nonnull public static final String TAG = CalculatorActivity.class.getSimpleName(); @@ -77,6 +79,10 @@ public class CalculatorActivity extends BaseActivity implements SharedPreference @Nullable @Bind(R.id.partial_keyboard) View partialKeyboard; + @Bind(R.id.toolbar) + Toolbar toolbar; + @Bind(R.id.editor) + FrameLayout editor; private boolean useBackAsPrev; public CalculatorActivity() { @@ -154,36 +160,37 @@ public class CalculatorActivity extends BaseActivity implements SharedPreference @Override public void onCreate(@Nullable Bundle savedInstanceState) { - ui.setLayoutId(R.layout.main_calculator); + ui.setLayoutId(R.layout.activity_main); super.onCreate(savedInstanceState); - final ActionBar actionBar = getSupportActionBar(); - if (Build.VERSION.SDK_INT <= GINGERBREAD_MR1 || (Build.VERSION.SDK_INT >= ICE_CREAM_SANDWICH && hasPermanentMenuKey())) { - actionBar.hide(); - } else { - actionBar.setDisplayShowTitleEnabled(false); - actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); - } ButterKnife.bind(this); - FragmentUtils.createFragment(this, EditorFragment.class, R.id.editor, "editor"); - FragmentUtils.createFragment(this, DisplayFragment.class, R.id.display, "display"); - FragmentUtils.createFragment(this, KeyboardFragment.class, R.id.keyboard, "keyboard"); + if (savedInstanceState == null) { + final FragmentManager fm = getSupportFragmentManager(); + final FragmentTransaction t = fm.beginTransaction(); + t.add(R.id.editor, new EditorFragment(), "editor"); + t.add(R.id.display, new DisplayFragment(), "display"); + t.add(R.id.keyboard, new KeyboardFragment(), "keyboard"); + t.commit(); + } if (partialKeyboard != null) { partialKeyboardUi.onCreateView(this, partialKeyboard); } - this.useBackAsPrev = Preferences.Gui.usePrevAsBack.getPreference(preferences); + toolbar.inflateMenu(R.menu.main); + toolbar.setOnMenuItemClickListener(this); + + useBackAsPrev = Preferences.Gui.usePrevAsBack.getPreference(preferences); if (savedInstanceState == null) { firstTimeInit(preferences, this); } - toggleOrientationChange(preferences); + toggleOrientationChange(); + prepareCardAndToolbar(); preferences.registerOnSharedPreferenceChangeListener(this); - preferredPreferences.check(this, false); if (App.isMonkeyRunner(this)) { @@ -199,11 +206,6 @@ public class CalculatorActivity extends BaseActivity implements SharedPreference component.inject(this); } - @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) - private boolean hasPermanentMenuKey() { - return ViewConfiguration.get(this).hasPermanentMenuKey(); - } - @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { @@ -255,16 +257,60 @@ public class CalculatorActivity extends BaseActivity implements SharedPreference } if (Preferences.Gui.autoOrientation.getKey().equals(key)) { - toggleOrientationChange(preferences); + toggleOrientationChange(); } } - private void toggleOrientationChange(@Nullable SharedPreferences preferences) { - preferences = preferences == null ? PreferenceManager.getDefaultSharedPreferences(this) : preferences; + private void toggleOrientationChange() { if (Preferences.Gui.autoOrientation.getPreference(preferences)) { - setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); + setRequestedOrientation(SCREEN_ORIENTATION_UNSPECIFIED); } else { - setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); + setRequestedOrientation(SCREEN_ORIENTATION_PORTRAIT); } } + + @Override + public boolean onMenuItemClick(MenuItem item) { + switch (item.getItemId()) { + case R.id.menu_settings: + launcher.showSettings(); + return true; + case R.id.menu_history: + launcher.showHistory(); + return true; + case R.id.menu_plotter: + Locator.getInstance().getPlotter().plot(); + return true; + case R.id.menu_conversion_tool: + ConverterFragment.show(this); + return true; + case R.id.menu_about: + launcher.showAbout(); + return true; + } + return false; + } + + private void prepareCardAndToolbar() { + if (!(editor instanceof CardView)) { + return; + } + final CardView card = (CardView) editor; + final Resources resources = getResources(); + final int cardTopMargin = resources.getDimensionPixelSize(R.dimen.cpp_card_margin); + final int preLollipopCardTopPadding = Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP ? card.getPaddingTop() : 0; + + { + final ViewGroup.LayoutParams lp = toolbar.getLayoutParams(); + lp.height += cardTopMargin + preLollipopCardTopPadding; + toolbar.setLayoutParams(lp); + // center icons in toolbar + toolbar.setPadding(toolbar.getPaddingLeft(), toolbar.getPaddingTop() + cardTopMargin / 2 + preLollipopCardTopPadding, toolbar.getPaddingRight(), toolbar.getPaddingBottom() + cardTopMargin / 2); + } + final ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) card.getLayoutParams(); + final int actionWidth = resources.getDimensionPixelSize(R.dimen.abc_action_button_min_width_overflow_material) + 2 * resources.getDimensionPixelSize(R.dimen.abc_action_bar_overflow_padding_start_material); + lp.leftMargin = actionWidth + 2 * toolbar.getPaddingLeft(); + lp.rightMargin = actionWidth + 2 * toolbar.getPaddingRight(); + card.setLayoutParams(lp); + } } \ No newline at end of file diff --git a/app/src/main/java/org/solovyev/android/calculator/CalculatorActivityMobile.java b/app/src/main/java/org/solovyev/android/calculator/CalculatorActivityMobile.java deleted file mode 100644 index 6c13cbdf..00000000 --- a/app/src/main/java/org/solovyev/android/calculator/CalculatorActivityMobile.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 - */ - -package org.solovyev.android.calculator; - -import android.content.SharedPreferences; -import android.os.Bundle; -import android.preference.PreferenceManager; - -import javax.annotation.Nullable; - -/** - * User: serso - * Date: 11/25/12 - * Time: 2:34 PM - */ -public class CalculatorActivityMobile extends CalculatorActivity { - - @Override - public void onCreate(@Nullable Bundle savedInstanceState) { - final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); - Preferences.Gui.layout.putPreference(prefs, Preferences.Gui.Layout.main_calculator_mobile); - - super.onCreate(savedInstanceState); - - if (!App.isMonkeyRunner(this)) { - this.finish(); - } - } -} diff --git a/app/src/main/java/org/solovyev/android/calculator/EditorFragment.java b/app/src/main/java/org/solovyev/android/calculator/EditorFragment.java index c18856e0..ff657841 100644 --- a/app/src/main/java/org/solovyev/android/calculator/EditorFragment.java +++ b/app/src/main/java/org/solovyev/android/calculator/EditorFragment.java @@ -22,17 +22,10 @@ package org.solovyev.android.calculator; -import android.content.SharedPreferences; import android.os.Bundle; import android.view.LayoutInflater; -import android.view.Menu; -import android.view.MenuInflater; -import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; - -import org.solovyev.android.calculator.converter.ConverterFragment; - import butterknife.Bind; import butterknife.ButterKnife; @@ -43,10 +36,6 @@ public class EditorFragment extends BaseFragment { @Inject Editor editor; - @Inject - SharedPreferences preferences; - @Inject - ActivityLauncher launcher; @Bind(R.id.calculator_editor) EditorView editorView; @@ -54,12 +43,6 @@ public class EditorFragment extends BaseFragment { super(R.layout.cpp_app_editor); } - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setHasOptionsMenu(true); - } - @Override protected void inject(@Nonnull AppComponent component) { super.inject(component); @@ -79,31 +62,4 @@ public class EditorFragment extends BaseFragment { editor.clearView(editorView); super.onDestroyView(); } - - @Override - public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { - inflater.inflate(R.menu.main, menu); - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case R.id.menu_settings: - launcher.showSettings(); - return true; - case R.id.menu_history: - launcher.showHistory(); - return true; - case R.id.menu_plotter: - Locator.getInstance().getPlotter().plot(); - return true; - case R.id.menu_conversion_tool: - ConverterFragment.show(getActivity()); - return true; - case R.id.menu_about: - launcher.showAbout(); - return true; - } - return false; - } } diff --git a/app/src/main/java/org/solovyev/android/calculator/Preferences.java b/app/src/main/java/org/solovyev/android/calculator/Preferences.java index 2199e39d..4f25ca92 100644 --- a/app/src/main/java/org/solovyev/android/calculator/Preferences.java +++ b/app/src/main/java/org/solovyev/android/calculator/Preferences.java @@ -288,20 +288,22 @@ public final class Preferences { public enum Theme { - default_theme(R.style.Cpp_Theme_Gray), - violet_theme(R.style.Cpp_Theme_Violet), - light_blue_theme(R.style.Cpp_Theme_Blue), - metro_blue_theme(R.style.Cpp_Theme_Metro_Blue), - metro_purple_theme(R.style.Cpp_Theme_Metro_Purple), - metro_green_theme(R.style.Cpp_Theme_Metro_Green), - material_theme(R.style.Cpp_Theme_Material), - material_light_theme(R.style.Cpp_Theme_Material_Light, R.style.Cpp_Theme_Wizard_Light, R.style.Cpp_Theme_Material_Light_Dialog, R.style.Cpp_Theme_Material_Light_Dialog_Alert); + default_theme(R.style.Cpp_Theme_Gray, R.style.Cpp_Theme_Gray_NoActionBar), + violet_theme(R.style.Cpp_Theme_Violet, R.style.Cpp_Theme_Violet_NoActionBar), + light_blue_theme(R.style.Cpp_Theme_Blue, R.style.Cpp_Theme_Blue_NoActionBar), + metro_blue_theme(R.style.Cpp_Theme_Metro_Blue, R.style.Cpp_Theme_Metro_Blue_NoActionBar), + metro_purple_theme(R.style.Cpp_Theme_Metro_Purple, R.style.Cpp_Theme_Metro_Purple_NoActionBar), + metro_green_theme(R.style.Cpp_Theme_Metro_Green, R.style.Cpp_Theme_Metro_Green_NoActionBar), + material_theme(R.style.Cpp_Theme_Material, R.style.Cpp_Theme_Material_NoActionBar), + material_light_theme(R.style.Cpp_Theme_Material_Light, R.style.Cpp_Theme_Material_Light_NoActionBar, R.style.Cpp_Theme_Wizard_Light, R.style.Cpp_Theme_Material_Light_Dialog, R.style.Cpp_Theme_Material_Light_Dialog_Alert); private static final SparseArray textColors = new SparseArray<>(); @StyleRes public final int theme; @StyleRes + public final int mainTheme; + @StyleRes public final int wizardTheme; @StyleRes public final int dialogTheme; @@ -309,12 +311,13 @@ public final class Preferences { public final int alertDialogTheme; public final boolean light; - Theme(@StyleRes int theme) { - this(theme, R.style.Cpp_Theme_Wizard, R.style.Cpp_Theme_Material_Dialog, R.style.Cpp_Theme_Material_Dialog_Alert); + Theme(@StyleRes int theme, int mainTheme) { + this(theme, mainTheme, R.style.Cpp_Theme_Wizard, R.style.Cpp_Theme_Material_Dialog, R.style.Cpp_Theme_Material_Dialog_Alert); } - Theme(@StyleRes int theme, @StyleRes int wizardTheme, @StyleRes int dialogTheme, @StyleRes int alertDialogTheme) { + Theme(@StyleRes int theme, int mainTheme, @StyleRes int wizardTheme, @StyleRes int dialogTheme, @StyleRes int alertDialogTheme) { this.theme = theme; + this.mainTheme = mainTheme; this.wizardTheme = wizardTheme; this.dialogTheme = dialogTheme; this.alertDialogTheme = alertDialogTheme; @@ -322,6 +325,9 @@ public final class Preferences { } public int getThemeFor(@Nullable Context context) { + if (context instanceof CalculatorActivity) { + return wizardTheme; + } if (context instanceof WizardActivity) { return wizardTheme; } diff --git a/app/src/main/java/org/solovyev/android/fragments/FragmentUtils.java b/app/src/main/java/org/solovyev/android/fragments/FragmentUtils.java deleted file mode 100644 index ad3d2390..00000000 --- a/app/src/main/java/org/solovyev/android/fragments/FragmentUtils.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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 - */ - -package org.solovyev.android.fragments; - -import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentTransaction; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -/** - * User: serso - * Date: 9/25/12 - * Time: 9:29 PM - */ -public class FragmentUtils { - - public static void createFragment(@Nonnull FragmentActivity activity, - @Nonnull Class fragmentClass, - int parentViewId, - @Nonnull String tag) { - createFragment(activity, fragmentClass, parentViewId, tag, null); - } - - public static void createFragment(@Nonnull FragmentActivity activity, - @Nonnull Class fragmentClass, - int parentViewId, - @Nonnull String tag, - @Nullable Bundle args) { - final FragmentManager fm = activity.getSupportFragmentManager(); - - Fragment messagesFragment = fm.findFragmentByTag(tag); - - final FragmentTransaction ft = fm.beginTransaction(); - try { - if (messagesFragment == null) { - messagesFragment = Fragment.instantiate(activity, fragmentClass.getName(), args); - ft.add(parentViewId, messagesFragment, tag); - } else { - if (messagesFragment.isDetached()) { - ft.attach(messagesFragment); - } - } - } finally { - ft.commit(); - } - } - -} diff --git a/app/src/main/res/layout-land/main_calculator.xml b/app/src/main/res/layout-land/activity_main.xml similarity index 92% rename from app/src/main/res/layout-land/main_calculator.xml rename to app/src/main/res/layout-land/activity_main.xml index ce0282ae..c16fd7c2 100644 --- a/app/src/main/res/layout-land/main_calculator.xml +++ b/app/src/main/res/layout-land/activity_main.xml @@ -26,12 +26,7 @@ xmlns:a="http://schemas.android.com/apk/res/android" a:orientation="vertical"> - + - + + + + + + + diff --git a/app/src/main/res/layout/cpp_app_editor.xml b/app/src/main/res/layout/cpp_app_editor.xml index 18b7fde1..2a9413ec 100644 --- a/app/src/main/res/layout/cpp_app_editor.xml +++ b/app/src/main/res/layout/cpp_app_editor.xml @@ -21,21 +21,11 @@ ~ Email: se.solovyev@gmail.com ~ Site: http://se.solovyev.org --> - - - - - - \ No newline at end of file + a:hint="@string/c_calc_editor_hint" + a:padding="@dimen/cpp_editor_padding" + a:scrollbars="vertical" + a:singleLine="false" + a:textIsSelectable="true" /> \ No newline at end of file diff --git a/app/src/main/res/values/attributes.xml b/app/src/main/res/values/attributes.xml index 286ae74f..1432498d 100644 --- a/app/src/main/res/values/attributes.xml +++ b/app/src/main/res/values/attributes.xml @@ -33,5 +33,6 @@ + diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index e1225bff..73e622fd 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -44,4 +44,5 @@ 30dp 5dp 400dp + 4dp \ No newline at end of file diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 1f37e30b..14df9e37 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -59,8 +59,8 @@ + @@ -94,6 +100,7 @@ @color/cpp_material_light @color/cpp_text_inverse @color/cpp_text_inverse_error + @style/CardView.Light @drawable/divider diff --git a/app/src/main/res/values/theme_material.xml b/app/src/main/res/values/theme_material.xml index 50d8604a..8b4b2651 100644 --- a/app/src/main/res/values/theme_material.xml +++ b/app/src/main/res/values/theme_material.xml @@ -59,6 +59,11 @@ @dimen/cpp_widget_keyboard_button_text_size + + + + + + diff --git a/app/src/main/res/values/theme_metro_green.xml b/app/src/main/res/values/theme_metro_green.xml index 54e15e57..2b957bc6 100644 --- a/app/src/main/res/values/theme_metro_green.xml +++ b/app/src/main/res/values/theme_metro_green.xml @@ -26,6 +26,11 @@ @drawable/metro_button_green + + diff --git a/app/src/main/res/values/theme_metro_purple.xml b/app/src/main/res/values/theme_metro_purple.xml index ba4f3b7c..95591eb3 100644 --- a/app/src/main/res/values/theme_metro_purple.xml +++ b/app/src/main/res/values/theme_metro_purple.xml @@ -26,6 +26,11 @@ @drawable/metro_button_purple + + diff --git a/app/src/main/res/values/theme_old_blue.xml b/app/src/main/res/values/theme_old_blue.xml index a1db8be3..57101569 100644 --- a/app/src/main/res/values/theme_old_blue.xml +++ b/app/src/main/res/values/theme_old_blue.xml @@ -36,11 +36,15 @@ + diff --git a/app/src/main/res/values/theme_old_gray.xml b/app/src/main/res/values/theme_old_gray.xml index 014aab68..41f67614 100644 --- a/app/src/main/res/values/theme_old_gray.xml +++ b/app/src/main/res/values/theme_old_gray.xml @@ -36,19 +36,22 @@ + diff --git a/app/src/main/res/values/theme_old_violet.xml b/app/src/main/res/values/theme_old_violet.xml index 7b90d1a9..bc031e00 100644 --- a/app/src/main/res/values/theme_old_violet.xml +++ b/app/src/main/res/values/theme_old_violet.xml @@ -36,11 +36,15 @@ + \ No newline at end of file