diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-09-15 21:50:36 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-09-15 21:50:36 +0000 |
commit | 7252dce6e3f7df54440e1c2cdb88a02270e61f48 (patch) | |
tree | 4ad0cfd71ea91a148a40728b3e74082bcdbdcf08 /app/src/main/res | |
parent | 6453d41f288fbb4f485481388ca6ed29e094d802 (diff) | |
download | infinity-for-reddit-7252dce6e3f7df54440e1c2cdb88a02270e61f48.tar infinity-for-reddit-7252dce6e3f7df54440e1c2cdb88a02270e61f48.tar.gz infinity-for-reddit-7252dce6e3f7df54440e1c2cdb88a02270e61f48.tar.bz2 infinity-for-reddit-7252dce6e3f7df54440e1c2cdb88a02270e61f48.tar.lz infinity-for-reddit-7252dce6e3f7df54440e1c2cdb88a02270e61f48.tar.xz infinity-for-reddit-7252dce6e3f7df54440e1c2cdb88a02270e61f48.tar.zst infinity-for-reddit-7252dce6e3f7df54440e1c2cdb88a02270e61f48.zip |
Continue changing vote button icons.
Diffstat (limited to '')
8 files changed, 545 insertions, 489 deletions
diff --git a/app/src/main/res/layout/item_post_detail_gallery.xml b/app/src/main/res/layout/item_post_detail_gallery.xml index bb9f2903..d9016438 100644 --- a/app/src/main/res/layout/item_post_detail_gallery.xml +++ b/app/src/main/res/layout/item_post_detail_gallery.xml @@ -229,7 +229,7 @@ </FrameLayout> <ImageView - android:id="@+id/image_view_no_preview_link_item_post_detail_gallery" + android:id="@+id/no_preview_post_type_image_view_item_post_detail_gallery" android:layout_width="match_parent" android:layout_height="150dp" android:scaleType="center" @@ -249,87 +249,94 @@ <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/bottom_constraint_layout_item_post_detail_gallery" android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="wrap_content" + android:paddingStart="8dp" + android:paddingEnd="8dp"> - <ImageView - android:id="@+id/plus_button_item_post_detail_gallery" - android:layout_width="wrap_content" + <com.google.android.material.button.MaterialButtonToggleGroup + android:id="@+id/vote_button_toggle_item_post_detail_gallery" + android:layout_width="0dp" android:layout_height="wrap_content" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - android:padding="12dp" - android:src="@drawable/ic_arrow_upward_grey_24dp" - app:layout_constraintBottom_toBottomOf="parent" + app:singleSelection="true" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" /> - - <TextView - android:id="@+id/score_text_view_item_post_detail_gallery" - android:layout_width="64dp" - android:layout_height="wrap_content" - android:fontFamily="?attr/font_family" - android:gravity="center" - android:textSize="?attr/font_12" - android:textStyle="bold" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/plus_button_item_post_detail_gallery" - app:layout_constraintTop_toTopOf="parent" /> - - <ImageView - android:id="@+id/minus_button_item_post_detail_gallery" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - android:padding="12dp" - android:src="@drawable/ic_arrow_downward_grey_24dp" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/score_text_view_item_post_detail_gallery" - app:layout_constraintTop_toTopOf="parent" /> - - <TextView - android:id="@+id/comments_count_item_post_detail_gallery" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent"> + + <com.google.android.material.button.MaterialButton + style="?attr/materialButtonOutlinedStyle" + android:id="@+id/upvote_button_item_post_detail_gallery" + android:layout_width="wrap_content" + android:layout_height="match_parent" + 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_upvote_24dp" + app:iconSize="24dp" + android:backgroundTint="#00000000" /> + + <com.google.android.material.button.MaterialButton + style="?attr/materialButtonOutlinedStyle" + android:id="@+id/downvote_button_item_post_detail_gallery" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:minWidth="0dp" + app:strokeWidth="0dp" + app:icon="@drawable/ic_downvote_24dp" + app:iconSize="24dp" + android:backgroundTint="#00000000" /> + + </com.google.android.material.button.MaterialButtonToggleGroup> + + <com.google.android.material.button.MaterialButton + android:id="@+id/comments_count_button_item_post_detail_gallery" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:drawableStart="@drawable/ic_comment_grey_24dp" - android:drawablePadding="12dp" - android:fontFamily="?attr/font_family" - android:gravity="center_vertical" - android:padding="12dp" + 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_comment_grey_24dp" + app:iconTint="@null" + app:iconSize="24dp" + app:iconPadding="12dp" + app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/minus_button_item_post_detail_gallery" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintStart_toEndOf="@id/vote_button_toggle_item_post_detail_gallery" + style="?attr/materialIconButtonOutlinedStyle" /> - <ImageView + <com.google.android.material.button.MaterialButton android:id="@+id/save_button_item_post_detail_gallery" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - android:padding="12dp" + app:strokeWidth="0dp" + app:iconSize="24dp" + app:layout_constraintHorizontal_bias="1" + app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@id/comments_count_button_item_post_detail_gallery" app:layout_constraintEnd_toStartOf="@id/share_button_item_post_detail_gallery" - app:layout_constraintHorizontal_bias="1" - app:layout_constraintStart_toEndOf="@id/comments_count_item_post_detail_gallery" - app:layout_constraintTop_toTopOf="parent" /> + style="?attr/materialIconButtonOutlinedStyle" /> - <ImageView + <com.google.android.material.button.MaterialButton android:id="@+id/share_button_item_post_detail_gallery" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - android:padding="12dp" - android:src="@drawable/ic_share_grey_24dp" + app:strokeWidth="0dp" + app:icon="@drawable/ic_share_grey_24dp" + app:iconSize="24dp" + app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintTop_toTopOf="parent" /> + style="?attr/materialIconButtonOutlinedStyle" /> </androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/item_post_detail_image_and_gif_autoplay.xml b/app/src/main/res/layout/item_post_detail_image_and_gif_autoplay.xml index 900ce5d1..b71ae921 100644 --- a/app/src/main/res/layout/item_post_detail_image_and_gif_autoplay.xml +++ b/app/src/main/res/layout/item_post_detail_image_and_gif_autoplay.xml @@ -252,89 +252,96 @@ android:nestedScrollingEnabled="false" /> <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/bottom_constraint_layout_item_post_detail_image_and_gif_autoplay" android:layout_width="match_parent" android:layout_height="wrap_content" - android:id="@+id/bottom_constraint_layout_item_post_detail_image_and_gif_autoplay"> + android:paddingStart="8dp" + android:paddingEnd="8dp"> - <ImageView - android:id="@+id/plus_button_item_post_detail_image_and_gif_autoplay" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_arrow_upward_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toStartOf="parent" /> - - <TextView - android:id="@+id/score_text_view_item_post_detail_image_and_gif_autoplay" - android:layout_width="64dp" - android:layout_height="wrap_content" - android:gravity="center" - android:textSize="?attr/font_12" - android:textStyle="bold" - android:fontFamily="?attr/font_family" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/plus_button_item_post_detail_image_and_gif_autoplay" /> - - <ImageView - android:id="@+id/minus_button_item_post_detail_image_and_gif_autoplay" - android:layout_width="wrap_content" + <com.google.android.material.button.MaterialButtonToggleGroup + android:id="@+id/vote_button_toggle_item_post_detail_image_and_gif_autoplay" + android:layout_width="0dp" android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_arrow_downward_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" + app:singleSelection="true" + app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/score_text_view_item_post_detail_image_and_gif_autoplay" /> + app:layout_constraintBottom_toBottomOf="parent"> - <TextView - android:id="@+id/comments_count_item_post_detail_image_and_gif_autoplay" + <com.google.android.material.button.MaterialButton + style="?attr/materialButtonOutlinedStyle" + android:id="@+id/upvote_button_item_post_detail_image_and_gif_autoplay" + android:layout_width="wrap_content" + android:layout_height="match_parent" + 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_upvote_24dp" + app:iconSize="24dp" + android:backgroundTint="#00000000" /> + + <com.google.android.material.button.MaterialButton + style="?attr/materialButtonOutlinedStyle" + android:id="@+id/downvote_button_item_post_detail_image_and_gif_autoplay" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:minWidth="0dp" + app:strokeWidth="0dp" + app:icon="@drawable/ic_downvote_24dp" + app:iconSize="24dp" + android:backgroundTint="#00000000" /> + + </com.google.android.material.button.MaterialButtonToggleGroup> + + <com.google.android.material.button.MaterialButton + android:id="@+id/comments_count_button_item_post_detail_image_and_gif_autoplay" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="12dp" - android:gravity="center_vertical" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:minWidth="0dp" android:textSize="?attr/font_12" android:textStyle="bold" android:fontFamily="?attr/font_family" - android:drawableStart="@drawable/ic_comment_grey_24dp" - android:drawablePadding="12dp" + app:strokeWidth="0dp" + app:icon="@drawable/ic_comment_grey_24dp" + app:iconTint="@null" + app:iconSize="24dp" + app:iconPadding="12dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/minus_button_item_post_detail_image_and_gif_autoplay" /> + app:layout_constraintStart_toEndOf="@id/vote_button_toggle_item_post_detail_image_and_gif_autoplay" + style="?attr/materialIconButtonOutlinedStyle" /> - <ImageView + <com.google.android.material.button.MaterialButton android:id="@+id/save_button_item_post_detail_image_and_gif_autoplay" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="12dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" + app:strokeWidth="0dp" + app:iconSize="24dp" app:layout_constraintHorizontal_bias="1" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/comments_count_item_post_detail_image_and_gif_autoplay" - app:layout_constraintEnd_toStartOf="@id/share_button_item_post_detail_image_and_gif_autoplay" /> + app:layout_constraintStart_toEndOf="@id/comments_count_button_item_post_detail_image_and_gif_autoplay" + app:layout_constraintEnd_toStartOf="@id/share_button_item_post_detail_image_and_gif_autoplay" + style="?attr/materialIconButtonOutlinedStyle" /> - <ImageView + <com.google.android.material.button.MaterialButton android:id="@+id/share_button_item_post_detail_image_and_gif_autoplay" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_share_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" + app:strokeWidth="0dp" + app:icon="@drawable/ic_share_grey_24dp" + app:iconSize="24dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" /> + app:layout_constraintEnd_toEndOf="parent" + style="?attr/materialIconButtonOutlinedStyle" /> </androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/item_post_detail_link.xml b/app/src/main/res/layout/item_post_detail_link.xml index a6299212..4074f4b4 100644 --- a/app/src/main/res/layout/item_post_detail_link.xml +++ b/app/src/main/res/layout/item_post_detail_link.xml @@ -262,89 +262,96 @@ android:nestedScrollingEnabled="false" /> <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/bottom_constraint_layout_item_post_detail_link" android:layout_width="match_parent" android:layout_height="wrap_content" - android:id="@+id/bottom_constraint_layout_item_post_detail_link"> + android:paddingStart="8dp" + android:paddingEnd="8dp"> - <ImageView - android:id="@+id/plus_button_item_post_detail_link" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_arrow_upward_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toStartOf="parent" /> - - <TextView - android:id="@+id/score_text_view_item_post_detail_link" - android:layout_width="64dp" - android:layout_height="wrap_content" - android:gravity="center" - android:textSize="?attr/font_12" - android:textStyle="bold" - android:fontFamily="?attr/font_family" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/plus_button_item_post_detail_link" /> - - <ImageView - android:id="@+id/minus_button_item_post_detail_link" - android:layout_width="wrap_content" + <com.google.android.material.button.MaterialButtonToggleGroup + android:id="@+id/vote_button_toggle_item_post_detail_link" + android:layout_width="0dp" android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_arrow_downward_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" + app:singleSelection="true" + app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/score_text_view_item_post_detail_link" /> + app:layout_constraintBottom_toBottomOf="parent"> - <TextView - android:id="@+id/comments_count_item_post_detail_link" + <com.google.android.material.button.MaterialButton + style="?attr/materialButtonOutlinedStyle" + android:id="@+id/upvote_button_item_post_detail_link" + android:layout_width="wrap_content" + android:layout_height="match_parent" + 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_upvote_24dp" + app:iconSize="24dp" + android:backgroundTint="#00000000" /> + + <com.google.android.material.button.MaterialButton + style="?attr/materialButtonOutlinedStyle" + android:id="@+id/downvote_button_item_post_detail_link" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:minWidth="0dp" + app:strokeWidth="0dp" + app:icon="@drawable/ic_downvote_24dp" + app:iconSize="24dp" + android:backgroundTint="#00000000" /> + + </com.google.android.material.button.MaterialButtonToggleGroup> + + <com.google.android.material.button.MaterialButton + android:id="@+id/comments_count_button_item_post_detail_link" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="12dp" - android:gravity="center_vertical" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:minWidth="0dp" android:textSize="?attr/font_12" android:textStyle="bold" android:fontFamily="?attr/font_family" - android:drawableStart="@drawable/ic_comment_grey_24dp" - android:drawablePadding="12dp" + app:strokeWidth="0dp" + app:icon="@drawable/ic_comment_grey_24dp" + app:iconTint="@null" + app:iconSize="24dp" + app:iconPadding="12dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/minus_button_item_post_detail_link" /> + app:layout_constraintStart_toEndOf="@id/vote_button_toggle_item_post_detail_link" + style="?attr/materialIconButtonOutlinedStyle" /> - <ImageView + <com.google.android.material.button.MaterialButton android:id="@+id/save_button_item_post_detail_link" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="12dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" + app:strokeWidth="0dp" + app:iconSize="24dp" app:layout_constraintHorizontal_bias="1" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/comments_count_item_post_detail_link" - app:layout_constraintEnd_toStartOf="@id/share_button_item_post_detail_link" /> + app:layout_constraintStart_toEndOf="@id/comments_count_button_item_post_detail_link" + app:layout_constraintEnd_toStartOf="@id/share_button_item_post_detail_link" + style="?attr/materialIconButtonOutlinedStyle" /> - <ImageView + <com.google.android.material.button.MaterialButton android:id="@+id/share_button_item_post_detail_link" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_share_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" + app:strokeWidth="0dp" + app:icon="@drawable/ic_share_grey_24dp" + app:iconSize="24dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" /> + app:layout_constraintEnd_toEndOf="parent" + style="?attr/materialIconButtonOutlinedStyle" /> </androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/item_post_detail_no_preview.xml b/app/src/main/res/layout/item_post_detail_no_preview.xml index e96a45a3..b460f0d7 100644 --- a/app/src/main/res/layout/item_post_detail_no_preview.xml +++ b/app/src/main/res/layout/item_post_detail_no_preview.xml @@ -8,13 +8,13 @@ android:background="?attr/cardViewBackgroundColor"> <androidx.constraintlayout.widget.ConstraintLayout - android:id="@+id/constraint_layout_item_post_detail_no_preview_link" + android:id="@+id/constraint_layout_item_post_detail_no_preview" android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="16dp"> <ml.docilealligator.infinityforreddit.customviews.AspectRatioGifImageView - android:id="@+id/icon_gif_image_view_item_post_detail_no_preview_link" + android:id="@+id/icon_gif_image_view_item_post_detail_no_preview" android:layout_width="24dp" android:layout_height="24dp" app:layout_constraintBottom_toBottomOf="parent" @@ -22,36 +22,36 @@ app:layout_constraintTop_toTopOf="parent" /> <TextView - android:id="@+id/subreddit_text_view_item_post_detail_no_preview_link" + android:id="@+id/subreddit_text_view_item_post_detail_no_preview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="16dp" android:layout_marginEnd="8dp" android:textSize="?attr/font_default" android:fontFamily="?attr/font_family" - app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_no_preview_link" + app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_no_preview" app:layout_constraintEnd_toStartOf="@id/guideline" app:layout_constraintTop_toTopOf="parent" app:layout_constraintHorizontal_bias="0" app:layout_constrainedWidth="true" /> <TextView - android:id="@+id/user_text_view_item_post_detail_no_preview_link" + android:id="@+id/user_text_view_item_post_detail_no_preview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="16dp" android:layout_marginEnd="8dp" android:textSize="?attr/font_default" android:fontFamily="?attr/font_family" - app:layout_constraintBottom_toTopOf="@+id/author_flair_text_view_item_post_detail_no_preview_link" - app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_no_preview_link" + app:layout_constraintBottom_toTopOf="@+id/author_flair_text_view_item_post_detail_no_preview" + app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_no_preview" app:layout_constraintEnd_toStartOf="@id/guideline" - app:layout_constraintTop_toBottomOf="@+id/subreddit_text_view_item_post_detail_no_preview_link" + app:layout_constraintTop_toBottomOf="@+id/subreddit_text_view_item_post_detail_no_preview" app:layout_constraintHorizontal_bias="0" app:layout_constrainedWidth="true"/> <TextView - android:id="@+id/author_flair_text_view_item_post_detail_no_preview_link" + android:id="@+id/author_flair_text_view_item_post_detail_no_preview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="16dp" @@ -60,15 +60,15 @@ android:fontFamily="?attr/font_family" android:visibility="gone" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_no_preview_link" + app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_no_preview" app:layout_constraintEnd_toStartOf="@id/guideline" - app:layout_constraintTop_toBottomOf="@+id/user_text_view_item_post_detail_no_preview_link" + app:layout_constraintTop_toBottomOf="@+id/user_text_view_item_post_detail_no_preview" app:layout_constraintHorizontal_bias="0" app:layout_constrainedWidth="true" tools:visibility="visible" /> <TextView - android:id="@+id/post_time_text_view_item_post_detail_no_preview_link" + android:id="@+id/post_time_text_view_item_post_detail_no_preview" android:layout_width="0dp" android:layout_height="wrap_content" android:gravity="end" @@ -90,7 +90,7 @@ </androidx.constraintlayout.widget.ConstraintLayout> <TextView - android:id="@+id/title_text_view_item_post_detail_no_preview_link" + android:id="@+id/title_text_view_item_post_detail_no_preview" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingStart="16dp" @@ -104,7 +104,7 @@ android:longClickable="true" /> <androidx.recyclerview.widget.RecyclerView - android:id="@+id/content_markdown_view_item_post_detail_no_preview_link" + android:id="@+id/content_markdown_view_item_post_detail_no_preview" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="8dp" @@ -123,7 +123,7 @@ app:flRowVerticalGravity="center"> <com.libRG.CustomTextView - android:id="@+id/type_text_view_item_post_detail_no_preview_link" + android:id="@+id/type_text_view_item_post_detail_no_preview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="4dp" @@ -135,7 +135,7 @@ app:lib_setShape="rectangle" /> <com.libRG.CustomTextView - android:id="@+id/spoiler_custom_text_view_item_post_detail_no_preview_link" + android:id="@+id/spoiler_custom_text_view_item_post_detail_no_preview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" @@ -149,7 +149,7 @@ app:lib_setShape="rectangle" /> <com.libRG.CustomTextView - android:id="@+id/nsfw_text_view_item_post_detail_no_preview_link" + android:id="@+id/nsfw_text_view_item_post_detail_no_preview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="4dp" @@ -162,7 +162,7 @@ app:lib_setShape="rectangle" /> <com.libRG.CustomTextView - android:id="@+id/flair_custom_text_view_item_post_detail_no_preview_link" + android:id="@+id/flair_custom_text_view_item_post_detail_no_preview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" @@ -175,35 +175,35 @@ app:lib_setShape="rectangle" /> <TextView - android:id="@+id/upvote_ratio_text_view_item_post_detail_no_preview_link" + android:id="@+id/upvote_ratio_text_view_item_post_detail_no_preview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="?attr/font_12" android:fontFamily="?attr/font_family" /> <ImageView - android:id="@+id/archived_image_view_item_post_detail_no_preview_link" + android:id="@+id/archived_image_view_item_post_detail_no_preview" android:layout_width="20dp" android:layout_height="20dp" android:src="@drawable/ic_archive_outline" android:visibility="gone" /> <ImageView - android:id="@+id/locked_image_view_item_post_detail_no_preview_link" + android:id="@+id/locked_image_view_item_post_detail_no_preview" android:layout_width="20dp" android:layout_height="20dp" android:src="@drawable/ic_outline_lock_24dp" android:visibility="gone" /> <ImageView - android:id="@+id/crosspost_image_view_item_post_detail_no_preview_link" + android:id="@+id/crosspost_image_view_item_post_detail_no_preview" android:layout_width="20dp" android:layout_height="20dp" android:src="@drawable/crosspost" android:visibility="gone" /> <TextView - android:id="@+id/awards_text_view_item_post_detail_no_preview_link" + android:id="@+id/awards_text_view_item_post_detail_no_preview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="?attr/font_12" @@ -213,7 +213,7 @@ </com.nex3z.flowlayout.FlowLayout> <TextView - android:id="@+id/link_text_view_item_post_detail_no_preview_link" + android:id="@+id/link_text_view_item_post_detail_no_preview" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="16dp" @@ -223,95 +223,102 @@ android:fontFamily="?attr/font_family" /> <ImageView - android:id="@+id/image_view_no_preview_post_type_item_post_detail_no_preview_link" + android:id="@+id/image_view_no_preview_post_type_item_post_detail_no_preview" android:layout_width="match_parent" android:layout_height="150dp" android:scaleType="center" /> <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/bottom_constraint_layout_item_post_detail_no_preview" android:layout_width="match_parent" android:layout_height="wrap_content" - android:id="@+id/bottom_constraint_layout_item_post_detail_no_preview_link"> + android:paddingStart="8dp" + android:paddingEnd="8dp"> - <ImageView - android:id="@+id/plus_button_item_post_detail_no_preview_link" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_arrow_upward_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toStartOf="parent" /> - - <TextView - android:id="@+id/score_text_view_item_post_detail_no_preview_link" - android:layout_width="64dp" - android:layout_height="wrap_content" - android:gravity="center" - android:textSize="?attr/font_12" - android:textStyle="bold" - android:fontFamily="?attr/font_family" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/plus_button_item_post_detail_no_preview_link" /> - - <ImageView - android:id="@+id/minus_button_item_post_detail_no_preview_link" - android:layout_width="wrap_content" + <com.google.android.material.button.MaterialButtonToggleGroup + android:id="@+id/vote_button_toggle_item_post_detail_no_preview" + android:layout_width="0dp" android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_arrow_downward_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" + app:singleSelection="true" + app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/score_text_view_item_post_detail_no_preview_link" /> - - <TextView - android:id="@+id/comments_count_item_post_detail_no_preview_link" + app:layout_constraintBottom_toBottomOf="parent"> + + <com.google.android.material.button.MaterialButton + style="?attr/materialButtonOutlinedStyle" + android:id="@+id/upvote_button_item_post_detail_no_preview" + android:layout_width="wrap_content" + android:layout_height="match_parent" + 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_upvote_24dp" + app:iconSize="24dp" + android:backgroundTint="#00000000" /> + + <com.google.android.material.button.MaterialButton + style="?attr/materialButtonOutlinedStyle" + android:id="@+id/downvote_button_item_post_detail_no_preview" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:minWidth="0dp" + app:strokeWidth="0dp" + app:icon="@drawable/ic_downvote_24dp" + app:iconSize="24dp" + android:backgroundTint="#00000000" /> + + </com.google.android.material.button.MaterialButtonToggleGroup> + + <com.google.android.material.button.MaterialButton + android:id="@+id/comments_count_button_item_post_detail_no_preview" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="12dp" - android:gravity="center_vertical" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:minWidth="0dp" android:textSize="?attr/font_12" android:textStyle="bold" android:fontFamily="?attr/font_family" - android:drawableStart="@drawable/ic_comment_grey_24dp" - android:drawablePadding="12dp" + app:strokeWidth="0dp" + app:icon="@drawable/ic_comment_grey_24dp" + app:iconTint="@null" + app:iconSize="24dp" + app:iconPadding="12dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/minus_button_item_post_detail_no_preview_link" /> + app:layout_constraintStart_toEndOf="@id/vote_button_toggle_item_post_detail_no_preview" + style="?attr/materialIconButtonOutlinedStyle" /> - <ImageView - android:id="@+id/save_button_item_post_detail_no_preview_link" + <com.google.android.material.button.MaterialButton + android:id="@+id/save_button_item_post_detail_no_preview" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="12dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" + app:strokeWidth="0dp" + app:iconSize="24dp" app:layout_constraintHorizontal_bias="1" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/comments_count_item_post_detail_no_preview_link" - app:layout_constraintEnd_toStartOf="@id/share_button_item_post_detail_no_preview_link" /> + app:layout_constraintStart_toEndOf="@id/comments_count_button_item_post_detail_no_preview" + app:layout_constraintEnd_toStartOf="@id/share_button_item_post_detail_no_preview" + style="?attr/materialIconButtonOutlinedStyle" /> - <ImageView - android:id="@+id/share_button_item_post_detail_no_preview_link" + <com.google.android.material.button.MaterialButton + android:id="@+id/share_button_item_post_detail_no_preview" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_share_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" + app:strokeWidth="0dp" + app:icon="@drawable/ic_share_grey_24dp" + app:iconSize="24dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" /> + app:layout_constraintEnd_toEndOf="parent" + style="?attr/materialIconButtonOutlinedStyle" /> </androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/item_post_detail_text.xml b/app/src/main/res/layout/item_post_detail_text.xml index 936ef740..625a598d 100644 --- a/app/src/main/res/layout/item_post_detail_text.xml +++ b/app/src/main/res/layout/item_post_detail_text.xml @@ -213,89 +213,96 @@ </com.nex3z.flowlayout.FlowLayout> <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/bottom_constraint_layout_item_post_detail_text" android:layout_width="match_parent" android:layout_height="wrap_content" - android:id="@+id/bottom_constraint_layout_item_post_detail_text"> + android:paddingStart="8dp" + android:paddingEnd="8dp"> - <ImageView - android:id="@+id/plus_button_item_post_detail_text" - android:layout_width="wrap_content" + <com.google.android.material.button.MaterialButtonToggleGroup + android:id="@+id/vote_button_toggle_item_post_detail_text" + android:layout_width="0dp" android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_arrow_upward_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" + app:singleSelection="true" + app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toStartOf="parent" /> + app:layout_constraintBottom_toBottomOf="parent"> - <TextView - android:id="@+id/score_text_view_item_post_detail_text" - android:layout_width="64dp" - android:layout_height="wrap_content" - android:gravity="center" - android:textSize="?attr/font_12" - android:textStyle="bold" - android:fontFamily="?attr/font_family" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/plus_button_item_post_detail_text" /> + <com.google.android.material.button.MaterialButton + style="?attr/materialButtonOutlinedStyle" + android:id="@+id/upvote_button_item_post_detail_text" + android:layout_width="wrap_content" + android:layout_height="match_parent" + 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_upvote_24dp" + app:iconSize="24dp" + android:backgroundTint="#00000000" /> - <ImageView - android:id="@+id/minus_button_item_post_detail_text" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_arrow_downward_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/score_text_view_item_post_detail_text" /> + <com.google.android.material.button.MaterialButton + style="?attr/materialButtonOutlinedStyle" + android:id="@+id/downvote_button_item_post_detail_text" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:minWidth="0dp" + app:strokeWidth="0dp" + app:icon="@drawable/ic_downvote_24dp" + app:iconSize="24dp" + android:backgroundTint="#00000000" /> - <TextView - android:id="@+id/comments_count_item_post_detail_text" + </com.google.android.material.button.MaterialButtonToggleGroup> + + <com.google.android.material.button.MaterialButton + android:id="@+id/comments_count_button_item_post_detail_text" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="12dp" - android:gravity="center_vertical" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:minWidth="0dp" android:textSize="?attr/font_12" android:textStyle="bold" android:fontFamily="?attr/font_family" - android:drawableStart="@drawable/ic_comment_grey_24dp" - android:drawablePadding="12dp" + app:strokeWidth="0dp" + app:icon="@drawable/ic_comment_grey_24dp" + app:iconTint="@null" + app:iconSize="24dp" + app:iconPadding="12dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/minus_button_item_post_detail_text" /> + app:layout_constraintStart_toEndOf="@id/vote_button_toggle_item_post_detail_text" + style="?attr/materialIconButtonOutlinedStyle" /> - <ImageView + <com.google.android.material.button.MaterialButton android:id="@+id/save_button_item_post_detail_text" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="12dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" + app:strokeWidth="0dp" + app:iconSize="24dp" app:layout_constraintHorizontal_bias="1" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/comments_count_item_post_detail_text" - app:layout_constraintEnd_toStartOf="@id/share_button_item_post_detail_text" /> + app:layout_constraintStart_toEndOf="@id/comments_count_button_item_post_detail_text" + app:layout_constraintEnd_toStartOf="@id/share_button_item_post_detail_text" + style="?attr/materialIconButtonOutlinedStyle" /> - <ImageView + <com.google.android.material.button.MaterialButton android:id="@+id/share_button_item_post_detail_text" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_share_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" + app:strokeWidth="0dp" + app:icon="@drawable/ic_share_grey_24dp" + app:iconSize="24dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" /> + app:layout_constraintEnd_toEndOf="parent" + style="?attr/materialIconButtonOutlinedStyle" /> </androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/item_post_detail_video_and_gif_preview.xml b/app/src/main/res/layout/item_post_detail_video_and_gif_preview.xml index f1d84e27..8a7c8044 100644 --- a/app/src/main/res/layout/item_post_detail_video_and_gif_preview.xml +++ b/app/src/main/res/layout/item_post_detail_video_and_gif_preview.xml @@ -265,89 +265,96 @@ android:nestedScrollingEnabled="false" /> <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/bottom_constraint_layout_item_post_detail_video_and_gif_preview" android:layout_width="match_parent" android:layout_height="wrap_content" - android:id="@+id/bottom_constraint_layout_item_post_detail_video_and_gif_preview"> + android:paddingStart="8dp" + android:paddingEnd="8dp"> - <ImageView - android:id="@+id/plus_button_item_post_detail_video_and_gif_preview" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_arrow_upward_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toStartOf="parent" /> - - <TextView - android:id="@+id/score_text_view_item_post_detail_video_and_gif_preview" - android:layout_width="64dp" - android:layout_height="wrap_content" - android:gravity="center" - android:textSize="?attr/font_12" - android:textStyle="bold" - android:fontFamily="?attr/font_family" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/plus_button_item_post_detail_video_and_gif_preview" /> - - <ImageView - android:id="@+id/minus_button_item_post_detail_video_and_gif_preview" - android:layout_width="wrap_content" + <com.google.android.material.button.MaterialButtonToggleGroup + android:id="@+id/vote_button_toggle_item_post_detail_video_and_gif_preview" + android:layout_width="0dp" android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_arrow_downward_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" + app:singleSelection="true" + app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/score_text_view_item_post_detail_video_and_gif_preview" /> + app:layout_constraintBottom_toBottomOf="parent"> - <TextView - android:id="@+id/comments_count_item_post_detail_video_and_gif_preview" + <com.google.android.material.button.MaterialButton + style="?attr/materialButtonOutlinedStyle" + android:id="@+id/upvote_button_item_post_detail_video_and_gif_preview" + android:layout_width="wrap_content" + android:layout_height="match_parent" + 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_upvote_24dp" + app:iconSize="24dp" + android:backgroundTint="#00000000" /> + + <com.google.android.material.button.MaterialButton + style="?attr/materialButtonOutlinedStyle" + android:id="@+id/downvote_button_item_post_detail_video_and_gif_preview" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:minWidth="0dp" + app:strokeWidth="0dp" + app:icon="@drawable/ic_downvote_24dp" + app:iconSize="24dp" + android:backgroundTint="#00000000" /> + + </com.google.android.material.button.MaterialButtonToggleGroup> + + <com.google.android.material.button.MaterialButton + android:id="@+id/comments_count_button_item_post_detail_video_and_gif_preview" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="12dp" - android:gravity="center_vertical" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:minWidth="0dp" android:textSize="?attr/font_12" android:textStyle="bold" android:fontFamily="?attr/font_family" - android:drawableStart="@drawable/ic_comment_grey_24dp" - android:drawablePadding="12dp" + app:strokeWidth="0dp" + app:icon="@drawable/ic_comment_grey_24dp" + app:iconTint="@null" + app:iconSize="24dp" + app:iconPadding="12dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/minus_button_item_post_detail_video_and_gif_preview" /> + app:layout_constraintStart_toEndOf="@id/vote_button_toggle_item_post_detail_video_and_gif_preview" + style="?attr/materialIconButtonOutlinedStyle" /> - <ImageView + <com.google.android.material.button.MaterialButton android:id="@+id/save_button_item_post_detail_video_and_gif_preview" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="12dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" + app:strokeWidth="0dp" + app:iconSize="24dp" app:layout_constraintHorizontal_bias="1" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/comments_count_item_post_detail_video_and_gif_preview" - app:layout_constraintEnd_toStartOf="@id/share_button_item_post_detail_video_and_gif_preview" /> + app:layout_constraintStart_toEndOf="@id/comments_count_button_item_post_detail_video_and_gif_preview" + app:layout_constraintEnd_toStartOf="@id/share_button_item_post_detail_video_and_gif_preview" + style="?attr/materialIconButtonOutlinedStyle" /> - <ImageView + <com.google.android.material.button.MaterialButton android:id="@+id/share_button_item_post_detail_video_and_gif_preview" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_share_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" + app:strokeWidth="0dp" + app:icon="@drawable/ic_share_grey_24dp" + app:iconSize="24dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" /> + app:layout_constraintEnd_toEndOf="parent" + style="?attr/materialIconButtonOutlinedStyle" /> </androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/item_post_detail_video_autoplay.xml b/app/src/main/res/layout/item_post_detail_video_autoplay.xml index d4818d41..69af5ffd 100644 --- a/app/src/main/res/layout/item_post_detail_video_autoplay.xml +++ b/app/src/main/res/layout/item_post_detail_video_autoplay.xml @@ -246,89 +246,96 @@ android:nestedScrollingEnabled="false" /> <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/bottom_constraint_layout_item_post_detail_video_autoplay" android:layout_width="match_parent" android:layout_height="wrap_content" - android:id="@+id/bottom_constraint_layout_item_post_detail_video_autoplay"> + android:paddingStart="8dp" + android:paddingEnd="8dp"> - <ImageView - android:id="@+id/plus_button_item_post_detail_video_autoplay" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_arrow_upward_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toStartOf="parent" /> - - <TextView - android:id="@+id/score_text_view_item_post_detail_video_autoplay" - android:layout_width="64dp" - android:layout_height="wrap_content" - android:gravity="center" - android:textSize="?attr/font_12" - android:textStyle="bold" - android:fontFamily="?attr/font_family" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/plus_button_item_post_detail_video_autoplay" /> - - <ImageView - android:id="@+id/minus_button_item_post_detail_video_autoplay" - android:layout_width="wrap_content" + <com.google.android.material.button.MaterialButtonToggleGroup + android:id="@+id/vote_button_toggle_item_post_detail_video_autoplay" + android:layout_width="0dp" android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_arrow_downward_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" + app:singleSelection="true" + app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/score_text_view_item_post_detail_video_autoplay" /> - - <TextView - android:id="@+id/comments_count_item_post_detail_video_autoplay" + app:layout_constraintBottom_toBottomOf="parent"> + + <com.google.android.material.button.MaterialButton + style="?attr/materialButtonOutlinedStyle" + android:id="@+id/upvote_button_item_post_detail_video_autoplay" + android:layout_width="wrap_content" + android:layout_height="match_parent" + 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_upvote_24dp" + app:iconSize="24dp" + android:backgroundTint="#00000000" /> + + <com.google.android.material.button.MaterialButton + style="?attr/materialButtonOutlinedStyle" + android:id="@+id/downvote_button_item_post_detail_video_autoplay" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:minWidth="0dp" + app:strokeWidth="0dp" + app:icon="@drawable/ic_downvote_24dp" + app:iconSize="24dp" + android:backgroundTint="#00000000" /> + + </com.google.android.material.button.MaterialButtonToggleGroup> + + <com.google.android.material.button.MaterialButton + android:id="@+id/comments_count_button_item_post_detail_video_autoplay" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="12dp" - android:gravity="center_vertical" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:minWidth="0dp" android:textSize="?attr/font_12" android:textStyle="bold" android:fontFamily="?attr/font_family" - android:drawableStart="@drawable/ic_comment_grey_24dp" - android:drawablePadding="12dp" + app:strokeWidth="0dp" + app:icon="@drawable/ic_comment_grey_24dp" + app:iconTint="@null" + app:iconSize="24dp" + app:iconPadding="12dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/minus_button_item_post_detail_video_autoplay" /> + app:layout_constraintStart_toEndOf="@id/vote_button_toggle_item_post_detail_video_autoplay" + style="?attr/materialIconButtonOutlinedStyle" /> - <ImageView + <com.google.android.material.button.MaterialButton android:id="@+id/save_button_item_post_detail_video_autoplay" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="12dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" + app:strokeWidth="0dp" + app:iconSize="24dp" app:layout_constraintHorizontal_bias="1" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/comments_count_item_post_detail_video_autoplay" - app:layout_constraintEnd_toStartOf="@id/share_button_item_post_detail_video_autoplay" /> + app:layout_constraintStart_toEndOf="@id/comments_count_button_item_post_detail_video_autoplay" + app:layout_constraintEnd_toStartOf="@id/share_button_item_post_detail_video_autoplay" + style="?attr/materialIconButtonOutlinedStyle" /> - <ImageView + <com.google.android.material.button.MaterialButton android:id="@+id/share_button_item_post_detail_video_autoplay" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_share_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" + app:strokeWidth="0dp" + app:icon="@drawable/ic_share_grey_24dp" + app:iconSize="24dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" /> + app:layout_constraintEnd_toEndOf="parent" + style="?attr/materialIconButtonOutlinedStyle" /> </androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/item_post_detail_video_autoplay_legacy_controller.xml b/app/src/main/res/layout/item_post_detail_video_autoplay_legacy_controller.xml index c21efc56..36400f28 100644 --- a/app/src/main/res/layout/item_post_detail_video_autoplay_legacy_controller.xml +++ b/app/src/main/res/layout/item_post_detail_video_autoplay_legacy_controller.xml @@ -247,89 +247,96 @@ android:nestedScrollingEnabled="false" /> <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/bottom_constraint_layout_item_post_detail_video_autoplay" android:layout_width="match_parent" android:layout_height="wrap_content" - android:id="@+id/bottom_constraint_layout_item_post_detail_video_autoplay"> + android:paddingStart="8dp" + android:paddingEnd="8dp"> - <ImageView - android:id="@+id/plus_button_item_post_detail_video_autoplay" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_arrow_upward_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toStartOf="parent" /> - - <TextView - android:id="@+id/score_text_view_item_post_detail_video_autoplay" - android:layout_width="64dp" - android:layout_height="wrap_content" - android:gravity="center" - android:textSize="?attr/font_12" - android:textStyle="bold" - android:fontFamily="?attr/font_family" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/plus_button_item_post_detail_video_autoplay" /> - - <ImageView - android:id="@+id/minus_button_item_post_detail_video_autoplay" - android:layout_width="wrap_content" + <com.google.android.material.button.MaterialButtonToggleGroup + android:id="@+id/vote_button_toggle_item_post_detail_video_autoplay" + android:layout_width="0dp" android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_arrow_downward_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" + app:singleSelection="true" + app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/score_text_view_item_post_detail_video_autoplay" /> - - <TextView - android:id="@+id/comments_count_item_post_detail_video_autoplay" + app:layout_constraintBottom_toBottomOf="parent"> + + <com.google.android.material.button.MaterialButton + style="?attr/materialButtonOutlinedStyle" + android:id="@+id/upvote_button_item_post_detail_video_autoplay" + android:layout_width="wrap_content" + android:layout_height="match_parent" + 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_upvote_24dp" + app:iconSize="24dp" + android:backgroundTint="#00000000" /> + + <com.google.android.material.button.MaterialButton + style="?attr/materialButtonOutlinedStyle" + android:id="@+id/downvote_button_item_post_detail_video_autoplay" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:minWidth="0dp" + app:strokeWidth="0dp" + app:icon="@drawable/ic_downvote_24dp" + app:iconSize="24dp" + android:backgroundTint="#00000000" /> + + </com.google.android.material.button.MaterialButtonToggleGroup> + + <com.google.android.material.button.MaterialButton + android:id="@+id/comments_count_button_item_post_detail_video_autoplay" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="12dp" - android:gravity="center_vertical" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:minWidth="0dp" android:textSize="?attr/font_12" android:textStyle="bold" android:fontFamily="?attr/font_family" - android:drawableStart="@drawable/ic_comment_grey_24dp" - android:drawablePadding="12dp" + app:strokeWidth="0dp" + app:icon="@drawable/ic_comment_grey_24dp" + app:iconTint="@null" + app:iconSize="24dp" + app:iconPadding="12dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/minus_button_item_post_detail_video_autoplay" /> + app:layout_constraintStart_toEndOf="@id/vote_button_toggle_item_post_detail_video_autoplay" + style="?attr/materialIconButtonOutlinedStyle" /> - <ImageView + <com.google.android.material.button.MaterialButton android:id="@+id/save_button_item_post_detail_video_autoplay" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="12dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" + app:strokeWidth="0dp" + app:iconSize="24dp" app:layout_constraintHorizontal_bias="1" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/comments_count_item_post_detail_video_autoplay" - app:layout_constraintEnd_toStartOf="@id/share_button_item_post_detail_video_autoplay" /> + app:layout_constraintStart_toEndOf="@id/comments_count_button_item_post_detail_video_autoplay" + app:layout_constraintEnd_toStartOf="@id/share_button_item_post_detail_video_autoplay" + style="?attr/materialIconButtonOutlinedStyle" /> - <ImageView + <com.google.android.material.button.MaterialButton android:id="@+id/share_button_item_post_detail_video_autoplay" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_share_grey_24dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" + app:strokeWidth="0dp" + app:icon="@drawable/ic_share_grey_24dp" + app:iconSize="24dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" /> + app:layout_constraintEnd_toEndOf="parent" + style="?attr/materialIconButtonOutlinedStyle" /> </androidx.constraintlayout.widget.ConstraintLayout> |