Dark theme support.

This commit is contained in:
Alex Ning 2019-05-07 23:55:49 +08:00
parent 297db53aa3
commit c8d1a9e37a
20 changed files with 207 additions and 158 deletions

View File

@ -156,7 +156,7 @@ class CommentMultiLevelRecyclerViewAdapter extends MultiLevelAdapter {
commentItem.setVoteType(1); commentItem.setVoteType(1);
newVoteType = RedditUtils.DIR_UPVOTE; newVoteType = RedditUtils.DIR_UPVOTE;
((CommentViewHolder) holder).upvoteButton ((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 { } else {
//Upvoted before //Upvoted before
commentItem.setVoteType(0); commentItem.setVoteType(0);
@ -172,7 +172,7 @@ class CommentMultiLevelRecyclerViewAdapter extends MultiLevelAdapter {
if(newVoteType.equals(RedditUtils.DIR_UPVOTE)) { if(newVoteType.equals(RedditUtils.DIR_UPVOTE)) {
commentItem.setVoteType(1); commentItem.setVoteType(1);
((CommentViewHolder) holder).upvoteButton ((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 { } else {
commentItem.setVoteType(0); commentItem.setVoteType(0);
((CommentViewHolder) holder).upvoteButton.clearColorFilter(); ((CommentViewHolder) holder).upvoteButton.clearColorFilter();

View File

@ -270,7 +270,7 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo
switch (voteType) { switch (voteType) {
case 1: case 1:
//Upvote //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; break;
case -1: case -1:
//Downvote //Downvote
@ -389,7 +389,7 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo
post.setVoteType(1); post.setVoteType(1);
newVoteType = RedditUtils.DIR_UPVOTE; newVoteType = RedditUtils.DIR_UPVOTE;
((DataViewHolder) holder).upvoteButton ((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 { } else {
//Upvoted before //Upvoted before
post.setVoteType(0); post.setVoteType(0);
@ -405,7 +405,7 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo
if(newVoteType.equals(RedditUtils.DIR_UPVOTE)) { if(newVoteType.equals(RedditUtils.DIR_UPVOTE)) {
post.setVoteType(1); post.setVoteType(1);
((DataViewHolder) holder).upvoteButton ((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 { } else {
post.setVoteType(0); post.setVoteType(0);
((DataViewHolder) holder).upvoteButton.clearColorFilter(); ((DataViewHolder) holder).upvoteButton.clearColorFilter();

View File

@ -38,7 +38,7 @@ class SubscribedSubredditRecyclerViewAdapter extends RecyclerView.Adapter<Recycl
@NonNull @NonNull
@Override @Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) { 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 @Override

View File

@ -7,6 +7,9 @@ import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide; import com.bumptech.glide.Glide;
import com.bumptech.glide.RequestManager; import com.bumptech.glide.RequestManager;
import com.bumptech.glide.request.RequestOptions; import com.bumptech.glide.request.RequestOptions;
@ -14,8 +17,6 @@ import com.bumptech.glide.request.RequestOptions;
import java.util.List; import java.util.List;
import SubscribedUserDatabase.SubscribedUserData; import SubscribedUserDatabase.SubscribedUserData;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import jp.wasabeef.glide.transformations.RoundedCornersTransformation; import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
import pl.droidsonroids.gif.GifImageView; import pl.droidsonroids.gif.GifImageView;
@ -38,7 +39,7 @@ public class SubscribedUserRecyclerViewAdapter extends RecyclerView.Adapter<Recy
@NonNull @NonNull
@Override @Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) { 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 @Override

View File

@ -20,7 +20,6 @@ import android.widget.Toast;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.browser.customtabs.CustomTabsIntent; import androidx.browser.customtabs.CustomTabsIntent;
import androidx.cardview.widget.CardView;
import androidx.coordinatorlayout.widget.CoordinatorLayout; import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
import androidx.core.widget.NestedScrollView; 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.RequestListener;
import com.bumptech.glide.request.RequestOptions; import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.request.target.Target; 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.chip.Chip;
import com.google.android.material.snackbar.Snackbar; import com.google.android.material.snackbar.Snackbar;
import com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar; 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.share_button_view_post_detail) ImageView mShareButton;
@BindView(R.id.comment_progress_bar_view_post_detail) CircleProgressBar mCommentProgressbar; @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.recycler_view_view_post_detail) MultiLevelRecyclerView mRecyclerView;
@BindView(R.id.no_comment_wrapper_linear_layout_view_post_detail) LinearLayout mNoCommentWrapperLinearLayout; @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()) { switch (mPost.getVoteType()) {
case 1: case 1:
//Upvote //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; break;
case -1: case -1:
//Downvote //Downvote
@ -344,7 +344,7 @@ public class ViewPostDetailActivity extends AppCompatActivity {
//Not upvoted before //Not upvoted before
mPost.setVoteType(1); mPost.setVoteType(1);
newVoteType = RedditUtils.DIR_UPVOTE; 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 { } else {
//Upvoted before //Upvoted before
mPost.setVoteType(0); mPost.setVoteType(0);
@ -363,7 +363,7 @@ public class ViewPostDetailActivity extends AppCompatActivity {
public void onVoteThingSuccess() { public void onVoteThingSuccess() {
if(newVoteType.equals(RedditUtils.DIR_UPVOTE)) { if(newVoteType.equals(RedditUtils.DIR_UPVOTE)) {
mPost.setVoteType(1); 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 { } else {
mPost.setVoteType(0); mPost.setVoteType(0);
mUpvoteButton.clearColorFilter(); mUpvoteButton.clearColorFilter();

View File

@ -182,7 +182,7 @@ public class ViewSubredditDetailActivity extends AppCompatActivity {
@Override @Override
public void onSubredditSubscriptionSuccess() { public void onSubredditSubscriptionSuccess() {
subscribeSubredditChip.setText(R.string.subscribe); subscribeSubredditChip.setText(R.string.subscribe);
subscribeSubredditChip.setChipBackgroundColor(getResources().getColorStateList(R.color.colorPrimaryDark)); subscribeSubredditChip.setChipBackgroundColor(getResources().getColorStateList(R.color.textColorPrimaryDark));
makeSnackbar(R.string.unsubscribed); makeSnackbar(R.string.unsubscribed);
subscriptionReady = true; subscriptionReady = true;
} }
@ -209,7 +209,7 @@ public class ViewSubredditDetailActivity extends AppCompatActivity {
@Override @Override
public void isNotSubscribed() { public void isNotSubscribed() {
subscribeSubredditChip.setText(R.string.subscribe); subscribeSubredditChip.setText(R.string.subscribe);
subscribeSubredditChip.setChipBackgroundColor(getResources().getColorStateList(R.color.colorPrimaryDark)); subscribeSubredditChip.setChipBackgroundColor(getResources().getColorStateList(R.color.textColorPrimaryDark));
subscriptionReady = true; subscriptionReady = true;
} }
}).execute(); }).execute();

View File

@ -46,21 +46,22 @@
android:layout_height="24dp" android:layout_height="24dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginEnd="32dp" 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 <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:text="@string/profile" android:text="@string/profile"
android:textColor="@android:color/black" /> android:textColor="@color/primaryTextColor" />
</LinearLayout> </LinearLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="#E0E0E0" /> android:background="@color/dividerColor" />
<TextView <TextView
android:id="@+id/following_label_main_activity" android:id="@+id/following_label_main_activity"

View File

@ -78,7 +78,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="16dp" android:paddingStart="16dp"
android:paddingEnd="16dp" android:paddingEnd="16dp"
android:textColor="#000000" android:textColor="@color/primaryTextColor"
android:textSize="18sp" /> android:textSize="18sp" />
<ru.noties.markwon.view.MarkwonView <ru.noties.markwon.view.MarkwonView
@ -104,7 +104,7 @@
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:textColor="@android:color/white" android:textColor="@android:color/white"
android:layout_centerVertical="true" android:layout_centerVertical="true"
app:chipBackgroundColor="@color/colorPrimaryDark"/> app:chipBackgroundColor="@color/backgroundColorPrimaryDark"/>
<ImageView <ImageView
android:id="@+id/gilded_image_view_view_post_detail" android:id="@+id/gilded_image_view_view_post_detail"
@ -197,9 +197,10 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="150dp" android:layout_height="150dp"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:background="#E0E0E0" android:background="@color/grey"
android:scaleType="center" android:scaleType="center"
android:src="@drawable/ic_link" android:src="@drawable/ic_link"
android:tint="@android:color/tab_indicator_text"
android:visibility="gone" /> android:visibility="gone" />
<RelativeLayout <RelativeLayout
@ -267,9 +268,10 @@
android:layout_marginBottom="16dp" android:layout_marginBottom="16dp"
app:mlpb_progress_stoke_width="3dp" app:mlpb_progress_stoke_width="3dp"
app:mlpb_progress_color="@color/colorAccent" app:mlpb_progress_color="@color/colorAccent"
app:mlpb_background_color="@color/circularProgressBarBackground"
android:layout_gravity="center_horizontal"/> 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:id="@+id/comment_card_view_view_post_detail"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -290,7 +292,7 @@
android:paddingStart="16dp" android:paddingStart="16dp"
android:paddingTop="16dp" android:paddingTop="16dp"
android:text="@string/comments" android:text="@string/comments"
android:textColor="#000000" android:textColor="@color/primaryTextColor"
android:textSize="18sp" /> android:textSize="18sp" />
<com.multilevelview.MultiLevelRecyclerView <com.multilevelview.MultiLevelRecyclerView
@ -300,7 +302,7 @@
</LinearLayout> </LinearLayout>
</androidx.cardview.widget.CardView> </com.google.android.material.card.MaterialCardView>
<LinearLayout <LinearLayout
android:id="@+id/no_comment_wrapper_linear_layout_view_post_detail" android:id="@+id/no_comment_wrapper_linear_layout_view_post_detail"

View File

@ -48,7 +48,7 @@
android:paddingStart="16dp" android:paddingStart="16dp"
android:paddingEnd="16dp" android:paddingEnd="16dp"
android:layout_below="@id/banner_image_view_view_subreddit_detail_activity" android:layout_below="@id/banner_image_view_view_subreddit_detail_activity"
android:background="@android:color/white"> android:background="@color/backgroundColor">
<TextView <TextView
android:id="@+id/subreddit_name_text_view_view_subreddit_detail_activity" 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:id="@+id/subscriber_count_text_view_view_subreddit_detail_activity"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@android:color/black" android:textColor="@color/primaryTextColor"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_toStartOf="@id/online_subscriber_count_text_view_view_subreddit_detail_activity" /> android:layout_toStartOf="@id/online_subscriber_count_text_view_view_subreddit_detail_activity" />
@ -86,7 +86,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:textColor="@android:color/black" /> android:textColor="@color/primaryTextColor" />
</RelativeLayout> </RelativeLayout>
@ -95,7 +95,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="16dp" android:layout_marginBottom="16dp"
android:textColor="@android:color/black" android:textColor="@color/primaryTextColor"
android:visibility="gone"/> android:visibility="gone"/>
</LinearLayout> </LinearLayout>

View File

@ -48,7 +48,7 @@
android:paddingStart="16dp" android:paddingStart="16dp"
android:paddingEnd="16dp" android:paddingEnd="16dp"
android:layout_below="@id/banner_image_view_view_user_detail_activity" android:layout_below="@id/banner_image_view_view_user_detail_activity"
android:background="@android:color/white"> android:background="@color/backgroundColor">
<TextView <TextView
android:id="@+id/user_name_text_view_view_user_detail_activity" android:id="@+id/user_name_text_view_view_user_detail_activity"
@ -56,7 +56,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:textSize="18sp" android:textSize="18sp"
android:textColor="@color/colorPrimaryDark" android:textColor="@color/textColorPrimaryDark"
android:layout_gravity="center_horizontal"/> android:layout_gravity="center_horizontal"/>
<TextView <TextView
@ -65,7 +65,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginBottom="16dp" android:layout_marginBottom="16dp"
android:textColor="@android:color/black" android:textColor="@color/primaryTextColor"
android:layout_gravity="center_horizontal"/> android:layout_gravity="center_horizontal"/>
<com.google.android.material.chip.Chip <com.google.android.material.chip.Chip

View File

@ -14,6 +14,7 @@
android:layout_marginBottom="16dp" android:layout_marginBottom="16dp"
app:mlpb_progress_stoke_width="3dp" app:mlpb_progress_stoke_width="3dp"
app:mlpb_progress_color="@color/colorAccent" app:mlpb_progress_color="@color/colorAccent"
app:mlpb_background_color="@color/circularProgressBarBackground"
android:layout_gravity="center_horizontal"/> android:layout_gravity="center_horizontal"/>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView

View File

@ -1,129 +1,134 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout <com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" 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"/>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp" <View
android:orientation="vertical"> android:id="@+id/vertical_block_item_post_comment"
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="@color/textColorPrimaryDark"/>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginTop="12dp"
android:layout_marginEnd="16dp"> android:layout_marginBottom="12dp"
android:orientation="vertical">
<TextView <LinearLayout
android:id="@+id/author_text_view_item_post_comment" android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_marginStart="16dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp">
android:textColor="@color/colorPrimary"/>
<TextView <TextView
android:id="@+id/comment_time_text_view_item_post_comment" android:id="@+id/author_text_view_item_post_comment"
android:layout_width="0dp" 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_height="wrap_content"
android:layout_weight="1" android:layout_marginTop="8dp"
android:gravity="end" /> 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_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>
</LinearLayout> </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"
android:layout_width="match_parent"
android:layout_height="wrap_content"
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>
</LinearLayout> </LinearLayout>
</LinearLayout> </com.google.android.material.card.MaterialCardView>

View File

@ -50,7 +50,7 @@
android:layout_height="24dp" android:layout_height="24dp"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:tint="@color/colorPrimary" android:tint="@color/textColorPrimaryDark"
android:visibility="gone" android:visibility="gone"
app:layout_constraintStart_toEndOf="@id/subreddit_icon_name_linear_layout_view_item_best_post" 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" app:layout_constraintEnd_toStartOf="@+id/post_time_text_view_best_post_item"
@ -77,7 +77,7 @@
android:paddingStart="16dp" android:paddingStart="16dp"
android:paddingEnd="16dp" android:paddingEnd="16dp"
android:textSize="18sp" android:textSize="18sp"
android:textColor="#000000"/> android:textColor="@color/primaryTextColor"/>
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -93,7 +93,7 @@
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:textColor="@android:color/white" android:textColor="@android:color/white"
android:layout_centerVertical="true" android:layout_centerVertical="true"
app:chipBackgroundColor="@color/colorPrimaryDark" /> app:chipBackgroundColor="@color/backgroundColorPrimaryDark" />
<ImageView <ImageView
android:id="@+id/gilded_image_view_item_best_post" android:id="@+id/gilded_image_view_item_best_post"
@ -187,7 +187,8 @@
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:scaleType="center" android:scaleType="center"
android:src="@drawable/ic_link" android:src="@drawable/ic_link"
android:background="#E0E0E0" android:tint="@android:color/tab_indicator_text"
android:background="@color/grey"
android:visibility="gone"/> android:visibility="gone"/>
<RelativeLayout <RelativeLayout

View File

@ -24,7 +24,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginStart="32dp" android:layout_marginStart="32dp"
android:textColor="@android:color/black" android:textColor="@color/primaryTextColor"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/subreddit_icon_gif_image_view_item_subreddit_listing" app:layout_constraintStart_toEndOf="@+id/subreddit_icon_gif_image_view_item_subreddit_listing"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -34,9 +34,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:src="@drawable/baseline_add_white_24" android:src="@drawable/baseline_add_white_24"
android:tint="@color/colorPrimary" android:tint="@color/textColorPrimaryDark"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"

View File

@ -18,7 +18,7 @@
android:id="@+id/subreddit_name_text_view_item_subscribed_subreddit" android:id="@+id/subreddit_name_text_view_item_subscribed_subreddit"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@android:color/black" android:textColor="@color/primaryTextColor"
android:layout_gravity="center_vertical"/> android:layout_gravity="center_vertical"/>
</LinearLayout> </LinearLayout>

View File

@ -24,7 +24,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginStart="32dp" android:layout_marginStart="32dp"
android:textColor="@android:color/black" android:textColor="@color/primaryTextColor"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/user_icon_gif_image_view_item_user_listing" app:layout_constraintStart_toEndOf="@+id/user_icon_gif_image_view_item_user_listing"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -34,9 +34,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:src="@drawable/baseline_add_white_24" android:src="@drawable/baseline_add_white_24"
android:tint="@color/colorPrimary" android:tint="@color/textColorPrimaryDark"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"

View File

@ -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>

View File

@ -1,7 +1,7 @@
<resources> <resources>
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="AppTheme" parent="Theme.MaterialComponents.Light"> <style name="AppTheme" parent="Theme.MaterialComponents.DayNight">
<!-- Customize your theme here. --> <!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item>

View File

@ -9,4 +9,18 @@
<color name="transparentActionBarColor">#88000000</color> <color name="transparentActionBarColor">#88000000</color>
<color name="gold">#FFC107</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> </resources>

View File

@ -1,7 +1,7 @@
<resources> <resources>
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="AppTheme" parent="Theme.MaterialComponents.Light"> <style name="AppTheme" parent="Theme.MaterialComponents.DayNight">
<!-- Customize your theme here. --> <!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
@ -31,7 +31,7 @@
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" /> <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"> <style name="Theme.AppCompat.Transparent" parent="AppTheme.ActionBar.Transparent">
<item name="android:windowNoTitle">true</item> <item name="android:windowNoTitle">true</item>