Bug 1358089 - [RTL] Separate xml drawable into v17 folder, r=sebastian,ahunt
MozReview-Commit-ID: LaOwxXwhsHA
--- a/mobile/android/base/java/org/mozilla/gecko/toolbar/BrowserToolbar.java
+++ b/mobile/android/base/java/org/mozilla/gecko/toolbar/BrowserToolbar.java
@@ -362,16 +362,17 @@ public abstract class BrowserToolbar ext
public void setTabHistoryController(TabHistoryController tabHistoryController) {
this.tabHistoryController = tabHistoryController;
}
public void refresh() {
progressBar.setImageDrawable(getResources().getDrawable(R.drawable.progress));
urlDisplayLayout.dismissSiteIdentityPopup();
+ urlEditLayout.refresh();
}
public boolean onBackPressed() {
// If we exit editing mode during the animation,
// we're put into an inconsistent state (bug 1017276).
if (isEditing() && !isAnimating()) {
Telemetry.sendUIEvent(TelemetryContract.Event.CANCEL,
TelemetryContract.Method.BACK);
--- a/mobile/android/base/java/org/mozilla/gecko/toolbar/ToolbarEditLayout.java
+++ b/mobile/android/base/java/org/mozilla/gecko/toolbar/ToolbarEditLayout.java
@@ -198,16 +198,20 @@ public class ToolbarEditLayout extends T
// Checking if qr code is supported after resuming the app
if (qrCodeIsEnabled(getContext())) {
mQrCode.setVisibility(View.VISIBLE);
} else {
mQrCode.setVisibility(View.GONE);
}
}
+ public void refresh() {
+ mEditText.setHint(getResources().getString(R.string.url_bar_default_text));
+ }
+
void setToolbarPrefs(final ToolbarPrefs prefs) {
mEditText.setToolbarPrefs(prefs);
}
private void showSoftInput() {
InputMethodManager imm =
(InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(mEditText, InputMethodManager.SHOW_IMPLICIT);
deleted file mode 100644
--- a/mobile/android/base/resources/drawable-ldrtl-v17/url_bar_translating_edge.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
- - License, v. 2.0. If a copy of the MPL was not distributed with this
- - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<clip xmlns:android="http://schemas.android.com/apk/res/android"
- android:drawable="@drawable/url_bar_entry"
- android:clipOrientation="horizontal"
- android:gravity="left"/>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/drawable-v17/url_bar_translating_edge.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
+<clip xmlns:android="http://schemas.android.com/apk/res/android"
+ android:drawable="@drawable/url_bar_entry"
+ android:clipOrientation="horizontal"
+ android:gravity="end"/>
\ No newline at end of file
--- a/mobile/android/base/resources/drawable/url_bar_translating_edge.xml
+++ b/mobile/android/base/resources/drawable/url_bar_translating_edge.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<clip xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/url_bar_entry"
android:clipOrientation="horizontal"
- android:gravity="right|end"/>
\ No newline at end of file
+ android:gravity="right"/>
\ No newline at end of file