]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/commitdiff
Autopopulate the text in the create bookmark and create shortcut dialog boxes. Imple...
authorSoren Stoutner <soren@stoutner.com>
Fri, 17 Mar 2017 21:56:57 +0000 (14:56 -0700)
committerSoren Stoutner <soren@stoutner.com>
Fri, 17 Mar 2017 21:56:57 +0000 (14:56 -0700)
17 files changed:
app/build.gradle
app/src/main/assets/de/about_changelog.html
app/src/main/assets/en/about_changelog.html
app/src/main/assets/es/about_changelog.html
app/src/main/assets/it/about_changelog.html
app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/CreateBookmarkDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/CreateBookmarkFolderDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/CreateHomeScreenShortcutDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/DownloadFileDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/DownloadImageDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/EditBookmarkDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/EditBookmarkFolderDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/MoveToFolderDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/UrlHistoryDialog.java
app/src/main/res/layout/create_bookmark_dialog.xml
app/src/main/res/layout/create_home_screen_shortcut_dialog.xml

index 3c69ba7e0f6edc9fdecaafc6ac0dffa51c2a7331..c4bb2f317d1df69c70012a0fbc0947370122b07e 100644 (file)
@@ -62,5 +62,5 @@ dependencies {
 }
 
 // Google's documentation says the following line is required for `firebase-ads` but things work correctly without it.  I have no interest in applying the Google Mobile Services plugin in the standard flavor if I don't have to.
-// I suspect that in the free flavor `firebase-ads` applies it even when not specified.  https://firebase.google.com/docs/admob/android/quick-start
+// I suspect that in the free flavor `firebase-ads` applies it even when not specified.  <https://firebase.google.com/docs/admob/android/quick-start>.
 // apply plugin: 'com.google.gms.google-services'
\ No newline at end of file
index ed88010ad35b83a4fc642e0603a23b901f5749ab..73e378804c61d7c71f92f72c0cbc0a063ba797c4 100644 (file)
@@ -32,7 +32,7 @@
 \r
     <body>\r
         <h3>2.0 (version code 19)</h3>\r
-        <p>16 March 2017 - minimum API 19, target API 25\r
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=8f1c15606ef8cd277f51cc837c2c39667c48d0d4">16. M&auml;rz 2017</a> - Mindest-API, Ziel-API 24</p>\r
         <ul>\r
             <li>Implement <a href="https://redmine.stoutner.com/issues/7">custom domain settings</a>.</li>\r
             <li>When proxying through Tor, <a href="https://redmine.stoutner.com/issues/90">wait until Orbot is ready</a> before attempting to load a page.</li>\r
@@ -42,7 +42,7 @@
         </ul>\r
 \r
         <h3>1.15 (version code 18)</h3>\r
-        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=8f4d6373a35a43a36050ed383f58c4074143b264">11 February 2017</a> - minimum API 19, target API 25</p>\r
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=8f4d6373a35a43a36050ed383f58c4074143b264">11. Februar 2017</a> - Mindest-API 19, Ziel-API 24</p>\r
         <ul>\r
             <li>Delete the <a href="https://redmine.stoutner.com/issues/84">secret, undocumented WebView cache</a> on Clear and Exit.</li>\r
             <li><a href="https://redmine.stoutner.com/issues/83">Automatically start Orbot</a> when proxying through Orbot is enabled.</li>\r
         </ul>\r
 \r
         <h3>1.14.1 (version code 17)</h3>\r
-        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=5bd318993ebf675433f514dd04fc3e29545c9312">4 January 2017</a> - minimum API 19, target API 25</p>\r
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=5bd318993ebf675433f514dd04fc3e29545c9312">4. Januar 2017</a> - Mindest-API 19, Ziel-API 24</p>\r
         <ul>\r
             <li>Fix a bug that caused Privacy Browser to <a href="https://redmine.stoutner.com/issues/80">crash on some websites</a> when ad blocking was enabled.</li>\r
         </ul>\r
 \r
         <h3>1.14 (version code 16)</h3>\r
