diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-09-10 19:59:29 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-09-10 19:59:29 +0000 |
commit | d9f2016db3174233c4f70d9c42dddd84f2d60367 (patch) | |
tree | debfae537f8b37b813927774cb2a3adad999b146 /app/src | |
parent | 89cd1cc7cee540889be8a01e28c9b6c9cf4816e9 (diff) | |
download | infinity-for-reddit-d9f2016db3174233c4f70d9c42dddd84f2d60367.tar infinity-for-reddit-d9f2016db3174233c4f70d9c42dddd84f2d60367.tar.gz infinity-for-reddit-d9f2016db3174233c4f70d9c42dddd84f2d60367.tar.bz2 infinity-for-reddit-d9f2016db3174233c4f70d9c42dddd84f2d60367.tar.lz infinity-for-reddit-d9f2016db3174233c4f70d9c42dddd84f2d60367.tar.xz infinity-for-reddit-d9f2016db3174233c4f70d9c42dddd84f2d60367.tar.zst infinity-for-reddit-d9f2016db3174233c4f70d9c42dddd84f2d60367.zip |
Continue adding Card Layout 3.
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java | 11 | ||||
-rw-r--r-- | app/src/main/res/layout/item_post_card_3_with_preview.xml | 144 |
2 files changed, 81 insertions, 74 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 36b33332..bb2dc2e2 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java @@ -1635,8 +1635,9 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie ((PostMaterial3CardBaseViewHolder) holder).userTextView.setText(authorPrefixed); } - ((PostMaterial3CardBaseViewHolder) holder).userTextView.setTextColor( - post.isModerator() ? mModeratorColor : mUsernameColor); + //TODO change color + /*((PostMaterial3CardBaseViewHolder) holder).userTextView.setTextColor( + post.isModerator() ? mModeratorColor : mUsernameColor);*/ if (mDisplaySubredditName) { if (authorPrefixed.equals(post.getSubredditNamePrefixed())) { @@ -5938,8 +5939,10 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie titleTextView.setTypeface(mActivity.titleTypeface); } - subredditTextView.setTextColor(mSubredditColor); - userTextView.setTextColor(mUsernameColor); + /*subredditTextView.setTextColor(mSubredditColor); + userTextView.setTextColor(mUsernameColor);*/ + subredditTextView.setTextColor(mPrimaryTextColor); + userTextView.setTextColor(mPrimaryTextColor); postTimeTextView.setTextColor(mSecondaryTextColor); titleTextView.setTextColor(mPostTitleColor); stickiedPostImageView.setColorFilter(mStickiedPostIconTint, PorterDuff.Mode.SRC_IN); 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 268f5933..f22b2bb4 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 @@ -4,8 +4,11 @@ android:layout_width="match_parent" android:layout_height="wrap_content" xmlns:tools="http://schemas.android.com/tools" - android:layout_margin="8dp" - app:cardCornerRadius="16dp" + android:layout_marginTop="8dp" + android:layout_marginBottom="8dp" + android:layout_marginStart="16dp" + android:layout_marginEnd="16dp" + app:cardCornerRadius="12dp" app:cardBackgroundColor="#FBEEFC" style="?attr/materialCardViewFilledStyle"> @@ -14,6 +17,54 @@ android:layout_height="wrap_content" android:orientation="vertical"> + <FrameLayout + android:id="@+id/image_wrapper_relative_layout_item_post_with_preview" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:visibility="gone"> + + <ml.docilealligator.infinityforreddit.customviews.AspectRatioGifImageView + android:id="@+id/image_view_item_post_with_preview" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:adjustViewBounds="true" /> + + <ImageView + android:id="@+id/video_or_gif_indicator_image_view_item_post_with_preview" + android:layout_width="36dp" + android:layout_height="36dp" + android:layout_margin="16dp" + android:scaleType="center" + android:background="@drawable/play_button_round_background" + android:visibility="gone" /> + + <ProgressBar + android:id="@+id/progress_bar_item_post_with_preview" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" /> + + <TextView + android:id="@+id/load_image_error_text_view_item_post_with_preview" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:drawableTop="@drawable/ic_error_outline_black_24dp" + android:layout_gravity="center" + android:gravity="center" + android:text="@string/error_loading_image_tap_to_retry" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + android:visibility="gone" /> + + </FrameLayout> + + <ImageView + android:id="@+id/image_view_no_preview_gallery_item_post_with_preview" + android:layout_width="match_parent" + android:layout_height="150dp" + android:scaleType="center" + android:visibility="gone" /> + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="wrap_content" @@ -106,7 +157,8 @@ android:padding="16dp" app:flChildSpacing="16dp" app:flChildSpacingForLastRow="align" - app:flRowSpacing="8dp"> + app:flRowSpacing="8dp" + android:visibility="gone"> <com.libRG.CustomTextView android:id="@+id/type_text_view_item_post_with_preview" @@ -205,54 +257,6 @@ android:fontFamily="?attr/font_family" android:visibility="gone" /> - <FrameLayout - android:id="@+id/image_wrapper_relative_layout_item_post_with_preview" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:visibility="gone"> - - <ml.docilealligator.infinityforreddit.customviews.AspectRatioGifImageView - android:id="@+id/image_view_item_post_with_preview" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:adjustViewBounds="true" /> - - <ImageView - android:id="@+id/video_or_gif_indicator_image_view_item_post_with_preview" - android:layout_width="36dp" - android:layout_height="36dp" - android:layout_margin="16dp" - android:scaleType="center" - android:background="@drawable/play_button_round_background" - android:visibility="gone" /> - - <ProgressBar - android:id="@+id/progress_bar_item_post_with_preview" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center" /> - - <TextView - android:id="@+id/load_image_error_text_view_item_post_with_preview" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:drawableTop="@drawable/ic_error_outline_black_24dp" - android:layout_gravity="center" - android:gravity="center" - android:text="@string/error_loading_image_tap_to_retry" - android:textSize="?attr/font_default" - android:fontFamily="?attr/font_family" - android:visibility="gone" /> - - </FrameLayout> - - <ImageView - android:id="@+id/image_view_no_preview_gallery_item_post_with_preview" - android:layout_width="match_parent" - android:layout_height="150dp" - android:scaleType="center" - android:visibility="gone" /> - <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/bottom_constraint_layout_item_post_with_preview" android:layout_width="match_parent" @@ -295,45 +299,45 @@ </com.google.android.material.button.MaterialButtonToggleGroup> <com.google.android.material.button.MaterialButton - style="?attr/materialButtonOutlinedStyle" - android:id="@+id/comments_count_button_item_post_with_preview" + android:id="@+id/save_button_item_post_with_preview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="16dp" - android:paddingStart="8dp" - android:paddingEnd="8dp" - android:minWidth="0dp" - android:textSize="?attr/font_12" - android:textStyle="bold" - android:fontFamily="?attr/font_family" app:strokeWidth="0dp" - app:iconTint="@null" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/vote_button_toggle_item_post_card_3_with_preview" /> + app:layout_constraintStart_toEndOf="@id/vote_button_toggle_item_post_card_3_with_preview" + style="?attr/materialIconButtonOutlinedStyle" /> <com.google.android.material.button.MaterialButton - style="?attr/materialIconButtonOutlinedStyle" - android:id="@+id/save_button_item_post_with_preview" + android:id="@+id/share_button_item_post_with_preview" android:layout_width="wrap_content" android:layout_height="wrap_content" app:strokeWidth="0dp" - app:layout_constraintHorizontal_bias="1" + app:icon="@drawable/ic_share_grey_24dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/comments_count_button_item_post_with_preview" - app:layout_constraintEnd_toStartOf="@id/share_button_item_post_with_preview" /> + app:layout_constraintStart_toEndOf="@id/save_button_item_post_with_preview" + style="?attr/materialIconButtonOutlinedStyle" /> <com.google.android.material.button.MaterialButton - style="?attr/materialIconButtonOutlinedStyle" - android:id="@+id/share_button_item_post_with_preview" + android:id="@+id/comments_count_button_item_post_with_preview" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:minWidth="0dp" + android:textSize="?attr/font_12" + android:textStyle="bold" + android:fontFamily="?attr/font_family" app:strokeWidth="0dp" - app:icon="@drawable/ic_share_grey_24dp" + app:iconTint="@null" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" /> + app:layout_constraintStart_toEndOf="@id/share_button_item_post_with_preview" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="1" + style="?attr/materialButtonOutlinedStyle" /> <!--<ImageView android:id="@+id/plus_button_item_post_with_preview" |