Bug 1358089 - [RTL] Separate xml drawable into v17 folder. r=ahunt, a=lizzard
authormaliu <max@mxli.us>
Mon, 24 Apr 2017 01:16:11 +0800
changeset 379589 a027d0740f0da06f2f50000033dc8b77b91177e1
parent 379588 6850ab42fdb72a533ac4370ec79bf3c0a13a1882
child 379590 f87a819106bd98895e38bd26c134031c534a19ff
push id1452
push userryanvm@gmail.com
push dateThu, 04 May 2017 17:55:05 +0000
treeherdermozilla-release@f87a819106bd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahunt, lizzard
bugs1358089
milestone53.0.2
Bug 1358089 - [RTL] Separate xml drawable into v17 folder. r=ahunt, a=lizzard MozReview-Commit-ID: LaOwxXwhsHA
mobile/android/base/java/org/mozilla/gecko/toolbar/BrowserToolbar.java
mobile/android/base/java/org/mozilla/gecko/toolbar/ToolbarEditLayout.java
mobile/android/base/resources/drawable-ldrtl-v17/url_bar_translating_edge.xml
mobile/android/base/resources/drawable-v17/url_bar_translating_edge.xml
mobile/android/base/resources/drawable/url_bar_translating_edge.xml
--- a/mobile/android/base/java/org/mozilla/gecko/toolbar/BrowserToolbar.java
+++ b/mobile/android/base/java/org/mozilla/gecko/toolbar/BrowserToolbar.java
@@ -356,16 +356,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