-        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=6d3d23ab62cfdd6ef142dbdb764a6bac8fc38ce1">26 December 2016</a> - minimum API 19, target API 25</p>\r
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=6d3d23ab62cfdd6ef142dbdb764a6bac8fc38ce1">26. Dezember 2016</a> - Mindest-API 19, Ziel-API 24</p>\r
         <ul>\r
             <li>Implement <a href="https://redmine.stoutner.com/issues/31">ad blocking</a>.</li>\r
             <li>Change the default user agent to PrivacyBrowser/1.0 <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=7f0fda47dbd040262a8149e1e6d27f7abe9043ea">for real this time</a>.</li>\r
@@ -72,7 +72,7 @@
         </ul>\r
 \r
         <h3>1.13 (version code 15)</h3>\r
-        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=5a9cabddff240061fe521f01df3025b037e9da9e">28 November 2016</a> - minimum API 19, target API 24</p>\r
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=5a9cabddff240061fe521f01df3025b037e9da9e">28. November 2016</a> - Mindest-API 19, Ziel-API 24</p>\r
         <ul>\r
             <li>Double-tap for <a href="https://redmine.stoutner.com/issues/46">full screen browsing mode</a>.</li>\r
             <li>Change the default user agent to <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=b0ddee839c666ba339e374749588f910070658ee">PrivacyBrowser/1.0</a>.</li>\r
index 1ff1e4dcf7afb1d86fab2e5f7a4f0e9f058a1691..094daf9cdae5be7b32a829543afc33a96d16fa71 100644 (file)
@@ -27,7 +27,7 @@
 
     <body>
         <h3>2.0 (version code 19)</h3>
-        <p>16 March 2017 - minimum API 19, target API 25
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=8f1c15606ef8cd277f51cc837c2c39667c48d0d4">16 March 2017</a> - minimum API 19, target API 25</p>
         <ul>
             <li>Implement <a href="https://redmine.stoutner.com/issues/7">custom domain settings</a>.</li>
             <li>When proxying through Tor, <a href="https://redmine.stoutner.com/issues/90">wait until Orbot is ready</a> before attempting to load a page.</li>
index 0053ca9a5314984c93210d63c2282ed30b60c799..cc3e5396df401ead753bfbd064f4fd00e5163c3d 100644 (file)
@@ -29,7 +29,7 @@
 
     <body>
         <h3>2.0 (c&oacute;digo de versi&oacute;n 19)</h3>
-        <p>16 de marzo de 2017 - API m&iacute;nimo 19, API dirigido 25
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=8f1c15606ef8cd277f51cc837c2c39667c48d0d4">16 de marzo de 2017</a> - API m&iacute;nimo 19, API dirigido 25</p>
         <ul>
             <li>Implementar <a href="https://redmine.stoutner.com/issues/7">configuraci&oacute;n de dominio personalizado</a>.</li>
             <li>Cuando se usa proxy a trav&eacute;s de Tor, <a href="https://redmine.stoutner.com/issues/90">esperar hasta que Orbot est&eacute; listo</a> antes de intentar cargar una p&aacute;gina.</li>
index 89588d0af37ee84727fdc868d801883d5c092a52..648faa9556e1a4fc3c3e986e0f169fea7594a105 100644 (file)
@@ -29,7 +29,7 @@
 
     <body>
         <h3>2.0 (versione codice 19)</h3>
-        <p>16 Marzo 2017 - minima API 19, target API 25
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=8f1c15606ef8cd277f51cc837c2c39667c48d0d4">16 Marzo 2017</a> - minima API 19, target API 25</p>
         <ul>
             <li>Implementazione delle <a href="https://redmine.stoutner.com/issues/7">impostazioni personalizzate per i domini</a>.</li>
             <li>Nel caso di collegamento tramite Tor, <a href="https://redmine.stoutner.com/issues/90">attende che Orbot sia pronto</a> prima di tentare il caricamento di una pagina web.</li>
index 23e000a6b438c99a534c99f77c76f609db2afd34..a5713ae104f3b649e8a377aef913c325d810a38f 100644 (file)
@@ -135,6 +135,9 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation
     // `orbotStatus` is public static so it can be accessed from `OrbotProxyHelper`.  It is also used in `onCreate()`.
     public static String orbotStatus;
 
