diff options
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/layout/item_post_compact.xml | 147 | ||||
-rw-r--r-- | app/src/main/res/layout/item_post_compact_right_thumbnail.xml | 147 |
2 files changed, 136 insertions, 158 deletions
diff --git a/app/src/main/res/layout/item_post_compact.xml b/app/src/main/res/layout/item_post_compact.xml index de83f336..eda5faca 100644 --- a/app/src/main/res/layout/item_post_compact.xml +++ b/app/src/main/res/layout/item_post_compact.xml @@ -282,102 +282,91 @@ <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/bottom_constraint_layout_item_post_compact" android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="wrap_content" + android:padding="8dp"> - <ImageView - android:id="@+id/plus_button_item_post_compact" - android:layout_width="wrap_content" + <com.google.android.material.button.MaterialButtonToggleGroup + android:id="@+id/vote_button_toggle_item_post_compact" + android:layout_width="0dp" android:layout_height="wrap_content" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - android:paddingStart="12dp" - android:paddingTop="8dp" - android:paddingEnd="12dp" - android:paddingBottom="8dp" - 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" /> + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent"> - <TextView - android:id="@+id/score_text_view_item_post_compact" - android:layout_width="64dp" + <com.google.android.material.button.MaterialButton + style="?attr/materialButtonOutlinedStyle" + android:id="@+id/upvote_button_item_post_compact" + 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_compact" + 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/save_button_item_post_compact" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:fontFamily="?attr/font_family" - android:gravity="center" - android:textSize="?attr/font_12" - android:textStyle="bold" + app:strokeWidth="0dp" + app:iconSize="24dp" + app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/plus_button_item_post_compact" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintStart_toEndOf="@id/vote_button_toggle_item_post_compact" + style="?attr/materialIconButtonOutlinedStyle" /> - <ImageView - android:id="@+id/minus_button_item_post_compact" + <com.google.android.material.button.MaterialButton + android:id="@+id/share_button_item_post_compact" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - android:paddingStart="12dp" - android:paddingTop="8dp" - android:paddingEnd="12dp" - android:paddingBottom="8dp" - android:src="@drawable/ic_arrow_downward_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_constraintStart_toEndOf="@id/score_text_view_item_post_compact" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintStart_toEndOf="@id/save_button_item_post_compact" + style="?attr/materialIconButtonOutlinedStyle" /> - <TextView - android:id="@+id/comments_count_item_post_compact" + <com.google.android.material.button.MaterialButton + android:id="@+id/comments_count_button_item_post_compact" 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:paddingStart="12dp" - android:paddingTop="8dp" - android:paddingEnd="12dp" - android:paddingBottom="8dp" + 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:iconSize="24dp" + app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/minus_button_item_post_compact" - app:layout_constraintTop_toTopOf="parent" /> - - <ImageView - android:id="@+id/save_button_item_post_compact" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - android:paddingStart="12dp" - android:paddingTop="8dp" - android:paddingEnd="12dp" - android:paddingBottom="8dp" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toStartOf="@id/share_button_item_post_compact" - app:layout_constraintHorizontal_bias="1" - app:layout_constraintStart_toEndOf="@id/comments_count_item_post_compact" - app:layout_constraintTop_toTopOf="parent" /> - - <ImageView - android:id="@+id/share_button_item_post_compact" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - android:paddingStart="12dp" - android:paddingTop="8dp" - android:paddingEnd="12dp" - android:paddingBottom="8dp" - android:src="@drawable/ic_share_grey_24dp" - app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@id/share_button_item_post_compact" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintHorizontal_bias="1" + style="?attr/materialButtonOutlinedStyle" /> </androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/item_post_compact_right_thumbnail.xml b/app/src/main/res/layout/item_post_compact_right_thumbnail.xml index da3305d6..a5ea945e 100644 --- a/app/src/main/res/layout/item_post_compact_right_thumbnail.xml +++ b/app/src/main/res/layout/item_post_compact_right_thumbnail.xml @@ -279,102 +279,91 @@ <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/bottom_constraint_layout_item_post_compact_right_thumbnail" android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="wrap_content" + android:padding="8dp"> - <ImageView - android:id="@+id/plus_button_item_post_compact_right_thumbnail" - android:layout_width="wrap_content" + <com.google.android.material.button.MaterialButtonToggleGroup + android:id="@+id/vote_button_toggle_item_post_compact_right_thumbnail" + android:layout_width="0dp" android:layout_height="wrap_content" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - android:paddingStart="12dp" - android:paddingTop="8dp" - android:paddingEnd="12dp" - android:paddingBottom="8dp" - 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" /> + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent"> - <TextView - android:id="@+id/score_text_view_item_post_compact_right_thumbnail" - android:layout_width="64dp" + <com.google.android.material.button.MaterialButton + style="?attr/materialButtonOutlinedStyle" + android:id="@+id/upvote_button_item_post_compact_right_thumbnail" + 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_compact_right_thumbnail" + 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/save_button_item_post_compact_right_thumbnail" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:fontFamily="?attr/font_family" - android:gravity="center" - android:textSize="?attr/font_12" - android:textStyle="bold" + app:strokeWidth="0dp" + app:iconSize="24dp" + app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/plus_button_item_post_compact_right_thumbnail" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintStart_toEndOf="@id/vote_button_toggle_item_post_compact_right_thumbnail" + style="?attr/materialIconButtonOutlinedStyle" /> - <ImageView - android:id="@+id/minus_button_item_post_compact_right_thumbnail" + <com.google.android.material.button.MaterialButton + android:id="@+id/share_button_item_post_compact_right_thumbnail" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - android:paddingStart="12dp" - android:paddingTop="8dp" - android:paddingEnd="12dp" - android:paddingBottom="8dp" - android:src="@drawable/ic_arrow_downward_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_constraintStart_toEndOf="@id/score_text_view_item_post_compact_right_thumbnail" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintStart_toEndOf="@id/save_button_item_post_compact_right_thumbnail" + style="?attr/materialIconButtonOutlinedStyle" /> - <TextView - android:id="@+id/comments_count_item_post_compact_right_thumbnail" + <com.google.android.material.button.MaterialButton + android:id="@+id/comments_count_button_item_post_compact_right_thumbnail" 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:paddingStart="12dp" - android:paddingTop="8dp" - android:paddingEnd="12dp" - android:paddingBottom="8dp" + 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:iconSize="24dp" + app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/minus_button_item_post_compact_right_thumbnail" - app:layout_constraintTop_toTopOf="parent" /> - - <ImageView - android:id="@+id/save_button_item_post_compact_right_thumbnail" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - android:paddingStart="12dp" - android:paddingTop="8dp" - android:paddingEnd="12dp" - android:paddingBottom="8dp" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toStartOf="@id/share_button_item_post_compact_right_thumbnail" - app:layout_constraintHorizontal_bias="1" - app:layout_constraintStart_toEndOf="@id/comments_count_item_post_compact_right_thumbnail" - app:layout_constraintTop_toTopOf="parent" /> - - <ImageView - android:id="@+id/share_button_item_post_compact_right_thumbnail" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - android:paddingStart="12dp" - android:paddingTop="8dp" - android:paddingEnd="12dp" - android:paddingBottom="8dp" - android:src="@drawable/ic_share_grey_24dp" - app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@id/share_button_item_post_compact_right_thumbnail" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintHorizontal_bias="1" + style="?attr/materialButtonOutlinedStyle" /> </androidx.constraintlayout.widget.ConstraintLayout> |