diff options
2 files changed, 31 insertions, 0 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/CommentFullMarkdownActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/CommentFullMarkdownActivity.java index 0cf15283..9d8f1f6f 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/CommentFullMarkdownActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/CommentFullMarkdownActivity.java @@ -12,6 +12,7 @@ import android.text.TextPaint; import android.text.style.ClickableSpan; import android.text.style.SuperscriptSpan; import android.text.util.Linkify; +import android.view.MenuItem; import android.view.View; import android.view.Window; import android.view.WindowManager; @@ -87,6 +88,11 @@ public class CommentFullMarkdownActivity extends BaseActivity { applyCustomTheme(); + setSupportActionBar(toolbar); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + + setTitle(" "); + if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK, true)) { mSlidrInterface = Slidr.attach(this); } @@ -233,6 +239,16 @@ public class CommentFullMarkdownActivity extends BaseActivity { } @Override + public boolean onOptionsItemSelected(@NonNull MenuItem item) { + if (item.getItemId() == android.R.id.home) { + finish(); + return true; + } + + return false; + } + + @Override protected SharedPreferences getDefaultSharedPreferences() { return mSharedPreferences; } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/GiveAwardActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/GiveAwardActivity.java index 803743aa..9b8fec82 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/GiveAwardActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/GiveAwardActivity.java @@ -8,10 +8,12 @@ import android.content.SharedPreferences; import android.os.Build; import android.os.Bundle; import android.view.LayoutInflater; +import android.view.MenuItem; import android.view.View; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.NonNull; import androidx.appcompat.widget.Toolbar; import androidx.coordinatorlayout.widget.CoordinatorLayout; import androidx.recyclerview.widget.LinearLayoutManager; @@ -85,6 +87,9 @@ public class GiveAwardActivity extends BaseActivity { applyCustomTheme(); + setSupportActionBar(toolbar); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK, true)) { Slidr.attach(this); } @@ -178,6 +183,16 @@ public class GiveAwardActivity extends BaseActivity { } @Override + public boolean onOptionsItemSelected(@NonNull MenuItem item) { + if (item.getItemId() == android.R.id.home) { + finish(); + return true; + } + + return false; + } + + @Override protected SharedPreferences getDefaultSharedPreferences() { return mSharedPreferences; } |