From 7686578a5c5ef35f4ae4a3a60c6ba7927b394501 Mon Sep 17 00:00:00 2001 From: Manuel Martin Date: Fri, 2 Nov 2018 11:02:58 +0100 Subject: [PATCH] Fixes #612 #629 New UI with more consistent styles (#703) --- .../mozilla/vrbrowser/VRBrowserActivity.java | 2 - .../ui/prompts/ChoicePromptWidget.java | 2 +- .../ui/settings/DoubleEditSetting.java | 6 +- .../ui/settings/SingleEditSetting.java | 4 +- .../vrbrowser/ui/settings/SwitchSetting.java | 4 +- .../ui/views/DeveloperOptionsEditText.java | 8 +- .../vrbrowser/ui/views/HoneycombButton.java | 99 ++++++ .../vrbrowser/ui/views/HoneycombSwitch.java | 76 ++++ .../vrbrowser/ui/views/NavigationURLBar.java | 3 + .../vrbrowser/ui/views/SettingsButton.java | 104 ------ .../ui/widgets/CloseButtonWidget.java | 95 ----- .../ui/widgets/CrashDialogWidget.java | 4 + .../ui/widgets/DeveloperOptionsWidget.java | 17 +- .../ui/widgets/PermissionWidget.java | 27 +- .../ui/widgets/RestartDialogWidget.java | 6 +- .../vrbrowser/ui/widgets/SettingsWidget.java | 26 +- .../ui/widgets/VoiceSearchWidget.java | 21 +- app/src/googlevrFlat/AndroidManifest.xml | 2 +- app/src/main/AndroidManifest.xml | 2 +- .../res/drawable/crash_dialog_background.xml | 7 - app/src/main/res/drawable/cursor_drawable.xml | 6 + .../drawable/developer_options_background.xml | 8 - .../main/res/drawable/dialog_background.xml | 5 +- ...color.xml => dialog_button_text_color.xml} | 0 ... dialog_highlighted_button_background.xml} | 4 +- ...l => dialog_regular_button_background.xml} | 4 +- .../res/drawable/ic_button_checkbox_off.xml | 9 +- .../res/drawable/ic_button_checkbox_on.xml | 21 +- app/src/main/res/drawable/ic_icon_clear.xml | 2 +- .../res/drawable/ic_icon_dialog_camera.xml | 11 +- app/src/main/res/drawable/ic_icon_storage.xml | 24 ++ .../ic_menu_settings_honeycomb_fill.xml | 1 - ...ic_menu_settings_honeycomb_outline_2pt.xml | 28 -- app/src/main/res/drawable/main_button.xml | 3 - .../main/res/drawable/main_button_private.xml | 3 - .../res/drawable/permission_background.xml | 7 - .../drawable/rectangle_button_background.xml | 5 +- .../{scrollbar.xml => scrollbar_thumb.xml} | 0 .../main/res/drawable/settings_background.xml | 2 +- app/src/main/res/drawable/url_background.xml | 58 ++- .../res/drawable/url_background_private.xml | 28 +- .../res/drawable/voice_search_background.xml | 7 - app/src/main/res/layout/choice_prompt.xml | 2 +- app/src/main/res/layout/crash_dialog.xml | 69 ++-- app/src/main/res/layout/developer_options.xml | 5 +- ...{settings_btn.xml => honeycomb_button.xml} | 4 +- app/src/main/res/layout/honeycomb_switch.xml | 24 ++ app/src/main/res/layout/navigation_url.xml | 7 +- app/src/main/res/layout/permission.xml | 120 +++---- app/src/main/res/layout/restart_dialog.xml | 82 +++-- app/src/main/res/layout/setting_button.xml | 25 +- app/src/main/res/layout/setting_edit.xml | 61 ++-- .../main/res/layout/setting_radio_group.xml | 15 +- app/src/main/res/layout/setting_switch.xml | 26 +- app/src/main/res/layout/settings.xml | 332 ++++++++---------- .../main/res/layout/voice_search_dialog.xml | 132 ++++--- app/src/main/res/values/attrs.xml | 15 +- app/src/main/res/values/colors.xml | 3 + app/src/main/res/values/dimen.xml | 50 ++- app/src/main/res/values/strings.xml | 9 +- app/src/main/res/values/styles.xml | 131 ++++--- .../oculusvrArmRelease/AndroidManifest.xml | 2 +- app/src/wavevr/AndroidManifest.xml | 2 +- 63 files changed, 923 insertions(+), 944 deletions(-) create mode 100644 app/src/common/shared/org/mozilla/vrbrowser/ui/views/HoneycombButton.java create mode 100644 app/src/common/shared/org/mozilla/vrbrowser/ui/views/HoneycombSwitch.java delete mode 100644 app/src/common/shared/org/mozilla/vrbrowser/ui/views/SettingsButton.java delete mode 100644 app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/CloseButtonWidget.java delete mode 100644 app/src/main/res/drawable/crash_dialog_background.xml create mode 100644 app/src/main/res/drawable/cursor_drawable.xml delete mode 100644 app/src/main/res/drawable/developer_options_background.xml rename app/src/main/res/drawable/{crash_dialog_button_text_color.xml => dialog_button_text_color.xml} (100%) rename app/src/main/res/drawable/{crash_dialog_button_send_background.xml => dialog_highlighted_button_background.xml} (79%) rename app/src/main/res/drawable/{crash_dialog_button_background.xml => dialog_regular_button_background.xml} (79%) create mode 100644 app/src/main/res/drawable/ic_icon_storage.xml delete mode 100644 app/src/main/res/drawable/ic_menu_settings_honeycomb_outline_2pt.xml delete mode 100644 app/src/main/res/drawable/permission_background.xml rename app/src/main/res/drawable/{scrollbar.xml => scrollbar_thumb.xml} (100%) delete mode 100644 app/src/main/res/drawable/voice_search_background.xml rename app/src/main/res/layout/{settings_btn.xml => honeycomb_button.xml} (91%) create mode 100644 app/src/main/res/layout/honeycomb_switch.xml diff --git a/app/src/common/shared/org/mozilla/vrbrowser/VRBrowserActivity.java b/app/src/common/shared/org/mozilla/vrbrowser/VRBrowserActivity.java index 957affe12..996f0c015 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/VRBrowserActivity.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/VRBrowserActivity.java @@ -47,14 +47,12 @@ import org.mozilla.vrbrowser.ui.widgets.RootWidget; import org.mozilla.vrbrowser.ui.widgets.TopBarWidget; import org.mozilla.vrbrowser.ui.widgets.TrayWidget; -import org.mozilla.vrbrowser.ui.widgets.UIWidget; import org.mozilla.vrbrowser.ui.widgets.Widget; import org.mozilla.vrbrowser.ui.widgets.WidgetManagerDelegate; import org.mozilla.vrbrowser.ui.widgets.WidgetPlacement; import java.io.IOException; import java.net.URISyntaxException; -import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.LinkedList; diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/prompts/ChoicePromptWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/prompts/ChoicePromptWidget.java index 33af81f2d..c678ddd74 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/prompts/ChoicePromptWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/prompts/ChoicePromptWidget.java @@ -160,7 +160,7 @@ protected void initializeWidgetPlacement(WidgetPlacement aPlacement) { aPlacement.parentAnchorY = 0.5f; aPlacement.anchorX = 0.5f; aPlacement.anchorY = 0.5f; - aPlacement.translationZ = WidgetPlacement.unitFromMeters(getContext(), R.dimen.choice_prompt_world_z); + aPlacement.translationZ = WidgetPlacement.unitFromMeters(getContext(), R.dimen.browser_children_z_distance); } @Override diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/settings/DoubleEditSetting.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/settings/DoubleEditSetting.java index e960b2e2d..f23d7fa30 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/settings/DoubleEditSetting.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/settings/DoubleEditSetting.java @@ -30,12 +30,12 @@ public DoubleEditSetting(Context context, AttributeSet attrs, int defStyleAttr) } private void initialize(Context aContext) { - TextView by = findViewById(R.id.setting_by); + TextView by = findViewById(R.id.settingBy); by.setText(mBy); by.setVisibility(View.VISIBLE); - mText2 = findViewById(R.id.text2); - mEdit2 = findViewById(R.id.edit2); + mText2 = findViewById(R.id.textValue2); + mEdit2 = findViewById(R.id.editValue2); mEdit2.setSoundEffectsEnabled(false); mEdit2.setOnEditorActionListener(mInternalEditorActionListener); diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/settings/SingleEditSetting.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/settings/SingleEditSetting.java index efc92357b..4b521a4a6 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/settings/SingleEditSetting.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/settings/SingleEditSetting.java @@ -46,8 +46,8 @@ private void initialize(Context aContext) { mDescriptionView = findViewById(R.id.setting_description); mDescriptionView.setText(mDescription); - mText1 = findViewById(R.id.text1); - mEdit1 = findViewById(R.id.edit1); + mText1 = findViewById(R.id.textValue1); + mEdit1 = findViewById(R.id.editValue1); mEdit1.setSoundEffectsEnabled(false); mEdit1.setOnEditorActionListener(mInternalEditorActionListener); diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/settings/SwitchSetting.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/settings/SwitchSetting.java index cc05cde53..518dc3232 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/settings/SwitchSetting.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/settings/SwitchSetting.java @@ -69,7 +69,9 @@ public void setValue(boolean value, boolean doApply) { mSwitch.setOnCheckedChangeListener(null); mSwitch.setChecked(value); mSwitch.setOnCheckedChangeListener(mInternalSwitchListener); - mSwitchText.setText(value ? getContext().getString(R.string.on) : getContext().getString(R.string.off)); + mSwitchText.setText(value ? + getContext().getString(R.string.on).toUpperCase() : + getContext().getString(R.string.off).toUpperCase()); if (mSwitchListener != null && doApply) { mSwitchListener.onCheckedChanged(mSwitch, value, doApply); diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/views/DeveloperOptionsEditText.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/views/DeveloperOptionsEditText.java index e68fae8e1..a2db6c971 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/views/DeveloperOptionsEditText.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/views/DeveloperOptionsEditText.java @@ -9,12 +9,10 @@ public class DeveloperOptionsEditText extends android.support.v7.widget.AppCompatEditText { - public DeveloperOptionsEditText(Context context) { - this(context, null); - } - public DeveloperOptionsEditText(Context context, AttributeSet attrs) { - this(context, attrs, R.attr.developerOptionsEditTextStyle); + super(context, attrs); + + initialize(); } public DeveloperOptionsEditText(Context context, AttributeSet attrs, int defStyleAttr) { diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/views/HoneycombButton.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/views/HoneycombButton.java new file mode 100644 index 000000000..a60c296aa --- /dev/null +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/views/HoneycombButton.java @@ -0,0 +1,99 @@ +package org.mozilla.vrbrowser.ui.views; + +import android.content.Context; +import android.content.res.TypedArray; +import android.graphics.PorterDuff; +import android.graphics.PorterDuffColorFilter; +import android.graphics.drawable.Drawable; +import android.support.annotation.Nullable; +import android.util.AttributeSet; +import android.view.MotionEvent; +import android.view.View; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.TextView; +import org.mozilla.vrbrowser.R; +import org.mozilla.vrbrowser.audio.AudioEngine; + +public class HoneycombButton extends LinearLayout { + + private ImageView mIcon; + private TextView mText; + private TextView mSecondaryText; + private String mButtonText; + private float mButtonTextSize; + private String mSecondaryButtonText; + private Drawable mButtonIcon; + private AudioEngine mAudio; + + public HoneycombButton(Context context, @Nullable AttributeSet attrs) { + this(context, attrs, R.style.settingsButtonTheme); + } + + public HoneycombButton(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + TypedArray attributes = context.obtainStyledAttributes(attrs, R.styleable.HoneycombButton, defStyleAttr, 0); + mButtonText = attributes.getString(R.styleable.HoneycombButton_honeycombButtonText); + mButtonTextSize = attributes.getDimension(R.styleable.HoneycombButton_honeycombButtonTextSize, 0.0f); + mButtonIcon = attributes.getDrawable(R.styleable.HoneycombButton_honeycombButtonIcon); + mSecondaryButtonText = attributes.getString(R.styleable.HoneycombButton_honeycombSecondaryText); + initialize(context); + } + + private void initialize(Context aContext) { + inflate(aContext, R.layout.honeycomb_button, this); + + mAudio = AudioEngine.fromContext(aContext); + + setClickable(true); + + mIcon = findViewById(R.id.settings_button_icon); + if (mIcon != null) + mIcon.setImageDrawable(mButtonIcon); + + mText = findViewById(R.id.settings_button_text); + if (mText != null) { + mText.setText(mButtonText); + if (mButtonTextSize > 0) { + mText.getLayoutParams().width = (int) mButtonTextSize; + } + } + + mSecondaryText = findViewById(R.id.settings_secondary_text); + if (mSecondaryText != null) + mSecondaryText.setText(mSecondaryButtonText); + + setOnHoverListener((view, motionEvent) -> false); + + setSoundEffectsEnabled(false); + } + + @Override + public void setOnHoverListener(final OnHoverListener l) { + super.setOnHoverListener((view, motionEvent) -> { + switch (motionEvent.getAction()) { + case MotionEvent.ACTION_HOVER_ENTER: + if (mIcon != null && mText != null) { + mIcon.setColorFilter(new PorterDuffColorFilter(getResources().getColor(R.color.asphalt, getContext().getTheme()), PorterDuff.Mode.MULTIPLY)); + mText.setTextColor(getContext().getColor(R.color.asphalt)); + mSecondaryText.setTextColor(getContext().getColor(R.color.asphalt)); + } + break; + case MotionEvent.ACTION_HOVER_EXIT: + if (mIcon != null && mText != null) { + mIcon.setColorFilter(new PorterDuffColorFilter(getResources().getColor(R.color.fog, getContext().getTheme()), PorterDuff.Mode.MULTIPLY)); + mText.setTextColor(getContext().getColor(R.color.fog)); + mSecondaryText.setTextColor(getContext().getColor(R.color.fog)); + } + break; + } + + return l.onHover(view, motionEvent); + }); + } + + @Override + public boolean onInterceptTouchEvent(MotionEvent ev) { + return true; + } +} diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/views/HoneycombSwitch.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/views/HoneycombSwitch.java new file mode 100644 index 000000000..c1bd3e640 --- /dev/null +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/views/HoneycombSwitch.java @@ -0,0 +1,76 @@ +package org.mozilla.vrbrowser.ui.views; + +import android.content.Context; +import android.content.res.TypedArray; +import android.support.annotation.Nullable; +import android.util.AttributeSet; +import android.widget.CompoundButton; +import android.widget.LinearLayout; +import android.widget.Switch; +import android.widget.TextView; + +import org.mozilla.vrbrowser.R; +import org.mozilla.vrbrowser.audio.AudioEngine; + +public class HoneycombSwitch extends LinearLayout { + + public interface OnCheckedChangeListener { + void onCheckedChanged(CompoundButton compoundButton, boolean b); + } + + private TextView mText; + private TextView mStateText; + private Switch mSwitch; + private String mSwitchText; + private float mSwitchTextSize; + private OnCheckedChangeListener mSwitchListener; + + public HoneycombSwitch(Context context, @Nullable AttributeSet attrs) { + this(context, attrs, R.style.settingsButtonTheme); + } + + public HoneycombSwitch(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + TypedArray attributes = context.obtainStyledAttributes(attrs, R.styleable.HoneycombSwitch, defStyleAttr, 0); + mSwitchText = attributes.getString(R.styleable.HoneycombSwitch_honeycombSwitchText); + mSwitchTextSize = attributes.getDimension(R.styleable.HoneycombSwitch_honeycombSwitchTextSize, 0.0f); + initialize(context); + } + + private void initialize(Context aContext) { + inflate(aContext, R.layout.honeycomb_switch, this); + + mSwitch = findViewById(R.id.honeycombSwitchButton); + mSwitch.setOnCheckedChangeListener(mInternalSwitchListener); + mSwitch.setSoundEffectsEnabled(false); + + mText = findViewById(R.id.honeycombSwitchText); + if (mText != null) { + mText.setText(mSwitchText); + if (mSwitchTextSize > 0) { + mText.getLayoutParams().width = (int) mSwitchTextSize; + } + } + + mStateText = findViewById(R.id.honeycombSwitchStateText); + } + + private CompoundButton.OnCheckedChangeListener mInternalSwitchListener = new CompoundButton.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(CompoundButton compoundButton, boolean b) { + mStateText.setText(b ? + getContext().getString(R.string.on).toUpperCase() : + getContext().getString(R.string.off).toUpperCase()); + + if (mSwitchListener != null) { + mSwitchListener.onCheckedChanged(compoundButton, b); + } + + } + }; + + public void setOnCheckedChangeListener(OnCheckedChangeListener aListener) { + mSwitchListener = aListener; + } + +} diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/views/NavigationURLBar.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/views/NavigationURLBar.java index 39cacc4db..afa6ec8d6 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/views/NavigationURLBar.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/views/NavigationURLBar.java @@ -93,6 +93,9 @@ public boolean onTouch(View view, MotionEvent motionEvent) { } }); mURL.addTextChangedListener(mURLTextWatcher); + mURL.setFocusable(true); + mURL.setFocusableInTouchMode(true); + mMicrophoneButton = findViewById(R.id.microphoneButton); mMicrophoneButton.setTag(R.string.view_id_tag, R.id.microphoneButton); mMicrophoneButton.setOnClickListener(mMicrophoneListener); diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/views/SettingsButton.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/views/SettingsButton.java deleted file mode 100644 index cbadf3f72..000000000 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/views/SettingsButton.java +++ /dev/null @@ -1,104 +0,0 @@ -package org.mozilla.vrbrowser.ui.views; - -import android.content.Context; -import android.content.res.TypedArray; -import android.graphics.PorterDuff; -import android.graphics.PorterDuffColorFilter; -import android.graphics.drawable.Drawable; -import android.support.annotation.Nullable; -import android.util.AttributeSet; -import android.view.MotionEvent; -import android.view.View; -import android.widget.ImageView; -import android.widget.LinearLayout; -import android.widget.TextView; -import org.mozilla.vrbrowser.R; - -public class SettingsButton extends LinearLayout { - - private ImageView mIcon; - private TextView mText; - private TextView mSecondaryText; - private String mButtonText; - private float mButtonTextSize; - private String mSecondaryButtonText; - private Drawable mButtonIcon; - - public SettingsButton(Context context, @Nullable AttributeSet attrs) { - this(context, attrs, R.style.settingsButtonTheme); - } - - public SettingsButton(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - TypedArray attributes = context.obtainStyledAttributes(attrs, R.styleable.SettingsButton, defStyleAttr, 0); - mButtonText = attributes.getString(R.styleable.SettingsButton_settingsButtonText); - mButtonTextSize = attributes.getDimension(R.styleable.SettingsButton_settingsButtonTextSize, 0.0f); - mButtonIcon = attributes.getDrawable(R.styleable.SettingsButton_settingsButtonIcon); - mSecondaryButtonText = attributes.getString(R.styleable.SettingsButton_settingsSecondaryText); - initialize(context); - } - - private void initialize(Context aContext) { - inflate(aContext, R.layout.settings_btn, this); - - setClickable(true); - - mIcon = findViewById(R.id.settings_button_icon); - if (mIcon != null) - mIcon.setImageDrawable(mButtonIcon); - - mText = findViewById(R.id.settings_button_text); - if (mText != null) { - mText.setText(mButtonText); - if (mButtonTextSize > 0) { - mText.getLayoutParams().width = (int) mButtonTextSize; - } - } - - mSecondaryText = findViewById(R.id.settings_secondary_text); - if (mSecondaryText != null) - mSecondaryText.setText(mSecondaryButtonText); - - setOnHoverListener(new OnHoverListener() { - @Override - public boolean onHover(View view, MotionEvent motionEvent) { - return false; - } - }); - - setSoundEffectsEnabled(false); - } - - @Override - public void setOnHoverListener(final OnHoverListener l) { - super.setOnHoverListener(new OnHoverListener() { - - @Override - public boolean onHover(View view, MotionEvent motionEvent) { - switch (motionEvent.getAction()) { - case MotionEvent.ACTION_HOVER_ENTER: - if (mIcon != null && mText != null) { - mIcon.setColorFilter(new PorterDuffColorFilter(getResources().getColor(R.color.asphalt, getContext().getTheme()), PorterDuff.Mode.MULTIPLY)); - mText.setTextColor(getContext().getColor(R.color.asphalt)); - mSecondaryText.setTextColor(getContext().getColor(R.color.asphalt)); - } - break; - case MotionEvent.ACTION_HOVER_EXIT: - if (mIcon != null && mText != null) { - mIcon.setColorFilter(new PorterDuffColorFilter(getResources().getColor(R.color.fog, getContext().getTheme()), PorterDuff.Mode.MULTIPLY)); - mText.setTextColor(getContext().getColor(R.color.fog)); - mSecondaryText.setTextColor(getContext().getColor(R.color.fog)); - } - break; - } - - return l.onHover(view, motionEvent); - } - }); - } - - @Override - public boolean onInterceptTouchEvent(MotionEvent ev) { - return true; - } -} diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/CloseButtonWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/CloseButtonWidget.java deleted file mode 100644 index 9d90c13a2..000000000 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/CloseButtonWidget.java +++ /dev/null @@ -1,95 +0,0 @@ -package org.mozilla.vrbrowser.ui.widgets; - -import android.content.Context; -import android.util.AttributeSet; -import android.view.View; -import org.mozilla.vrbrowser.R; -import org.mozilla.vrbrowser.audio.AudioEngine; -import org.mozilla.vrbrowser.ui.views.UIButton; - -public class CloseButtonWidget extends UIWidget { - - private static final String LOGTAG = "VRB"; - - public interface CloseButtonDelegate { - void OnClick(); - } - - private UIButton mCancelButton; - private CloseButtonDelegate mDelegate; - private AudioEngine mAudio; - - public CloseButtonWidget(Context aContext) { - super(aContext); - initialize(aContext); - } - - public CloseButtonWidget(Context aContext, AttributeSet aAttrs) { - super(aContext, aAttrs); - initialize(aContext); - } - - public CloseButtonWidget(Context aContext, AttributeSet aAttrs, int aDefStyle) { - super(aContext, aAttrs, aDefStyle); - initialize(aContext); - } - - private void initialize(Context aContext) { - inflate(aContext, R.layout.close_button, this); - - mCancelButton = findViewById(R.id.closeButton); - - mCancelButton.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View view) { - if (mAudio != null) { - mAudio.playSound(AudioEngine.Sound.CLICK); - } - - if (mDelegate != null) { - mDelegate.OnClick(); - } - } - }); - - mAudio = AudioEngine.fromContext(aContext); - } - - @Override - public void releaseWidget() { - super.releaseWidget(); - } - - public void setDelegate(CloseButtonDelegate delegate) { - mDelegate = delegate; - } - - @Override - protected void initializeWidgetPlacement(WidgetPlacement aPlacement) { - aPlacement.visible = false; - aPlacement.width = WidgetPlacement.dpDimension(getContext(), R.dimen.close_button_width); - aPlacement.height = WidgetPlacement.dpDimension(getContext(), R.dimen.close_button_height); - aPlacement.parentAnchorX = 0.5f; - aPlacement.parentAnchorY = 1.0f; - aPlacement.anchorX = 0.5f; - aPlacement.anchorY = 0.5f; - aPlacement.translationZ = WidgetPlacement.unitFromMeters(getContext(), R.dimen.voice_search_world_z); - } - - @Override - public void show() { - if (!mWidgetPlacement.visible) { - mWidgetPlacement.visible = true; - mWidgetManager.addWidget(this); - } - } - - @Override - public void hide() { - if (mWidgetPlacement.visible) { - mWidgetPlacement.visible = false; - mWidgetManager.removeWidget(this); - } - } - -} diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/CrashDialogWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/CrashDialogWidget.java index e0d1c3319..bc701e9ab 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/CrashDialogWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/CrashDialogWidget.java @@ -75,6 +75,7 @@ private void initialize(Context aContext) { onDismiss(); }); + mLearnMoreButton.setSoundEffectsEnabled(false); mDoNotSendButton.setOnClickListener(view -> { if (mAudio != null) { @@ -83,6 +84,7 @@ private void initialize(Context aContext) { onDismiss(); }); + mDoNotSendButton.setSoundEffectsEnabled(false); mSendDataButton.setOnClickListener(view -> { if (mAudio != null) { @@ -97,6 +99,7 @@ private void initialize(Context aContext) { SettingsStore.getInstance(getContext()).setCrashReportingEnabled(mSendDataCheckBox.isChecked()); }); + mSendDataButton.setSoundEffectsEnabled(false); mSendDataCheckBox.setChecked(SettingsStore.getInstance(getContext()).isCrashReportingEnabled()); mSendDataCheckBox.setOnCheckedChangeListener((compoundButton, b) -> { @@ -104,6 +107,7 @@ private void initialize(Context aContext) { mAudio.playSound(AudioEngine.Sound.CLICK); } }); + mSendDataCheckBox.setSoundEffectsEnabled(false); mCrashMessage.setText(getContext().getString(R.string.crash_dialog_message, getContext().getString(R.string.app_name))); diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/DeveloperOptionsWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/DeveloperOptionsWidget.java index 0e070b76b..60ee0ad39 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/DeveloperOptionsWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/DeveloperOptionsWidget.java @@ -10,17 +10,18 @@ import android.view.View; import android.widget.CompoundButton; import android.widget.RadioGroup; +import android.widget.ScrollView; import org.mozilla.vrbrowser.R; +import org.mozilla.vrbrowser.audio.AudioEngine; import org.mozilla.vrbrowser.browser.SessionStore; import org.mozilla.vrbrowser.browser.SettingsStore; -import org.mozilla.vrbrowser.audio.AudioEngine; -import org.mozilla.vrbrowser.ui.views.UIButton; import org.mozilla.vrbrowser.ui.settings.ButtonSetting; import org.mozilla.vrbrowser.ui.settings.DoubleEditSetting; -import org.mozilla.vrbrowser.ui.settings.SingleEditSetting; import org.mozilla.vrbrowser.ui.settings.RadioGroupSetting; +import org.mozilla.vrbrowser.ui.settings.SingleEditSetting; import org.mozilla.vrbrowser.ui.settings.SwitchSetting; +import org.mozilla.vrbrowser.ui.views.UIButton; import static org.mozilla.vrbrowser.utils.ServoUtils.isServoAvailable; @@ -50,6 +51,7 @@ public class DeveloperOptionsWidget extends UIWidget { private ButtonSetting mResetButton; private int mRestartDialogHandle = -1; + private ScrollView mScrollbar; public DeveloperOptionsWidget(Context aContext) { super(aContext); @@ -157,6 +159,8 @@ public void onClick(View view) { mResetButton = findViewById(R.id.resetButton); mResetButton.setOnClickListener(mResetListener); + + mScrollbar = findViewById(R.id.scrollbar); } @Override @@ -172,6 +176,13 @@ protected void initializeWidgetPlacement(WidgetPlacement aPlacement) { aPlacement.translationZ = WidgetPlacement.unitFromMeters(getContext(), R.dimen.restart_dialog_world_z); } + @Override + public void show() { + super.show(); + + mScrollbar.scrollTo(0, 0); + } + private void showRestartDialog() { hide(); diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/PermissionWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/PermissionWidget.java index 3da459b27..03e3779ff 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/PermissionWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/PermissionWidget.java @@ -11,7 +11,7 @@ import android.util.AttributeSet; import android.util.Log; import android.view.View; -import android.widget.ImageButton; +import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; @@ -60,23 +60,11 @@ private void initialize(Context aContext) { mPermissionIcon = findViewById(R.id.permissionIcon); mPermissionMessage = findViewById(R.id.permissionText); - ImageButton cancelButton = findViewById(R.id.permissionCancelButton); + Button cancelButton = findViewById(R.id.permissionCancelButton); + cancelButton.setOnClickListener(v -> handlePermissionResult(false)); - cancelButton.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - handlePermissionResult(false); - } - }); - - ImageButton allowButton = findViewById(R.id.permissionAllowButton); - - allowButton.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - handlePermissionResult(true); - } - }); + Button allowButton = findViewById(R.id.permissionAllowButton); + allowButton.setOnClickListener(v -> handlePermissionResult(true)); } @Override @@ -92,7 +80,7 @@ protected void initializeWidgetPlacement(WidgetPlacement aPlacement) { aPlacement.width = WidgetPlacement.dpDimension(context, R.dimen.permission_width); aPlacement.height = WidgetPlacement.dpDimension(context, R.dimen.permission_height); aPlacement.worldWidth = WidgetPlacement.floatDimension(context, R.dimen.permission_world_width); - aPlacement.translationZ = WidgetPlacement.unitFromMeters(context, R.dimen.permission_distance_from_browser); + aPlacement.translationZ = WidgetPlacement.unitFromMeters(context, R.dimen.browser_children_z_distance); aPlacement.parentAnchorX = 0.5f; aPlacement.parentAnchorY = 0.5f; aPlacement.anchorX = 0.5f; @@ -139,7 +127,7 @@ public void showPrompt(String aUri, PermissionType aType, GeckoSession.Permissio break; case ReadExternalStorage: messageId = R.string.permission_read_external_storage; - iconId = R.drawable.ic_icon_dialog_notification; + iconId = R.drawable.ic_icon_storage; break; default: Log.e(LOGTAG, "Unimplemented permission type: " + aType); @@ -188,6 +176,7 @@ private void handlePermissionResult(boolean aGranted) { } // WidgetManagerDelegate.FocusChangeListener + @Override public void onGlobalFocusChanged(View oldFocus, View newFocus) { if (oldFocus == this && isVisible()) { diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/RestartDialogWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/RestartDialogWidget.java index 52e13af24..3462b1686 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/RestartDialogWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/RestartDialogWidget.java @@ -10,12 +10,12 @@ import android.content.Context; import android.content.Intent; import android.util.AttributeSet; +import android.widget.Button; import android.widget.TextView; import org.mozilla.vrbrowser.R; import org.mozilla.vrbrowser.VRBrowserActivity; import org.mozilla.vrbrowser.audio.AudioEngine; -import org.mozilla.vrbrowser.ui.views.UIButton; public class RestartDialogWidget extends UIWidget { @@ -41,8 +41,8 @@ public RestartDialogWidget(Context aContext, AttributeSet aAttrs, int aDefStyle) private void initialize(Context aContext) { inflate(aContext, R.layout.restart_dialog, this); - TextView acceptButton = findViewById(R.id.crashAcceptButton); - UIButton cancelButton = findViewById(R.id.crashCancelButton); + Button acceptButton = findViewById(R.id.restartNowButton); + Button cancelButton = findViewById(R.id.restartLaterButton); TextView restartText = findViewById(R.id.restartText); acceptButton.setOnClickListener(view -> { diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/SettingsWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/SettingsWidget.java index 5a48ed0e7..334167ae5 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/SettingsWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/SettingsWidget.java @@ -15,7 +15,6 @@ import android.view.View; import android.view.ViewGroup; import android.widget.ImageButton; -import android.widget.Switch; import android.widget.TextView; import org.mozilla.geckoview.GeckoSession; @@ -24,7 +23,8 @@ import org.mozilla.vrbrowser.audio.AudioEngine; import org.mozilla.vrbrowser.browser.SessionStore; import org.mozilla.vrbrowser.browser.SettingsStore; -import org.mozilla.vrbrowser.ui.views.SettingsButton; +import org.mozilla.vrbrowser.ui.views.HoneycombButton; +import org.mozilla.vrbrowser.ui.views.HoneycombSwitch; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; @@ -92,7 +92,7 @@ private void initialize(Context aContext) { onDismiss(); }); - SettingsButton privacyButton = findViewById(R.id.privacyButton); + HoneycombButton privacyButton = findViewById(R.id.privacyButton); privacyButton.setOnClickListener(view -> { if (mAudio != null) { mAudio.playSound(AudioEngine.Sound.CLICK); @@ -101,33 +101,23 @@ private void initialize(Context aContext) { onSettingsPrivacyClick(); }); - final TextView crashReportingSwitchText = findViewById(R.id.crash_reporting_switch_text); - Switch crashReportingSwitch = findViewById(R.id.crash_reporting_switch); - crashReportingSwitch.setChecked(SettingsStore.getInstance(getContext()).isCrashReportingEnabled()); - crashReportingSwitchText.setText(crashReportingSwitch.isChecked() ? getContext().getString(R.string.on) : getContext().getString(R.string.off)); - crashReportingSwitch.setOnCheckedChangeListener((compoundButton, b) -> { + HoneycombSwitch crashSwitch = findViewById(R.id.crashReportingSwitch); + crashSwitch.setOnCheckedChangeListener((compoundButton, b) -> { if (mAudio != null) { mAudio.playSound(AudioEngine.Sound.CLICK); } - crashReportingSwitchText.setText(b ? getContext().getString(R.string.on) : getContext().getString(R.string.off)); onSettingsCrashReportingChange(b); }); - crashReportingSwitch.setSoundEffectsEnabled(false); - final TextView crashTelemetrySwitchText = findViewById(R.id.telemetry_switch_text); - Switch telemetrySwitch = findViewById(R.id.telemetry_switch); - telemetrySwitch.setChecked(SettingsStore.getInstance(getContext()).isTelemetryEnabled()); - crashTelemetrySwitchText.setText(telemetrySwitch.isChecked() ? getContext().getString(R.string.on) : getContext().getString(R.string.off)); + HoneycombSwitch telemetrySwitch = findViewById(R.id.telemetry_switch); telemetrySwitch.setOnCheckedChangeListener((compoundButton, b) -> { if (mAudio != null) { mAudio.playSound(AudioEngine.Sound.CLICK); } - crashTelemetrySwitchText.setText(b ? getContext().getString(R.string.on) : getContext().getString(R.string.off)); onSettingsTelemetryChange(b); }); - telemetrySwitch.setSoundEffectsEnabled(false); TextView versionText = findViewById(R.id.versionText); try { @@ -150,7 +140,7 @@ private void initialize(Context aContext) { return view.onTouchEvent(motionEvent); }); - SettingsButton reportButton = findViewById(R.id.reportButton); + HoneycombButton reportButton = findViewById(R.id.reportButton); reportButton.setOnClickListener(view -> { if (mAudio != null) { mAudio.playSound(AudioEngine.Sound.CLICK); @@ -159,7 +149,7 @@ private void initialize(Context aContext) { onSettingsReportClick(); }); - SettingsButton developerOptionsButton = findViewById(R.id.developerOptionsButton); + HoneycombButton developerOptionsButton = findViewById(R.id.developerOptionsButton); developerOptionsButton.setOnClickListener(view -> { if (mAudio != null) { mAudio.playSound(AudioEngine.Sound.CLICK); diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/VoiceSearchWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/VoiceSearchWidget.java index d094968ae..386366426 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/VoiceSearchWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/VoiceSearchWidget.java @@ -20,10 +20,14 @@ import android.view.animation.RotateAnimation; import android.widget.ImageView; import android.widget.TextView; + import com.mozilla.speechlibrary.ISpeechRecognitionListener; import com.mozilla.speechlibrary.MozillaSpeechService; import com.mozilla.speechlibrary.STTResult; + import org.mozilla.vrbrowser.R; +import org.mozilla.vrbrowser.audio.AudioEngine; +import org.mozilla.vrbrowser.ui.views.UIButton; import static org.mozilla.gecko.GeckoAppShell.getApplicationContext; @@ -55,9 +59,9 @@ public interface VoiceSearchDelegate { private TextView mVoiceSearchText2; private TextView mVoiceSearchText3; private RotateAnimation mSearchingAnimation; - private CloseButtonWidget mCloseButton; private boolean mIsSpeechRecognitionRunning = false; private boolean mWasSpeechRecognitionRunning = false; + private AudioEngine mAudio; public VoiceSearchWidget(Context aContext) { super(aContext); @@ -77,6 +81,8 @@ public VoiceSearchWidget(Context aContext, AttributeSet aAttrs, int aDefStyle) { private void initialize(Context aContext) { inflate(aContext, R.layout.voice_search_dialog, this); + mAudio = AudioEngine.fromContext(aContext); + mWidgetManager.addFocusChangeListener(this); mWidgetManager.addPermissionListener(this); @@ -104,12 +110,13 @@ private void initialize(Context aContext) { mSearchingAnimation.setRepeatCount(Animation.INFINITE); mVoiceSearchSearching = findViewById(R.id.voiceSearchSearching); - mCloseButton = createChild(CloseButtonWidget.class); - mCloseButton.setDelegate(new CloseButtonWidget.CloseButtonDelegate() { - @Override - public void OnClick() { - hide(); + UIButton backButton = findViewById(R.id.backButton); + backButton.setOnClickListener(view -> { + if (mAudio != null) { + mAudio.playSound(AudioEngine.Sound.CLICK); } + + onDismiss(); }); ((Application)getApplicationContext()).registerActivityLifecycleCallbacks(this); @@ -253,8 +260,6 @@ public void show() { setStartListeningState(); - mCloseButton.show(); - mMozillaSpeechService.addListener(mVoiceSearchListener); startVoiceSearch(); } diff --git a/app/src/googlevrFlat/AndroidManifest.xml b/app/src/googlevrFlat/AndroidManifest.xml index cb8dd9759..f38b84cdf 100644 --- a/app/src/googlevrFlat/AndroidManifest.xml +++ b/app/src/googlevrFlat/AndroidManifest.xml @@ -34,7 +34,7 @@ android:name=".BrowserActivity" android:launchMode="singleInstance" android:configChanges="orientation|screenSize|keyboard|keyboardHidden|navigation" - android:theme="@style/AppTheme" + android:theme="@style/FxR.Dark" > diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 5a1ff07ee..f4197a400 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -20,7 +20,7 @@ android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" - android:theme="@style/AppTheme"> + android:theme="@style/FxR.Dark"> - - - - - diff --git a/app/src/main/res/drawable/cursor_drawable.xml b/app/src/main/res/drawable/cursor_drawable.xml new file mode 100644 index 000000000..d220c155a --- /dev/null +++ b/app/src/main/res/drawable/cursor_drawable.xml @@ -0,0 +1,6 @@ + + + + !--Could be any color you want + \ No newline at end of file diff --git a/app/src/main/res/drawable/developer_options_background.xml b/app/src/main/res/drawable/developer_options_background.xml deleted file mode 100644 index 737a0f485..000000000 --- a/app/src/main/res/drawable/developer_options_background.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - diff --git a/app/src/main/res/drawable/dialog_background.xml b/app/src/main/res/drawable/dialog_background.xml index 9d1bff868..058cbd85b 100644 --- a/app/src/main/res/drawable/dialog_background.xml +++ b/app/src/main/res/drawable/dialog_background.xml @@ -1,5 +1,6 @@ - - + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/crash_dialog_button_text_color.xml b/app/src/main/res/drawable/dialog_button_text_color.xml similarity index 100% rename from app/src/main/res/drawable/crash_dialog_button_text_color.xml rename to app/src/main/res/drawable/dialog_button_text_color.xml diff --git a/app/src/main/res/drawable/crash_dialog_button_send_background.xml b/app/src/main/res/drawable/dialog_highlighted_button_background.xml similarity index 79% rename from app/src/main/res/drawable/crash_dialog_button_send_background.xml rename to app/src/main/res/drawable/dialog_highlighted_button_background.xml index a526302b0..0496c6c89 100644 --- a/app/src/main/res/drawable/crash_dialog_button_send_background.xml +++ b/app/src/main/res/drawable/dialog_highlighted_button_background.xml @@ -4,7 +4,6 @@ - @@ -16,8 +15,7 @@ - - + \ No newline at end of file diff --git a/app/src/main/res/drawable/crash_dialog_button_background.xml b/app/src/main/res/drawable/dialog_regular_button_background.xml similarity index 79% rename from app/src/main/res/drawable/crash_dialog_button_background.xml rename to app/src/main/res/drawable/dialog_regular_button_background.xml index c858500c3..ebbe02690 100644 --- a/app/src/main/res/drawable/crash_dialog_button_background.xml +++ b/app/src/main/res/drawable/dialog_regular_button_background.xml @@ -4,7 +4,6 @@ - @@ -16,8 +15,7 @@ - - + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_button_checkbox_off.xml b/app/src/main/res/drawable/ic_button_checkbox_off.xml index ec32a4814..a50814976 100644 --- a/app/src/main/res/drawable/ic_button_checkbox_off.xml +++ b/app/src/main/res/drawable/ic_button_checkbox_off.xml @@ -1,9 +1,12 @@ + + - + android:fillColor="@color/fog" + android:pathData="M168.81,168.81 L31.19,168.81 L31.19,31.19 L168.81,31.19 Z M39.81,160.21 +L160.21,160.21 L160.21,39.79 L39.79,39.79 Z" /> + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_button_checkbox_on.xml b/app/src/main/res/drawable/ic_button_checkbox_on.xml index addf9c114..e8a8e0e8d 100644 --- a/app/src/main/res/drawable/ic_button_checkbox_on.xml +++ b/app/src/main/res/drawable/ic_button_checkbox_on.xml @@ -1,12 +1,23 @@ + + + android:fillColor="@color/fog" + android:pathData="M119.42,148.44 L118.86,149 L117,150.87 L116.82,151.05 L116.63,151.22 +A20.92,20.92,0,0,1,86.26,149.14 L48.33,105 A20.14,20.14,0,0,1,42.7,89.79 +A20.53,20.53,0,0,1,50.21,75.21 A20,20,0,0,1,64.05,69.67 +A20.4,20.4,0,0,1,80.05,77.43 L101.29,102 L158.37,31.1 L31.19,31.1 L31.19,168.81 +L168.92,168.81 L168.92,76.47 L119.92,147.79 Z" /> - + android:fillColor="@color/fog" + android:pathData="M191.83,9.85 C188.83,9.85,184.99,11.7,181.5,16.07 L101.5,115.41 L73.41,82.92 +A11.85,11.85,0,0,0,64.05,78.28 A11.44,11.44,0,0,0,55.91,81.67 +A11.63,11.63,0,0,0,54.66,99.16 L54.66,99.16 L92.77,143.52 +A13,13,0,0,0,102.44,148.16 A12.72,12.72,0,0,0,110.89,144.78 +C111.51,144.15,112.14,143.52,112.77,142.9 L194,24.81 +C200.51,16.28,197.49,9.85,191.83,9.85 Z" /> + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_icon_clear.xml b/app/src/main/res/drawable/ic_icon_clear.xml index 678ac1bc0..f5f35d0d7 100644 --- a/app/src/main/res/drawable/ic_icon_clear.xml +++ b/app/src/main/res/drawable/ic_icon_clear.xml @@ -6,7 +6,7 @@ android:viewportHeight="200"> - + + diff --git a/app/src/main/res/drawable/ic_icon_storage.xml b/app/src/main/res/drawable/ic_icon_storage.xml new file mode 100644 index 000000000..03b00c0b5 --- /dev/null +++ b/app/src/main/res/drawable/ic_icon_storage.xml @@ -0,0 +1,24 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_menu_settings_honeycomb_fill.xml b/app/src/main/res/drawable/ic_menu_settings_honeycomb_fill.xml index e2a89baa7..1f12f5904 100644 --- a/app/src/main/res/drawable/ic_menu_settings_honeycomb_fill.xml +++ b/app/src/main/res/drawable/ic_menu_settings_honeycomb_fill.xml @@ -7,7 +7,6 @@ - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/main_button.xml b/app/src/main/res/drawable/main_button.xml index 946e84bd7..d3b1d31d2 100644 --- a/app/src/main/res/drawable/main_button.xml +++ b/app/src/main/res/drawable/main_button.xml @@ -3,13 +3,11 @@ - - @@ -20,7 +18,6 @@ - diff --git a/app/src/main/res/drawable/main_button_private.xml b/app/src/main/res/drawable/main_button_private.xml index 41d1bd4c9..800bf0347 100644 --- a/app/src/main/res/drawable/main_button_private.xml +++ b/app/src/main/res/drawable/main_button_private.xml @@ -3,13 +3,11 @@ - - @@ -20,7 +18,6 @@ - diff --git a/app/src/main/res/drawable/permission_background.xml b/app/src/main/res/drawable/permission_background.xml deleted file mode 100644 index 70a1917b8..000000000 --- a/app/src/main/res/drawable/permission_background.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/rectangle_button_background.xml b/app/src/main/res/drawable/rectangle_button_background.xml index 2558e61cb..f0a1a5abe 100644 --- a/app/src/main/res/drawable/rectangle_button_background.xml +++ b/app/src/main/res/drawable/rectangle_button_background.xml @@ -4,14 +4,12 @@ - - @@ -23,8 +21,7 @@ - - + diff --git a/app/src/main/res/drawable/scrollbar.xml b/app/src/main/res/drawable/scrollbar_thumb.xml similarity index 100% rename from app/src/main/res/drawable/scrollbar.xml rename to app/src/main/res/drawable/scrollbar_thumb.xml diff --git a/app/src/main/res/drawable/settings_background.xml b/app/src/main/res/drawable/settings_background.xml index 0fd6492ab..7eab0cefa 100644 --- a/app/src/main/res/drawable/settings_background.xml +++ b/app/src/main/res/drawable/settings_background.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/app/src/main/res/drawable/url_background.xml b/app/src/main/res/drawable/url_background.xml index f3559cca3..d1b4cb361 100644 --- a/app/src/main/res/drawable/url_background.xml +++ b/app/src/main/res/drawable/url_background.xml @@ -1,36 +1,30 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/url_background_private.xml b/app/src/main/res/drawable/url_background_private.xml index fdef2dd84..30633d196 100644 --- a/app/src/main/res/drawable/url_background_private.xml +++ b/app/src/main/res/drawable/url_background_private.xml @@ -1,35 +1,29 @@ - + - - + - - + + - - + + - + - - + + - + - - + diff --git a/app/src/main/res/drawable/voice_search_background.xml b/app/src/main/res/drawable/voice_search_background.xml deleted file mode 100644 index f3d556a92..000000000 --- a/app/src/main/res/drawable/voice_search_background.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - diff --git a/app/src/main/res/layout/choice_prompt.xml b/app/src/main/res/layout/choice_prompt.xml index fe7c273c5..0aa965e1d 100644 --- a/app/src/main/res/layout/choice_prompt.xml +++ b/app/src/main/res/layout/choice_prompt.xml @@ -9,7 +9,7 @@ android:id="@+id/choiceslist" android:layout_width="0dp" android:layout_height="0dp" - android:scrollbarThumbVertical="@drawable/scrollbar" + android:scrollbarThumbVertical="@drawable/scrollbar_thumb" android:scrollbars="vertical" android:fadeScrollbars="false" android:scrollbarStyle="insideInset" diff --git a/app/src/main/res/layout/crash_dialog.xml b/app/src/main/res/layout/crash_dialog.xml index 541bd30fc..38f1f52c8 100644 --- a/app/src/main/res/layout/crash_dialog.xml +++ b/app/src/main/res/layout/crash_dialog.xml @@ -1,27 +1,35 @@ - + android:paddingStart="@dimen/dialog_padding_sides" + android:paddingTop="@dimen/dialog_padding_top" + android:paddingEnd="@dimen/dialog_padding_sides" + android:paddingBottom="@dimen/dialog_padding_bottom"> @@ -29,66 +37,57 @@ android:id="@+id/crashMessage" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="70dp" + android:layout_below="@+id/headerText" + android:layout_centerHorizontal="true" + android:layout_marginStart="50dp" android:layout_marginTop="15dp" - android:layout_marginEnd="70dp" + android:layout_marginEnd="50dp" android:text="@string/crash_dialog_message" android:textAlignment="center" + android:textSize="@dimen/text_medium_size" tools:text="@string/crash_dialog_message" />