aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to '')
-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
-rw-r--r--app/src/main/res/layout/activity_login.xml20
5 files changed, 12 insertions, 30 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() {
diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml
index a23e580c..dbf51b4c 100644
--- a/app/src/main/res/layout/activity_login.xml
+++ b/app/src/main/res/layout/activity_login.xml
@@ -4,7 +4,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:id="@+id/coordinator_layout_login_activity"
android:background="?attr/backgroundColor"
tools:application="ml.docilealligator.infinityforreddit.Activity.LoginActivity">
@@ -15,21 +14,12 @@
android:background="?attr/toolbarAndTabBackgroundColor"
android:theme="@style/AppTheme.AppBarOverlay">
- <com.google.android.material.appbar.CollapsingToolbarLayout
+ <androidx.appcompat.widget.Toolbar
+ android:id="@+id/toolbar_login_activity"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- app:layout_scrollFlags="scroll|enterAlways"
- app:titleEnabled="false"
- app:toolbarId="@+id/toolbar_login_activity">
-
- <androidx.appcompat.widget.Toolbar
- android:id="@+id/toolbar_login_activity"
- android:layout_width="match_parent"
- android:layout_height="?attr/actionBarSize"
- app:popupTheme="@style/AppTheme.PopupOverlay"
- app:navigationIcon="?attr/homeAsUpIndicator" />
-
- </com.google.android.material.appbar.CollapsingToolbarLayout>
+ android:layout_height="?attr/actionBarSize"
+ app:popupTheme="@style/AppTheme.PopupOverlay"
+ app:navigationIcon="?attr/homeAsUpIndicator" />
</com.google.android.material.appbar.AppBarLayout>