aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2023-09-10 21:19:29 +0000
committerDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2023-09-10 21:19:29 +0000
commit743c16b1bee74c57d56357be4a0ecbb142fecc4b (patch)
treecc7d507a700b9dbba34c0996f9666ef9a47b61c7 /app/src
parentd9f2016db3174233c4f70d9c42dddd84f2d60367 (diff)
downloadinfinity-for-reddit-743c16b1bee74c57d56357be4a0ecbb142fecc4b.tar
infinity-for-reddit-743c16b1bee74c57d56357be4a0ecbb142fecc4b.tar.gz
infinity-for-reddit-743c16b1bee74c57d56357be4a0ecbb142fecc4b.tar.bz2
infinity-for-reddit-743c16b1bee74c57d56357be4a0ecbb142fecc4b.tar.lz
infinity-for-reddit-743c16b1bee74c57d56357be4a0ecbb142fecc4b.tar.xz
infinity-for-reddit-743c16b1bee74c57d56357be4a0ecbb142fecc4b.tar.zst
infinity-for-reddit-743c16b1bee74c57d56357be4a0ecbb142fecc4b.zip
Continue adding Card Layout 3.
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java15
-rw-r--r--app/src/main/res/drawable/ic_downvote_24dp.xml9
-rw-r--r--app/src/main/res/drawable/ic_downvote_filled_24dp.xml9
-rw-r--r--app/src/main/res/drawable/ic_upvote_24dp.xml9
-rw-r--r--app/src/main/res/drawable/ic_upvote_filled_24dp.xml9
-rw-r--r--app/src/main/res/layout/item_post_card_3_with_preview.xml26
6 files changed, 53 insertions, 24 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
index bb2dc2e2..5da7bbc4 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
@@ -197,7 +197,6 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
private int mVoteAndReplyUnavailableVoteButtonColor;
private int mPostIconAndInfoColor;
private int mDividerColor;
- private int mButtonBackgroundColor;
private float mScale;
private boolean mDisplaySubredditName;
private boolean mVoteButtonsOnTheRight;
@@ -355,7 +354,6 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
mVoteAndReplyUnavailableVoteButtonColor = customThemeWrapper.getVoteAndReplyUnavailableButtonColor();
mPostIconAndInfoColor = customThemeWrapper.getPostIconAndInfoColor();
mDividerColor = customThemeWrapper.getDividerColor();
- mButtonBackgroundColor = Color.parseColor("#FFFFFF");
mCommentIcon = AppCompatResources.getDrawable(activity, R.drawable.ic_comment_grey_24dp);
if (mCommentIcon != null) {
@@ -1635,9 +1633,8 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
((PostMaterial3CardBaseViewHolder) holder).userTextView.setText(authorPrefixed);
}
- //TODO change color
- /*((PostMaterial3CardBaseViewHolder) holder).userTextView.setTextColor(
- post.isModerator() ? mModeratorColor : mUsernameColor);*/
+ ((PostMaterial3CardBaseViewHolder) holder).userTextView.setTextColor(
+ post.isModerator() ? mModeratorColor : mUsernameColor);
if (mDisplaySubredditName) {
if (authorPrefixed.equals(post.getSubredditNamePrefixed())) {
@@ -5939,10 +5936,8 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
titleTextView.setTypeface(mActivity.titleTypeface);
}
- /*subredditTextView.setTextColor(mSubredditColor);
- userTextView.setTextColor(mUsernameColor);*/
- subredditTextView.setTextColor(mPrimaryTextColor);
- userTextView.setTextColor(mPrimaryTextColor);
+ subredditTextView.setTextColor(mSubredditColor);
+ userTextView.setTextColor(mUsernameColor);
postTimeTextView.setTextColor(mSecondaryTextColor);
titleTextView.setTextColor(mPostTitleColor);
stickiedPostImageView.setColorFilter(mStickiedPostIconTint, PorterDuff.Mode.SRC_IN);
@@ -5964,9 +5959,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
archivedImageView.setColorFilter(mArchivedIconTint, PorterDuff.Mode.SRC_IN);
lockedImageView.setColorFilter(mLockedIconTint, PorterDuff.Mode.SRC_IN);
crosspostImageView.setColorFilter(mCrosspostIconTint, PorterDuff.Mode.SRC_IN);
- upvoteButton.setBackgroundTintList(ColorStateList.valueOf(mButtonBackgroundColor));
upvoteButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
- downvoteButton.setBackgroundTintList(ColorStateList.valueOf(mButtonBackgroundColor));
downvoteButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor));
//commentsCountButton.setBackgroundTintList(ColorStateList.valueOf(mButtonBackgroundColor));
commentsCountButton.setTextColor(mPostIconAndInfoColor);
diff --git a/app/src/main/res/drawable/ic_downvote_24dp.xml b/app/src/main/res/drawable/ic_downvote_24dp.xml
new file mode 100644
index 00000000..f57565eb
--- /dev/null
+++ b/app/src/main/res/drawable/ic_downvote_24dp.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="960"
+ android:viewportHeight="960">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M640,160l-0,280L756,440q26,-0 36.5,22.5T787,505l-276,337q-12,15 -31,15t-31,-15l-276,-337q-16,-20 -5.5,-42.5T204,440L320,440l-0,-280q-0,-17 11.5,-28.5T360,120L600,120q17,-0 28.5,11.5T640,160ZM560,200l-160,-0l-0,320l-111,-0L480,754 671,520l-111,-0l-0,-320ZM480,520Z"/>
+</vector>
diff --git a/app/src/main/res/drawable/ic_downvote_filled_24dp.xml b/app/src/main/res/drawable/ic_downvote_filled_24dp.xml
new file mode 100644
index 00000000..27bc0974
--- /dev/null
+++ b/app/src/main/res/drawable/ic_downvote_filled_24dp.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="960"
+ android:viewportHeight="960">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M640,160l-0,280L756,440q26,-0 36.5,22.5T787,505l-276,337q-12,15 -31,15t-31,-15l-276,-337q-16,-20 -5.5,-42.5T204,440L320,440l-0,-280q-0,-17 11.5,-28.5T360,120L600,120q17,-0 28.5,11.5T640,160Z"/>
+</vector>
diff --git a/app/src/main/res/drawable/ic_upvote_24dp.xml b/app/src/main/res/drawable/ic_upvote_24dp.xml
new file mode 100644
index 00000000..9ca6698e
--- /dev/null
+++ b/app/src/main/res/drawable/ic_upvote_24dp.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="960"
+ android:viewportHeight="960">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M320,800v-280L204,520q-26,0 -36.5,-22.5T173,455l276,-337q12,-15 31,-15t31,15l276,337q16,20 5.5,42.5T756,520L640,520v280q0,17 -11.5,28.5T600,840L360,840q-17,0 -28.5,-11.5T320,800ZM400,760h160v-320h111L480,206 289,440h111v320ZM480,440Z"/>
+</vector>
diff --git a/app/src/main/res/drawable/ic_upvote_filled_24dp.xml b/app/src/main/res/drawable/ic_upvote_filled_24dp.xml
new file mode 100644
index 00000000..b0e00898
--- /dev/null
+++ b/app/src/main/res/drawable/ic_upvote_filled_24dp.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="960"
+ android:viewportHeight="960">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M320,800v-280L204,520q-26,0 -36.5,-22.5T173,455l276,-337q12,-15 31,-15t31,15l276,337q16,20 5.5,42.5T756,520L640,520v280q0,17 -11.5,28.5T600,840L360,840q-17,0 -28.5,-11.5T320,800Z"/>
+</vector>
diff --git a/app/src/main/res/layout/item_post_card_3_with_preview.xml b/app/src/main/res/layout/item_post_card_3_with_preview.xml
index f22b2bb4..237e2847 100644
--- a/app/src/main/res/layout/item_post_card_3_with_preview.xml
+++ b/app/src/main/res/layout/item_post_card_3_with_preview.xml
@@ -143,6 +143,16 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
+ android:id="@+id/link_text_view_item_post_with_preview"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp"
+ android:textSize="?attr/font_12"
+ android:fontFamily="?attr/font_family"
+ android:visibility="gone" />
+
+ <TextView
android:id="@+id/title_text_view_item_post_with_preview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -246,17 +256,6 @@
</com.nex3z.flowlayout.FlowLayout>
- <TextView
- android:id="@+id/link_text_view_item_post_with_preview"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="16dp"
- android:paddingStart="16dp"
- android:paddingEnd="16dp"
- android:textSize="?attr/font_12"
- android:fontFamily="?attr/font_family"
- android:visibility="gone" />
-
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/bottom_constraint_layout_item_post_with_preview"
android:layout_width="match_parent"
@@ -267,6 +266,7 @@
android:id="@+id/vote_button_toggle_item_post_card_3_with_preview"
android:layout_width="0dp"
android:layout_height="wrap_content"
+ app:singleSelection="true"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
@@ -283,7 +283,7 @@
android:textStyle="bold"
android:fontFamily="?attr/font_family"
app:strokeWidth="0dp"
- app:icon="@drawable/ic_arrow_upward_grey_24dp" />
+ app:icon="@drawable/ic_upvote_24dp" />
<com.google.android.material.button.MaterialButton
style="?attr/materialButtonOutlinedStyle"
@@ -294,7 +294,7 @@
android:paddingEnd="8dp"
android:minWidth="0dp"
app:strokeWidth="0dp"
- app:icon="@drawable/ic_arrow_downward_grey_24dp" />
+ app:icon="@drawable/ic_downvote_24dp" />
</com.google.android.material.button.MaterialButtonToggleGroup>