aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/CommentMultiLevelRecyclerViewAdapter.java4
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java6
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedSubredditRecyclerViewAdapter.java2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedUserRecyclerViewAdapter.java7
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/ViewPostDetailActivity.java10
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java4
-rw-r--r--app/src/main/res/layout/activity_main.xml7
-rw-r--r--app/src/main/res/layout/activity_view_post_detail.xml14
-rw-r--r--app/src/main/res/layout/activity_view_subreddit_detail.xml8
-rw-r--r--app/src/main/res/layout/activity_view_user_detail.xml6
-rw-r--r--app/src/main/res/layout/fragment_post.xml1
-rw-r--r--app/src/main/res/layout/item_comment.xml231
-rw-r--r--app/src/main/res/layout/item_post.xml9
-rw-r--r--app/src/main/res/layout/item_subreddit_listing.xml5
-rw-r--r--app/src/main/res/layout/item_subscribed_thing.xml (renamed from app/src/main/res/layout/item_subscribed_subreddit.xml)2
-rw-r--r--app/src/main/res/layout/item_user_listing.xml5
-rw-r--r--app/src/main/res/values-night/colors.xml26
-rw-r--r--app/src/main/res/values-v28/styles.xml2
-rw-r--r--app/src/main/res/values/colors.xml14
-rw-r--r--app/src/main/res/values/styles.xml4
20 files changed, 208 insertions, 159 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentMultiLevelRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentMultiLevelRecyclerViewAdapter.java
index a8928495..e9f29f3c 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentMultiLevelRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentMultiLevelRecyclerViewAdapter.java
@@ -156,7 +156,7 @@ class CommentMultiLevelRecyclerViewAdapter extends MultiLevelAdapter {
commentItem.setVoteType(1);
newVoteType = RedditUtils.DIR_UPVOTE;
((CommentViewHolder) holder).upvoteButton
- .setColorFilter(ContextCompat.getColor(mContext, R.color.colorPrimary), android.graphics.PorterDuff.Mode.SRC_IN);
+ .setColorFilter(ContextCompat.getColor(mContext, R.color.backgroundColorPrimaryDark), android.graphics.PorterDuff.Mode.SRC_IN);
} else {
//Upvoted before
commentItem.setVoteType(0);
@@ -172,7 +172,7 @@ class CommentMultiLevelRecyclerViewAdapter extends MultiLevelAdapter {
if(newVoteType.equals(RedditUtils.DIR_UPVOTE)) {
commentItem.setVoteType(1);
((CommentViewHolder) holder).upvoteButton
- .setColorFilter(ContextCompat.getColor(mContext, R.color.colorPrimary), android.graphics.PorterDuff.Mode.SRC_IN);
+ .setColorFilter(ContextCompat.getColor(mContext, R.color.backgroundColorPrimaryDark), android.graphics.PorterDuff.Mode.SRC_IN);
} else {
commentItem.setVoteType(0);
((CommentViewHolder) holder).upvoteButton.clearColorFilter();
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java
index 0bc59909..717df7de 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java
@@ -270,7 +270,7 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo
switch (voteType) {
case 1:
//Upvote
- ((DataViewHolder) holder).upvoteButton.setColorFilter(ContextCompat.getColor(mContext, R.color.colorPrimary), android.graphics.PorterDuff.Mode.SRC_IN);
+ ((DataViewHolder) holder).upvoteButton.setColorFilter(ContextCompat.getColor(mContext, R.color.backgroundColorPrimaryDark), android.graphics.PorterDuff.Mode.SRC_IN);
break;
case -1:
//Downvote
@@ -389,7 +389,7 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo
post.setVoteType(1);
newVoteType = RedditUtils.DIR_UPVOTE;
((DataViewHolder) holder).upvoteButton
- .setColorFilter(ContextCompat.getColor(mContext, R.color.colorPrimary), android.graphics.PorterDuff.Mode.SRC_IN);
+ .setColorFilter(ContextCompat.getColor(mContext, R.color.backgroundColorPrimaryDark), android.graphics.PorterDuff.Mode.SRC_IN);
} else {
//Upvoted before
post.setVoteType(0);
@@ -405,7 +405,7 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo
if(newVoteType.equals(RedditUtils.DIR_UPVOTE)) {
post.setVoteType(1);
((DataViewHolder) holder).upvoteButton
- .setColorFilter(ContextCompat.getColor(mContext, R.color.colorPrimary), android.graphics.PorterDuff.Mode.SRC_IN);
+ .setColorFilter(ContextCompat.getColor(mContext, R.color.backgroundColorPrimaryDark), android.graphics.PorterDuff.Mode.SRC_IN);
} else {
post.setVoteType(0);
((DataViewHolder) holder).upvoteButton.clearColorFilter();
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedSubredditRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedSubredditRecyclerViewAdapter.java
index 1205dedf..521086da 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedSubredditRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedSubredditRecyclerViewAdapter.java
@@ -38,7 +38,7 @@ class SubscribedSubredditRecyclerViewAdapter extends RecyclerView.Adapter<Recycl
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
- return new SubredditViewHolder(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_subscribed_subreddit, viewGroup, false));
+ return new SubredditViewHolder(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_subscribed_thing, viewGroup, false));
}
@Override
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedUserRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedUserRecyclerViewAdapter.java
index 9ac6a205..84e70cbd 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedUserRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/SubscribedUserRecyclerViewAdapter.java
@@ -7,6 +7,9 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
import com.bumptech.glide.Glide;
import com.bumptech.glide.RequestManager;
import com.bumptech.glide.request.RequestOptions;
@@ -14,8 +17,6 @@ import com.bumptech.glide.request.RequestOptions;
import java.util.List;
import SubscribedUserDatabase.SubscribedUserData;
-import androidx.annotation.NonNull;
-import androidx.recyclerview.widget.RecyclerView;
import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
import pl.droidsonroids.gif.GifImageView;
@@ -38,7 +39,7 @@ public class SubscribedUserRecyclerViewAdapter extends RecyclerView.Adapter<Recy
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
- return new UserViewHolder(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_subscribed_subreddit, viewGroup, false));
+ return new UserViewHolder(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_subscribed_thing, viewGroup, false));
}
@Override
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewPostDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewPostDetailActivity.java
index 55e064df..8b91b53b 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewPostDetailActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewPostDetailActivity.java
@@ -20,7 +20,6 @@ import android.widget.Toast;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.browser.customtabs.CustomTabsIntent;
-import androidx.cardview.widget.CardView;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.content.ContextCompat;
import androidx.core.widget.NestedScrollView;
@@ -35,6 +34,7 @@ import com.bumptech.glide.load.engine.GlideException;
import com.bumptech.glide.request.RequestListener;
import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.request.target.Target;
+import com.google.android.material.card.MaterialCardView;
import com.google.android.material.chip.Chip;
import com.google.android.material.snackbar.Snackbar;
import com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar;
@@ -105,7 +105,7 @@ public class ViewPostDetailActivity extends AppCompatActivity {
@BindView(R.id.share_button_view_post_detail) ImageView mShareButton;
@BindView(R.id.comment_progress_bar_view_post_detail) CircleProgressBar mCommentProgressbar;
- @BindView(R.id.comment_card_view_view_post_detail) CardView mCommentCardView;
+ @BindView(R.id.comment_card_view_view_post_detail) MaterialCardView mCommentCardView;
@BindView(R.id.recycler_view_view_post_detail) MultiLevelRecyclerView mRecyclerView;
@BindView(R.id.no_comment_wrapper_linear_layout_view_post_detail) LinearLayout mNoCommentWrapperLinearLayout;
@@ -187,7 +187,7 @@ public class ViewPostDetailActivity extends AppCompatActivity {
switch (mPost.getVoteType()) {
case 1:
//Upvote
- mUpvoteButton.setColorFilter(ContextCompat.getColor(this, R.color.colorPrimary), PorterDuff.Mode.SRC_IN);
+ mUpvoteButton.setColorFilter(ContextCompat.getColor(this, R.color.backgroundColorPrimaryDark), PorterDuff.Mode.SRC_IN);
break;
case -1:
//Downvote
@@ -344,7 +344,7 @@ public class ViewPostDetailActivity extends AppCompatActivity {
//Not upvoted before
mPost.setVoteType(1);
newVoteType = RedditUtils.DIR_UPVOTE;
- mUpvoteButton.setColorFilter(ContextCompat.getColor(this, R.color.colorPrimary), android.graphics.PorterDuff.Mode.SRC_IN);
+ mUpvoteButton.setColorFilter(ContextCompat.getColor(this, R.color.backgroundColorPrimaryDark), android.graphics.PorterDuff.Mode.SRC_IN);
} else {
//Upvoted before
mPost.setVoteType(0);
@@ -363,7 +363,7 @@ public class ViewPostDetailActivity extends AppCompatActivity {
public void onVoteThingSuccess() {
if(newVoteType.equals(RedditUtils.DIR_UPVOTE)) {
mPost.setVoteType(1);
- mUpvoteButton.setColorFilter(ContextCompat.getColor(ViewPostDetailActivity.this, R.color.colorPrimary), android.graphics.PorterDuff.Mode.SRC_IN);
+ mUpvoteButton.setColorFilter(ContextCompat.getColor(ViewPostDetailActivity.this, R.color.backgroundColorPrimaryDark), android.graphics.PorterDuff.Mode.SRC_IN);
} else {
mPost.setVoteType(0);
mUpvoteButton.clearColorFilter();
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java
index 70cdda82..3178a507 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java
@@ -182,7 +182,7 @@ public class ViewSubredditDetailActivity extends AppCompatActivity {
@Override
public void onSubredditSubscriptionSuccess() {
subscribeSubredditChip.setText(R.string.subscribe);
- subscribeSubredditChip.setChipBackgroundColor(getResources().getColorStateList(R.color.colorPrimaryDark));
+ subscribeSubredditChip.setChipBackgroundColor(getResources().getColorStateList(R.color.textColorPrimaryDark));
makeSnackbar(R.string.unsubscribed);
subscriptionReady = true;
}
@@ -209,7 +209,7 @@ public class ViewSubredditDetailActivity extends AppCompatActivity {
@Override
public void isNotSubscribed() {
subscribeSubredditChip.setText(R.string.subscribe);
- subscribeSubredditChip.setChipBackgroundColor(getResources().getColorStateList(R.color.colorPrimaryDark));
+ subscribeSubredditChip.setChipBackgroundColor(getResources().getColorStateList(R.color.textColorPrimaryDark));
subscriptionReady = true;
}
}).execute();
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 12eff6dc..f0ba107e 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -46,21 +46,22 @@
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:layout_marginEnd="32dp"
- android:src="@drawable/ic_outline_account_circle_24px" />
+ android:src="@drawable/ic_outline_account_circle_24px"
+ android:tint="@color/primaryTextColor"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="@string/profile"
- android:textColor="@android:color/black" />
+ android:textColor="@color/primaryTextColor" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
- android:background="#E0E0E0" />
+ android:background="@color/dividerColor" />
<TextView
android:id="@+id/following_label_main_activity"
diff --git a/app/src/main/res/layout/activity_view_post_detail.xml b/app/src/main/res/layout/activity_view_post_detail.xml
index 1fe7d3cd..b840e22e 100644
--- a/app/src/main/res/layout/activity_view_post_detail.xml
+++ b/app/src/main/res/layout/activity_view_post_detail.xml
@@ -78,7 +78,7 @@
android:layout_height="wrap_content"
android:paddingStart="16dp"
android:paddingEnd="16dp"
- android:textColor="#000000"
+ android:textColor="@color/primaryTextColor"
android:textSize="18sp" />
<ru.noties.markwon.view.MarkwonView
@@ -104,7 +104,7 @@
android:layout_marginEnd="8dp"
android:textColor="@android:color/white"
android:layout_centerVertical="true"
- app:chipBackgroundColor="@color/colorPrimaryDark"/>
+ app:chipBackgroundColor="@color/backgroundColorPrimaryDark"/>
<ImageView
android:id="@+id/gilded_image_view_view_post_detail"
@@ -197,9 +197,10 @@
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_marginTop="16dp"
- android:background="#E0E0E0"
+ android:background="@color/grey"
android:scaleType="center"
android:src="@drawable/ic_link"
+ android:tint="@android:color/tab_indicator_text"
android:visibility="gone" />
<RelativeLayout
@@ -267,9 +268,10 @@
android:layout_marginBottom="16dp"
app:mlpb_progress_stoke_width="3dp"
app:mlpb_progress_color="@color/colorAccent"
+ app:mlpb_background_color="@color/circularProgressBarBackground"
android:layout_gravity="center_horizontal"/>
- <androidx.cardview.widget.CardView
+ <com.google.android.material.card.MaterialCardView
android:id="@+id/comment_card_view_view_post_detail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -290,7 +292,7 @@
android:paddingStart="16dp"
android:paddingTop="16dp"
android:text="@string/comments"
- android:textColor="#000000"
+ android:textColor="@color/primaryTextColor"
android:textSize="18sp" />
<com.multilevelview.MultiLevelRecyclerView
@@ -300,7 +302,7 @@
</LinearLayout>
- </androidx.cardview.widget.CardView>
+ </com.google.android.material.card.MaterialCardView>
<LinearLayout
android:id="@+id/no_comment_wrapper_linear_layout_view_post_detail"
diff --git a/app/src/main/res/layout/activity_view_subreddit_detail.xml b/app/src/main/res/layout/activity_view_subreddit_detail.xml
index 5fff46ca..ac76d15b 100644
--- a/app/src/main/res/layout/activity_view_subreddit_detail.xml
+++ b/app/src/main/res/layout/activity_view_subreddit_detail.xml
@@ -48,7 +48,7 @@
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:layout_below="@id/banner_image_view_view_subreddit_detail_activity"
- android:background="@android:color/white">
+ android:background="@color/backgroundColor">
<TextView
android:id="@+id/subreddit_name_text_view_view_subreddit_detail_activity"
@@ -77,7 +77,7 @@
android:id="@+id/subscriber_count_text_view_view_subreddit_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textColor="@android:color/black"
+ android:textColor="@color/primaryTextColor"
android:layout_alignParentStart="true"
android:layout_toStartOf="@id/online_subscriber_count_text_view_view_subreddit_detail_activity" />
@@ -86,7 +86,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
- android:textColor="@android:color/black" />
+ android:textColor="@color/primaryTextColor" />
</RelativeLayout>
@@ -95,7 +95,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
- android:textColor="@android:color/black"
+ android:textColor="@color/primaryTextColor"
android:visibility="gone"/>
</LinearLayout>
diff --git a/app/src/main/res/layout/activity_view_user_detail.xml b/app/src/main/res/layout/activity_view_user_detail.xml
index 9bd70a72..70b225f8 100644
--- a/app/src/main/res/layout/activity_view_user_detail.xml
+++ b/app/src/main/res/layout/activity_view_user_detail.xml
@@ -48,7 +48,7 @@
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:layout_below="@id/banner_image_view_view_user_detail_activity"
- android:background="@android:color/white">
+ android:background="@color/backgroundColor">
<TextView
android:id="@+id/user_name_text_view_view_user_detail_activity"
@@ -56,7 +56,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:textSize="18sp"
- android:textColor="@color/colorPrimaryDark"
+ android:textColor="@color/textColorPrimaryDark"
android:layout_gravity="center_horizontal"/>
<TextView
@@ -65,7 +65,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
- android:textColor="@android:color/black"
+ android:textColor="@color/primaryTextColor"
android:layout_gravity="center_horizontal"/>
<com.google.android.material.chip.Chip
diff --git a/app/src/main/res/layout/fragment_post.xml b/app/src/main/res/layout/fragment_post.xml
index ad9e23d7..0ab81ef0 100644
--- a/app/src/main/res/layout/fragment_post.xml
+++ b/app/src/main/res/layout/fragment_post.xml
@@ -14,6 +14,7 @@
android:layout_marginBottom="16dp"
app:mlpb_progress_stoke_width="3dp"
app:mlpb_progress_color="@color/colorAccent"
+ app:mlpb_background_color="@color/circularProgressBarBackground"
android:layout_gravity="center_horizontal"/>
<androidx.recyclerview.widget.RecyclerView
diff --git a/app/src/main/res/layout/item_comment.xml b/app/src/main/res/layout/item_comment.xml
index 81748bbd..c5bb40bc 100644
--- a/app/src/main/res/layout/item_comment.xml
+++ b/app/src/main/res/layout/item_comment.xml
@@ -1,129 +1,134 @@
<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:id="@+id/linear_layout_item_post_comment">
-
- <View
- android:id="@+id/vertical_block_item_post_comment"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:background="@color/colorPrimary"/>
+<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="12dp"
- android:layout_marginBottom="12dp"
- android:orientation="vertical">
+ android:layout_height="wrap_content">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginStart="16dp"
- android:layout_marginEnd="16dp">
+ <View
+ android:id="@+id/vertical_block_item_post_comment"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:background="@color/textColorPrimaryDark"/>
- <TextView
- android:id="@+id/author_text_view_item_post_comment"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layout_marginEnd="16dp"
- android:textColor="@color/colorPrimary"/>
-
- <TextView
- android:id="@+id/comment_time_text_view_item_post_comment"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:gravity="end" />
-
- </LinearLayout>
-
- <ru.noties.markwon.view.MarkwonView
- android:id="@+id/comment_markdown_view_item_post_comment"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
- android:layout_marginStart="32dp"
- android:layout_marginEnd="32dp"
- android:layout_marginBottom="8dp"
- android:textColor="@android:color/black"/>
-
- <RelativeLayout
- android:id="@+id/relative_layout_item_post_comment"
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginStart="16dp"
- android:layout_marginEnd="16dp">
+ android:layout_marginTop="12dp"
+ android:layout_marginBottom="12dp"
+ android:orientation="vertical">
- <ImageView
- android:id="@+id/plus_button_item_post_comment"
- android:layout_width="wrap_content"
+ <LinearLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_alignParentStart="true"
- android:src="@drawable/ic_arrow_upward_black_20dp"
- android:layout_centerVertical="true"
- android:tint="@android:color/tab_indicator_text"
- android:background="?actionBarItemBackground"
- android:clickable="true"
- android:focusable="true"/>
-
- <TextView
- android:id="@+id/score_text_view_item_post_comment"
- android:layout_width="64dp"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp">
+
+ <TextView
+ android:id="@+id/author_text_view_item_post_comment"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:layout_marginEnd="16dp"
+ android:textColor="@color/textColorPrimaryDark"/>
+
+ <TextView
+ android:id="@+id/comment_time_text_view_item_post_comment"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:gravity="end" />
+
+ </LinearLayout>
+
+ <ru.noties.markwon.view.MarkwonView
+ android:id="@+id/comment_markdown_view_item_post_comment"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:layout_toEndOf="@id/plus_button_item_post_comment"
- android:gravity="center"/>
-
- <ImageView
- android:id="@+id/minus_button_item_post_comment"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:layout_toEndOf="@id/score_text_view_item_post_comment"
- android:src="@drawable/ic_arrow_downward_black_20dp"
- android:tint="@android:color/tab_indicator_text"
- android:background="?actionBarItemBackground"
- android:clickable="true"
- android:focusable="true"/>
-
- <ProgressBar
- android:id="@+id/load_more_comments_progress_bar"
- android:layout_width="20dp"
- android:layout_height="20dp"
- android:layout_marginEnd="16dp"
- android:layout_toStartOf="@id/expand_button_item_post_comment"
- android:visibility="gone"/>
-
- <ImageView
- android:id="@+id/expand_button_item_post_comment"
- android:layout_width="wrap_content"
+ android:layout_marginTop="8dp"
+ android:layout_marginStart="32dp"
+ android:layout_marginEnd="32dp"
+ android:layout_marginBottom="8dp"
+ android:textColor="@color/primaryTextColor"/>
+
+ <RelativeLayout
+ android:id="@+id/relative_layout_item_post_comment"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_toStartOf="@id/reply_button_item_post_comment"
- android:layout_centerVertical="true"
- android:layout_marginEnd="16dp"
- android:tint="@android:color/tab_indicator_text"
- android:background="?actionBarItemBackground"
- android:clickable="true"
- android:focusable="true"
- android:visibility="gone"/>
-
- <ImageView
- android:id="@+id/reply_button_item_post_comment"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:layout_alignParentEnd="true"
- android:src="@drawable/ic_reply_black_20dp"
- android:tint="@android:color/tab_indicator_text"
- android:background="?actionBarItemBackground"
- android:clickable="true"
- android:focusable="true"/>
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp">
+
+ <ImageView
+ android:id="@+id/plus_button_item_post_comment"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentStart="true"
+ android:src="@drawable/ic_arrow_upward_black_20dp"
+ android:layout_centerVertical="true"
+ android:tint="@android:color/tab_indicator_text"
+ android:background="?actionBarItemBackground"
+ android:clickable="true"
+ android:focusable="true"/>
+
+ <TextView
+ android:id="@+id/score_text_view_item_post_comment"
+ android:layout_width="64dp"
+ android:layout_height="wrap_content"
+ android:layout_centerVertical="true"
+ android:layout_toEndOf="@id/plus_button_item_post_comment"
+ android:gravity="center"/>
+
+ <ImageView
+ android:id="@+id/minus_button_item_post_comment"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerVertical="true"
+ android:layout_toEndOf="@id/score_text_view_item_post_comment"
+ android:src="@drawable/ic_arrow_downward_black_20dp"
+ android:tint="@android:color/tab_indicator_text"
+ android:background="?actionBarItemBackground"
+ android:clickable="true"
+ android:focusable="true"/>
+
+ <ProgressBar
+ android:id="@+id/load_more_comments_progress_bar"
+ android:layout_width="20dp"
+ android:layout_height="20dp"
+ android:layout_marginEnd="16dp"
+ android:layout_toStartOf="@id/expand_button_item_post_comment"
+ android:visibility="gone"/>
+
+ <ImageView
+ android:id="@+id/expand_button_item_post_comment"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toStartOf="@id/reply_button_item_post_comment"
+ android:layout_centerVertical="true"
+ android:layout_marginEnd="16dp"
+ android:tint="@android:color/tab_indicator_text"
+ android:background="?actionBarItemBackground"
+ android:clickable="true"
+ android:focusable="true"
+ android:visibility="gone"/>
+
+ <ImageView
+ android:id="@+id/reply_button_item_post_comment"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerVertical="true"
+ android:layout_alignParentEnd="true"
+ android:src="@drawable/ic_reply_black_20dp"
+ android:tint="@android:color/tab_indicator_text"
+ android:background="?actionBarItemBackground"
+ android:clickable="true"
+ android:focusable="true"/>
+
+ </RelativeLayout>
- </RelativeLayout>
+ </LinearLayout>
</LinearLayout>
-</LinearLayout> \ No newline at end of file
+</com.google.android.material.card.MaterialCardView> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_post.xml b/app/src/main/res/layout/item_post.xml
index 02c8ce23..8f1beb79 100644
--- a/app/src/main/res/layout/item_post.xml
+++ b/app/src/main/res/layout/item_post.xml
@@ -50,7 +50,7 @@
android:layout_height="24dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
- android:tint="@color/colorPrimary"
+ android:tint="@color/textColorPrimaryDark"
android:visibility="gone"
app:layout_constraintStart_toEndOf="@id/subreddit_icon_name_linear_layout_view_item_best_post"
app:layout_constraintEnd_toStartOf="@+id/post_time_text_view_best_post_item"
@@ -77,7 +77,7 @@
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:textSize="18sp"
- android:textColor="#000000"/>
+ android:textColor="@color/primaryTextColor"/>
<RelativeLayout
android:layout_width="match_parent"
@@ -93,7 +93,7 @@
android:layout_marginEnd="16dp"
android:textColor="@android:color/white"
android:layout_centerVertical="true"
- app:chipBackgroundColor="@color/colorPrimaryDark" />
+ app:chipBackgroundColor="@color/backgroundColorPrimaryDark" />
<ImageView
android:id="@+id/gilded_image_view_item_best_post"
@@ -187,7 +187,8 @@
android:layout_marginTop="16dp"
android:scaleType="center"
android:src="@drawable/ic_link"
- android:background="#E0E0E0"
+ android:tint="@android:color/tab_indicator_text"
+ android:background="@color/grey"
android:visibility="gone"/>
<RelativeLayout
diff --git a/app/src/main/res/layout/item_subreddit_listing.xml b/app/src/main/res/layout/item_subreddit_listing.xml
index 10d5055a..52409bfb 100644
--- a/app/src/main/res/layout/item_subreddit_listing.xml
+++ b/app/src/main/res/layout/item_subreddit_listing.xml
@@ -24,7 +24,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="32dp"
- android:textColor="@android:color/black"
+ android:textColor="@color/primaryTextColor"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/subreddit_icon_gif_image_view_item_subreddit_listing"
app:layout_constraintTop_toTopOf="parent" />
@@ -34,9 +34,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
-
android:src="@drawable/baseline_add_white_24"
- android:tint="@color/colorPrimary"
+ android:tint="@color/textColorPrimaryDark"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
diff --git a/app/src/main/res/layout/item_subscribed_subreddit.xml b/app/src/main/res/layout/item_subscribed_thing.xml
index 0717c7c4..0f4afc20 100644
--- a/app/src/main/res/layout/item_subscribed_subreddit.xml
+++ b/app/src/main/res/layout/item_subscribed_thing.xml
@@ -18,7 +18,7 @@
android:id="@+id/subreddit_name_text_view_item_subscribed_subreddit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textColor="@android:color/black"
+ android:textColor="@color/primaryTextColor"
android:layout_gravity="center_vertical"/>
</LinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_user_listing.xml b/app/src/main/res/layout/item_user_listing.xml
index 24ba6102..04b16bdc 100644
--- a/app/src/main/res/layout/item_user_listing.xml
+++ b/app/src/main/res/layout/item_user_listing.xml
@@ -24,7 +24,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="32dp"
- android:textColor="@android:color/black"
+ android:textColor="@color/primaryTextColor"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/user_icon_gif_image_view_item_user_listing"
app:layout_constraintTop_toTopOf="parent" />
@@ -34,9 +34,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
-
android:src="@drawable/baseline_add_white_24"
- android:tint="@color/colorPrimary"
+ android:tint="@color/textColorPrimaryDark"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml
new file mode 100644
index 00000000..8e2257d5
--- /dev/null
+++ b/app/src/main/res/values-night/colors.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <color name="colorPrimary">#242424</color>
+ <color name="colorPrimaryDark">#141414</color>
+ <color name="colorAccent">#FF4081</color>
+
+ <color name="minusButtonColor">#E91E63</color>
+
+ <color name="transparentActionBarColor">#88000000</color>
+
+ <color name="gold">#FFC107</color>
+
+ <color name="primaryTextColor">#FFFFFF</color>
+
+ <color name="textColorPrimaryDark">#1E88E5</color>
+
+ <color name="circularProgressBarBackground">#242424</color>
+
+ <color name="dividerColor">#69666C</color>
+
+ <color name="grey">#424242</color>
+
+ <color name="backgroundColor">#181818</color>
+
+ <color name="backgroundColorPrimaryDark">#1976D2</color>
+</resources>
diff --git a/app/src/main/res/values-v28/styles.xml b/app/src/main/res/values-v28/styles.xml
index 07037335..96398f20 100644
--- a/app/src/main/res/values-v28/styles.xml
+++ b/app/src/main/res/values-v28/styles.xml
@@ -1,7 +1,7 @@
<resources>
<!-- Base application theme. -->
- <style name="AppTheme" parent="Theme.MaterialComponents.Light">
+ <style name="AppTheme" parent="Theme.MaterialComponents.DayNight">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index ed9b8e8a..a4943718 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -9,4 +9,18 @@
<color name="transparentActionBarColor">#88000000</color>
<color name="gold">#FFC107</color>
+
+ <color name="primaryTextColor">#000000</color>
+
+ <color name="textColorPrimaryDark">@color/colorPrimaryDark</color>
+
+ <color name="circularProgressBarBackground">#242424</color>
+
+ <color name="dividerColor">#E0E0E0</color>
+
+ <color name="grey">#E0E0E0</color>
+
+ <color name="backgroundColor">#FFFFFF</color>
+
+ <color name="backgroundColorPrimaryDark">@color/colorPrimaryDark</color>
</resources>
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 1b770151..596e3813 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -1,7 +1,7 @@
<resources>
<!-- Base application theme. -->
- <style name="AppTheme" parent="Theme.MaterialComponents.Light">
+ <style name="AppTheme" parent="Theme.MaterialComponents.DayNight">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
@@ -31,7 +31,7 @@
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
- <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
+ <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.DayNight" />
<style name="Theme.AppCompat.Transparent" parent="AppTheme.ActionBar.Transparent">
<item name="android:windowNoTitle">true</item>