aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml/docilealligator/infinityforreddit
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-03-18 01:19:26 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-03-18 01:19:26 +0000
commit21c47eaa4c3cffe0965447e2d7fb7d1cb964b720 (patch)
tree114883f2a7c3ad4f5c292663b22348310f32ca12 /app/src/main/java/ml/docilealligator/infinityforreddit
parent9b796cf6219f147f39a2c3b37dfecbf811d16750 (diff)
downloadinfinity-for-reddit-21c47eaa4c3cffe0965447e2d7fb7d1cb964b720.tar
infinity-for-reddit-21c47eaa4c3cffe0965447e2d7fb7d1cb964b720.tar.gz
infinity-for-reddit-21c47eaa4c3cffe0965447e2d7fb7d1cb964b720.tar.bz2
infinity-for-reddit-21c47eaa4c3cffe0965447e2d7fb7d1cb964b720.tar.lz
infinity-for-reddit-21c47eaa4c3cffe0965447e2d7fb7d1cb964b720.tar.xz
infinity-for-reddit-21c47eaa4c3cffe0965447e2d7fb7d1cb964b720.tar.zst
infinity-for-reddit-21c47eaa4c3cffe0965447e2d7fb7d1cb964b720.zip
Still implementing custom themes.
Diffstat (limited to 'app/src/main/java/ml/docilealligator/infinityforreddit')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LoginActivity.java9
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchActivity.java5
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java4
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomThemeWrapper.java4
4 files changed, 7 insertions, 15 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LoginActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LoginActivity.java
index 78e67281..8ed1df56 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LoginActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LoginActivity.java
@@ -5,7 +5,6 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.net.Uri;
-import android.os.Build;
import android.os.Bundle;
import android.view.MenuItem;
import android.webkit.CookieManager;
@@ -15,7 +14,6 @@ import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.appcompat.widget.Toolbar;
-import androidx.coordinatorlayout.widget.CoordinatorLayout;
import com.google.android.material.appbar.AppBarLayout;
@@ -46,8 +44,6 @@ import retrofit2.Retrofit;
public class LoginActivity extends BaseActivity {
- @BindView(R.id.coordinator_layout_login_activity)
- CoordinatorLayout coordinatorLayout;
@BindView(R.id.appbar_layout_login_activity)
AppBarLayout appBarLayout;
@BindView(R.id.toolbar_login_activity)
@@ -80,10 +76,6 @@ public class LoginActivity extends BaseActivity {
applyCustomTheme();
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && isChangeStatusBarIconColor()) {
- addOnOffsetChangedListener(appBarLayout);
- }
-
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
@@ -222,7 +214,6 @@ public class LoginActivity extends BaseActivity {
@Override
protected void applyCustomTheme() {
- coordinatorLayout.setBackgroundColor(mCustomThemeWrapper.getBackgroundColor());
applyAppBarLayoutAndToolbarTheme(appBarLayout, toolbar);
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchActivity.java
index 2fab7727..e075d9a5 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchActivity.java
@@ -192,6 +192,11 @@ public class SearchActivity extends BaseActivity {
coordinatorLayout.setBackgroundColor(mCustomThemeWrapper.getBackgroundColor());
applyAppBarLayoutAndToolbarTheme(appBarLayout, toolbar);
simpleSearchView.setSearchBackground(new ColorDrawable(mCustomThemeWrapper.getColorPrimary()));
+ int toolbarPrimaryTextAndIconColorColor = mCustomThemeWrapper.getToolbarPrimaryTextAndIconColor();
+ simpleSearchView.setIconsColor(toolbarPrimaryTextAndIconColorColor);
+ simpleSearchView.setTextColor(toolbarPrimaryTextAndIconColorColor);
+ simpleSearchView.setBackIconColor(toolbarPrimaryTextAndIconColorColor);
+ simpleSearchView.setHintTextColor(mCustomThemeWrapper.getSecondaryTextColor());
searchInTextView.setTextColor(mCustomThemeWrapper.getColorAccent());
subredditNameTextView.setTextColor(mCustomThemeWrapper.getPrimaryTextColor());
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java
index a9c48b31..75564f05 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java
@@ -2169,7 +2169,6 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
super(itemView);
ButterKnife.bind(this, itemView);
itemView.setOnClickListener(view -> mCommentRecyclerViewAdapterCallback.retryFetchingComments());
- itemView.setBackgroundColor(mCommentBackgroundColor);
errorTextView.setTextColor(mSecondaryTextColor);
}
}
@@ -2181,7 +2180,6 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
NoCommentViewHolder(@NonNull View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
- itemView.setBackgroundColor(mCommentBackgroundColor);
errorTextView.setTextColor(mSecondaryTextColor);
}
}
@@ -2193,7 +2191,6 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
IsLoadingMoreCommentsViewHolder(@NonNull View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
- itemView.setBackgroundColor(mCommentBackgroundColor);
progressbar.setIndeterminateTintList(ColorStateList.valueOf(mColorAccent));
}
}
@@ -2209,7 +2206,6 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
ButterKnife.bind(this, itemView);
errorTextView.setText(R.string.load_comments_failed);
retryButton.setOnClickListener(view -> mCommentRecyclerViewAdapterCallback.retryFetchingMoreComments());
- itemView.setBackgroundColor(mCommentBackgroundColor);
errorTextView.setTextColor(mSecondaryTextColor);
retryButton.setBackgroundTintList(ColorStateList.valueOf(mColorPrimaryLightTheme));
retryButton.setTextColor(mButtonTextColor);
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomThemeWrapper.java b/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomThemeWrapper.java
index 2ce1c90e..7c0e5bd5 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomThemeWrapper.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomThemeWrapper.java
@@ -122,12 +122,12 @@ public class CustomThemeWrapper {
public int getPostIconAndInfoColor() {
return themeSharedPreferences.getInt(CustomThemeSharedPreferencesUtils.POST_ICON_AND_INFO_COLOR,
- getDefaultColor("#808080", "#808080", "#808080"));
+ getDefaultColor("#8A000000", "#B3FFFFFF", "#B3FFFFFF"));
}
public int getCommentIconAndInfoColor() {
return themeSharedPreferences.getInt(CustomThemeSharedPreferencesUtils.COMMENT_ICON_AND_INFO_COLOR,
- getDefaultColor("#808080", "#808080", "#808080"));
+ getDefaultColor("#8A000000", "#B3FFFFFF", "#B3FFFFFF"));
}
public int getToolbarPrimaryTextAndIconColor() {