diff --git a/app/src/main/java/org/schabi/newpipe/ReCaptchaActivity.java b/app/src/main/java/org/schabi/newpipe/ReCaptchaActivity.java
index 7bd632f39..f2970345f 100644
--- a/app/src/main/java/org/schabi/newpipe/ReCaptchaActivity.java
+++ b/app/src/main/java/org/schabi/newpipe/ReCaptchaActivity.java
@@ -17,6 +17,8 @@ import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
+import org.schabi.newpipe.util.ThemeHelper;
+
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
@@ -49,6 +51,7 @@ public class ReCaptchaActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
+ ThemeHelper.setTheme(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_recaptcha);
Toolbar toolbar = findViewById(R.id.toolbar);
@@ -92,17 +95,16 @@ public class ReCaptchaActivity extends AppCompatActivity {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
- boolean ret = super.onCreateOptionsMenu(menu);
+ getMenuInflater().inflate(R.menu.menu_recaptcha, menu);
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
- actionBar.setDisplayHomeAsUpEnabled(true);
- actionBar.setHomeAsUpIndicator(getResources().getDrawable(R.drawable.ic_done_white_24dp));
+ actionBar.setDisplayHomeAsUpEnabled(false);
actionBar.setTitle(R.string.title_activity_recaptcha);
actionBar.setSubtitle(R.string.subtitle_activity_recaptcha);
}
- return ret;
+ return true;
}
@Override
@@ -114,7 +116,7 @@ public class ReCaptchaActivity extends AppCompatActivity {
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
switch (id) {
- case android.R.id.home:
+ case R.id.menu_item_done:
saveCookiesAndFinish();
return true;
default:
diff --git a/app/src/main/res/drawable/ic_done_black_24dp.xml b/app/src/main/res/drawable/ic_done_black_24dp.xml
new file mode 100644
index 000000000..7affe9ba9
--- /dev/null
+++ b/app/src/main/res/drawable/ic_done_black_24dp.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/layout/activity_recaptcha.xml b/app/src/main/res/layout/activity_recaptcha.xml
index 8e277d0c5..759e1f296 100644
--- a/app/src/main/res/layout/activity_recaptcha.xml
+++ b/app/src/main/res/layout/activity_recaptcha.xml
@@ -14,8 +14,7 @@
android:minHeight="?attr/actionBarSize"
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.ActionBar"
- app:titleTextAppearance="@style/Toolbar.Title"
- app:contentInsetStartWithNavigation="0dp" />
+ app:titleTextAppearance="@style/Toolbar.Title"/>
+
\ No newline at end of file
diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml
index c64ed1256..88925a598 100644
--- a/app/src/main/res/values/attrs.xml
+++ b/app/src/main/res/values/attrs.xml
@@ -45,6 +45,7 @@
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 56ecc3356..b16713172 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -331,6 +331,7 @@
reCAPTCHA challenge
Press \"Done\" when solved
reCAPTCHA challenge requested
+ Done
Download
Allowed characters in filenames
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 679d4d1cd..8047ef7f4 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -60,6 +60,7 @@
- @drawable/ic_grid_black_24dp
- @drawable/ic_delete_black_24dp
- @drawable/ic_settings_update_black
+ - @drawable/ic_done_black_24dp
- @color/light_separator_color
- @color/light_contrast_background_color
@@ -129,6 +130,7 @@
- @drawable/ic_delete_white_24dp
- @drawable/ic_pause_white_24dp
- @drawable/ic_settings_update_white
+ - @drawable/ic_done_white_24dp
- @color/dark_separator_color
- @color/dark_contrast_background_color