+    // `webViewTitle` is public static so it can be accessed from `CreateHomeScreenShorcutDialog`.  It is also used in `onCreate()`.
+    public static String webViewTitle;
+
 
     // `navigatingHistory` is used in `onCreate()` and `onNavigationItemSelected()`.
     private boolean navigatingHistory;
@@ -679,7 +682,7 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation
             // Set the favorite icon when it changes.
             @Override
             public void onReceivedIcon(WebView view, Bitmap icon) {
-                // Save a copy of the favorite icon for use if a shortcut is added to the home screen.
+                // Save a copy of the favorite icon.
                 favoriteIcon = icon;
 
                 // Place the favorite icon in the appBar.
@@ -687,6 +690,13 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation
                 imageViewFavoriteIcon.setImageBitmap(Bitmap.createScaledBitmap(icon, 64, 64, true));
             }
 
+            // Save a copy of the title when it changes.
+            @Override
+            public void onReceivedTitle(WebView view, String title) {
+                // Save a copy of the title.
+                webViewTitle = title;
+            }
+
             // Enter full screen video
             @Override
             public void onShowCustomView(View view, CustomViewCallback callback) {
index 80f16bda9b8396bcda7c94fdade27fd16ac702c1..49d27e45187fc55876b3f016e584253a2cfdc5ba 100644 (file)
@@ -104,9 +104,13 @@ public class CreateBookmarkDialog extends AppCompatDialogFragment {
         // We need to show the `AlertDialog` before we can call `setOnKeyListener()` below.
         alertDialog.show();
 
-        // Allow the `enter` key on the keyboard to create the bookmark from `create_bookmark_name_edittext`.
+        // Get a handle for `create_bookmark_name_edittext`.
         EditText createBookmarkNameEditText = (EditText) alertDialog.findViewById(R.id.create_bookmark_name_edittext);
-        assert createBookmarkNameEditText != null;  // Remove the warning below that `createBookmarkNameEditText` might be `null`.
+
+        // Set the current `WebView` title as the text for `create_bookmark_name_edittext`.
+        createBookmarkNameEditText.setText(MainWebViewActivity.webViewTitle);
+
+        // Allow the `enter` key on the keyboard to create the bookmark from `create_bookmark_name_edittext`.
         createBookmarkNameEditText.setOnKeyListener(new View.OnKeyListener() {
             public boolean onKey(View view, int keyCode, KeyEvent event) {
                 // If the event is a key-down on the `enter` key, select the `PositiveButton` `Create`.
@@ -125,7 +129,6 @@ public class CreateBookmarkDialog extends AppCompatDialogFragment {
 
         // Set the formattedUrlString as the initial text of `create_bookmark_url_edittext`.
         EditText createBookmarkUrlEditText = (EditText) alertDialog.findViewById(R.id.create_bookmark_url_edittext);
-        assert createBookmarkUrlEditText != null;// Remove the warning below that `createBookmarkUrlEditText` might be `null`.
         createBookmarkUrlEditText.setText(MainWebViewActivity.formattedUrlString);
 
         // Allow the `enter` key on the keyboard to create the bookmark from `create_bookmark_url_edittext`.
index 2b6986c1a695b46c7a24a3cf9ed0a2eb8cb0dcb0..8da90c3878bf456cb1ae015d6efd4869a8c560fa 100644 (file)
@@ -100,7 +100,6 @@ public class CreateBookmarkFolderDialog extends AppCompatDialogFragment {
 
         // Allow the `enter` key on the keyboard to create the folder from `create_folder_name_edittext`.
         EditText createFolderNameEditText = (EditText) alertDialog.findViewById(R.id.create_folder_name_edittext);
-        assert createFolderNameEditText != null;  // Remove the warning below that `createFolderNameEditText` might be `null`.
         createFolderNameEditText.setOnKeyListener(new View.OnKeyListener() {
             public boolean onKey(View v, int keyCode, KeyEvent event) {
                 // If the event is a key-down on the `enter` key, select the `PositiveButton` `Create`.
@@ -119,7 +118,6 @@ public class CreateBookmarkFolderDialog extends AppCompatDialogFragment {
 
         // Display the current favorite icon.
         ImageView webPageIconImageView = (ImageView) alertDialog.findViewById(R.id.create_folder_web_page_icon);
-        assert webPageIconImageView != null;  // Remove the warning that `webPageIconImageView` may be null.
         webPageIconImageView.setImageBitmap(MainWebViewActivity.favoriteIcon);
 
         // `onCreateDialog()` requires the return of an `AlertDialog`.
index e5722bf8fce479031c25c91f2e54000e3ef0c12a..d335aa905d858dd4e931a7eb0004237aa435a53f 100644 (file)
@@ -105,9 +105,13 @@ public class CreateHomeScreenShortcutDialog extends AppCompatDialogFragment {
         // We need to show `alertDialog` before we can call `setOnKeyListener()` below.
         alertDialog.show();
 
-        // Allow the "enter" key on the keyboard to create the shortcut.
+        // Get a handle for `shortcut_name_edittext`.
         EditText shortcutNameEditText = (EditText) alertDialog.findViewById(R.id.shortcut_name_edittext);
-        assert shortcutNameEditText != null;  // Remove the warning below that shortcutNameEditText might be null.
+
+        // Set the current `WebView` title as the text for `shortcutNameEditText`.
+        shortcutNameEditText.setText(MainWebViewActivity.webViewTitle);
+
+        // Allow the "enter" key on the keyboard to create the shortcut.
         shortcutNameEditText.setOnKeyListener(new View.OnKeyListener() {
             public boolean onKey(View v, int keyCode, KeyEvent event) {
                 // If the event is a key-down on the "enter" button, select the PositiveButton "Create".
index 9218c38e25e10e080d405efa23d704c82ef3c5f5..aa788678b000f8dedcb09249c38cdab537ce86d9 100644 (file)
@@ -162,12 +162,10 @@ public class DownloadFileDialog extends AppCompatDialogFragment {
 
         // Set the text for `downloadFileSizeTextView`.
         TextView downloadFileSizeTextView = (TextView) alertDialog.findViewById(R.id.download_file_size);
-        assert downloadFileSizeTextView != null;  // Remove the warning on the following line that `downloadFileSizeTextView` might be `null`.
         downloadFileSizeTextView.setText(fileSize);
 
         // Set the text for `downloadFileNameTextView`.
         EditText downloadFileNameTextView = (EditText) alertDialog.findViewById(R.id.download_file_name);
-        assert downloadFileNameTextView != null;  // Remove the warning on the following line that `downloadFileNameTextView` might be `null`.
         downloadFileNameTextView.setText(downloadFileName);
 
         // Allow the `enter` key on the keyboard to save the file from `downloadFileNameTextView`.
index 6251e5e2732fca01bf69509d9f235aa760ba2395..eb45dd1bc8e3313e373df3c19a805b896fc6bcf4 100644 (file)
@@ -137,7 +137,6 @@ public class DownloadImageDialog extends AppCompatDialogFragment {
 
         // Set the text for `downloadImageNameTextView`.
         EditText downloadImageNameTextView = (EditText) alertDialog.findViewById(R.id.download_image_name);
-        assert downloadImageNameTextView != null;  // Remove the warning on the following line that `downloadImageNameTextView` might be `null`.
         downloadImageNameTextView.setText(imageFileName);
 
         // Allow the `enter` key on the keyboard to save the file from `downloadImageNameTextView`.
index a2db731be916baa5d6bcce5f749e8ac632cef57d..974346ded97a5a05ebf51cbce4c6f6989a24f11c 100644 (file)
@@ -117,17 +117,14 @@ public class EditBookmarkDialog extends AppCompatDialogFragment {
         Bitmap currentIconBitmap = BitmapFactory.decodeByteArray(currentIconByteArray, 0, currentIconByteArray.length);
         // Display `currentIconBitmap` in `edit_bookmark_current_icon`.
         ImageView currentIconImageView = (ImageView) alertDialog.findViewById(R.id.edit_bookmark_current_icon);
-        assert currentIconImageView != null;  // Remove the warning below that `currentIconImageView` might be null;
         currentIconImageView.setImageBitmap(currentIconBitmap);
 
         // Get a `Bitmap` of the favorite icon from `MainWebViewActivity` and display it in `edit_bookmark_web_page_favorite_icon`.
         ImageView newFavoriteIconImageView = (ImageView) alertDialog.findViewById(R.id.edit_bookmark_web_page_favorite_icon);
-        assert newFavoriteIconImageView != null;  // Remove the warning below that `newFavoriteIcon` might be null.
         newFavoriteIconImageView.setImageBitmap(MainWebViewActivity.favoriteIcon);
 
         // Load the text for `edit_bookmark_name_edittext`.
         EditText bookmarkNameEditText = (EditText) alertDialog.findViewById(R.id.edit_bookmark_name_edittext);
-        assert bookmarkNameEditText != null;  // Remove the warning below that `bookmarkNameEditText` might be null.
         bookmarkNameEditText.setText(bookmarkCursor.getString(bookmarkCursor.getColumnIndex(BookmarksDatabaseHelper.BOOKMARK_NAME)));
 
         // Allow the `enter` key on the keyboard to save the bookmark from `edit_bookmark_name_edittext`.
@@ -150,7 +147,6 @@ public class EditBookmarkDialog extends AppCompatDialogFragment {
 
         // Load the text for `edit_bookmark_url_edittext`.
         EditText bookmarkUrlEditText = (EditText) alertDialog.findViewById(R.id.edit_bookmark_url_edittext);
-        assert bookmarkUrlEditText != null;// Remove the warning below that `bookmarkUrlEditText` might be null.
         bookmarkUrlEditText.setText(bookmarkCursor.getString(bookmarkCursor.getColumnIndex(BookmarksDatabaseHelper.BOOKMARK_URL)));
 
         // Allow the "enter" key on the keyboard to save the bookmark from `edit_bookmark_url_edittext`.
index a2a71152feb9449a7b6554b501c9f651a2f64934..c3df33c036de554f9ac747325a6243265a532315 100644 (file)
@@ -117,17 +117,14 @@ public class EditBookmarkFolderDialog extends AppCompatDialogFragment {
         Bitmap currentIconBitmap = BitmapFactory.decodeByteArray(currentIconByteArray, 0, currentIconByteArray.length);
         // Display `currentIconBitmap` in `edit_folder_current_icon`.
         ImageView currentIconImageView = (ImageView) alertDialog.findViewById(R.id.edit_folder_current_icon);
-        assert currentIconImageView != null;  // Remove the warning below that `currentIconImageView` might be null.
         currentIconImageView.setImageBitmap(currentIconBitmap);
 
         // Get a `Bitmap` of the favorite icon from `MainWebViewActivity` and display it in `edit_folder_web_page_favorite_icon`.
         ImageView webPageFavoriteIconImageView = (ImageView) alertDialog.findViewById(R.id.edit_folder_web_page_favorite_icon);
-        assert webPageFavoriteIconImageView != null;  // Remove the warning below that `webPageFavoriteIcon` might be null.
         webPageFavoriteIconImageView.setImageBitmap(MainWebViewActivity.favoriteIcon);
 
         // Load the text for `edit_folder_name_edittext`.
         EditText folderNameEditText = (EditText) alertDialog.findViewById(R.id.edit_folder_name_edittext);
-        assert folderNameEditText != null;  // Remove the warning below that `bookmarkNameEditText` might be null.
         folderNameEditText.setText(bookmarkCursor.getString(bookmarkCursor.getColumnIndex(BookmarksDatabaseHelper.BOOKMARK_NAME)));
 
         // Allow the `enter` key on the keyboard to save the bookmark from `edit_bookmark_name_edittext`.
index bf86344498977e6c98d59d53f59d3f941eadbf63..a8012a4ecb8658042bc8367c7ed1f1326f17b8eb 100644 (file)
@@ -159,7 +159,6 @@ public class MoveToFolderDialog extends AppCompatDialogFragment {
                     Bitmap folderIconBitmap = BitmapFactory.decodeByteArray(folderIconByteArray, 0, folderIconByteArray.length);
                     // Display `folderIconBitmap` in `move_to_folder_icon`.
                     ImageView folderIconImageView = (ImageView) view.findViewById(R.id.move_to_folder_icon);
-                    assert folderIconImageView != null;  // Remove the warning below that `currentIconImageView` might be null;
                     folderIconImageView.setImageBitmap(folderIconBitmap);
 
                     // Get the folder name from `cursor` and display it in `move_to_folder_name_textview`.
@@ -227,7 +226,6 @@ public class MoveToFolderDialog extends AppCompatDialogFragment {
                     Bitmap folderIconBitmap = BitmapFactory.decodeByteArray(folderIconByteArray, 0, folderIconByteArray.length);
                     // Display `folderIconBitmap` in `move_to_folder_icon`.
                     ImageView folderIconImageView = (ImageView) view.findViewById(R.id.move_to_folder_icon);
-                    assert folderIconImageView != null;  // Remove the warning below that `currentIconImageView` might be null;
                     folderIconImageView.setImageBitmap(folderIconBitmap);
 
                     // Get the folder name from `cursor` and display it in `move_to_folder_name_textview`.
@@ -240,7 +238,6 @@ public class MoveToFolderDialog extends AppCompatDialogFragment {
 
         // Display the ListView
         ListView foldersListView = (ListView) alertDialog.findViewById(R.id.move_to_folder_listview);
-        assert foldersListView != null;  // Remove the warning below that `foldersListView` might be null.
         foldersListView.setAdapter(foldersCursorAdapter);
 
         // `onCreateDialog` requires the return of an `AlertDialog`.
index 4811ea2dae1853bee544ae24b55b56dc8b30b896..708101f1d832710284511fa2c78f269fe686c9a6 100644 (file)
@@ -220,9 +220,6 @@ public class UrlHistoryDialog extends AppCompatDialogFragment{
         // Get a handle for `listView`.
         ListView listView = (ListView) alertDialog.findViewById(R.id.history_listview);
 
-        // Remove the warning below that `listView` might be `null`.
-        assert listView != null;
-
         // Set the adapter on `listView`.
         listView.setAdapter(historyArrayAdapter);
 
@@ -233,15 +230,9 @@ public class UrlHistoryDialog extends AppCompatDialogFragment{
                 // Convert the `long` `id` to an `int`.
                 int itemId = (int) id;
 
-                // Only enable the click if it is not on the `currentPageId`.
+                // Only consume the click if it is not on the `currentPageId`.
                 if (itemId != currentPageId) {
-                    // Get the history entry for this `itemId`.
-                    History historyEntry = historyArrayAdapter.getItem(itemId);
-
-                    // Remove the lint warning below that `historyEntry` might be `null`.
-                    assert historyEntry != null;
-
-                    // Send the history entry URL to be loaded in `mainWebView`.
+                    // Go forward or back to `itemId`.
                     urlHistoryListener.onUrlHistoryEntrySelected(currentPageId - itemId);
 
                     // Dismiss the `Dialog`.
index 51ec0f1986f0e7f5f55953335fb3bfbb2a6211d4..5233407615109f79f19ecbc729f03a67f1791a90 100644 (file)
@@ -40,7 +40,8 @@
             android:layout_width="match_parent"
             android:hint="@string/bookmark_name"
             android:imeOptions="actionGo"
-            android:inputType="textUri" />
+            android:inputType="textUri"
+            android:selectAllOnFocus="true" />
         </android.support.design.widget.TextInputLayout>
 
     <!-- `android.support.design.widget.TextInputLayout` makes the `android:hint` float above the `EditText`. -->
index c3e9e8c94cc977b7f80e2b962f18c8c606caa01e..1e5b6cfc024c22851c082305cdde49ce7b1b41e0 100644 (file)
             `android:inputType="textUri"` disables spell check in the `EditText`. -->
         <android.support.design.widget.TextInputEditText
             android:id="@+id/shortcut_name_edittext"
-            android:layout_height="wrap_content"
             android:layout_width="match_parent"
+            android:layout_height="wrap_content"
             android:hint="@string/shortcut_name"
             android:imeOptions="actionGo"
-            android:inputType="textUri" />
+            android:inputType="textUri"
+            android:selectAllOnFocus="true" />
     </android.support.design.widget.TextInputLayout>
 </LinearLayout>
\ No newline at end of file