diff options
author | Alex Ning <chineseperson5@gmail.com> | 2019-10-29 03:20:16 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2019-10-29 03:20:16 +0000 |
commit | 168456f57ccd80a52c7d95761b1df6827d0b90c8 (patch) | |
tree | 900e4e25b097b54ebdf88e0cbcefc1b7779e3b0f /app/src/main/res/layout | |
parent | 3a81ca17e864dd76d77d4a6bd41ccfdcc54bbe1e (diff) | |
download | infinity-for-reddit-168456f57ccd80a52c7d95761b1df6827d0b90c8.tar infinity-for-reddit-168456f57ccd80a52c7d95761b1df6827d0b90c8.tar.gz infinity-for-reddit-168456f57ccd80a52c7d95761b1df6827d0b90c8.tar.bz2 infinity-for-reddit-168456f57ccd80a52c7d95761b1df6827d0b90c8.tar.lz infinity-for-reddit-168456f57ccd80a52c7d95761b1df6827d0b90c8.tar.xz infinity-for-reddit-168456f57ccd80a52c7d95761b1df6827d0b90c8.tar.zst infinity-for-reddit-168456f57ccd80a52c7d95761b1df6827d0b90c8.zip |
Make Placing vote buttons on the right an option.
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/item_comment.xml | 16 | ||||
-rw-r--r-- | app/src/main/res/layout/item_post.xml | 110 | ||||
-rw-r--r-- | app/src/main/res/layout/item_post_detail.xml | 91 |
3 files changed, 111 insertions, 106 deletions
diff --git a/app/src/main/res/layout/item_comment.xml b/app/src/main/res/layout/item_comment.xml index 3c1a3330..1e594578 100644 --- a/app/src/main/res/layout/item_comment.xml +++ b/app/src/main/res/layout/item_comment.xml @@ -83,7 +83,7 @@ android:background="?actionBarItemBackground" android:clickable="true" android:focusable="true" - android:src="@drawable/ic_arrow_upward_black_22dp" + android:src="@drawable/ic_arrow_upward_grey_24dp" android:tint="@android:color/tab_indicator_text" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" @@ -110,7 +110,7 @@ android:background="?actionBarItemBackground" android:clickable="true" android:focusable="true" - android:src="@drawable/ic_arrow_downward_black_22dp" + android:src="@drawable/ic_arrow_downward_grey_24dp" android:tint="@android:color/tab_indicator_text" app:layout_constraintStart_toEndOf="@+id/score_text_view_item_post_comment" app:layout_constraintEnd_toStartOf="@id/more_button_item_post_comment" @@ -126,8 +126,7 @@ android:background="?actionBarItemBackground" android:clickable="true" android:focusable="true" - android:src="@drawable/ic_outline_more_vert_24px" - android:tint="@android:color/tab_indicator_text" + android:src="@drawable/ic_more_vert_grey_24dp" android:visibility="gone" app:layout_constraintEnd_toStartOf="@+id/expand_button_item_post_comment" app:layout_constraintTop_toTopOf="parent" @@ -141,7 +140,7 @@ android:background="?actionBarItemBackground" android:clickable="true" android:focusable="true" - android:src="@drawable/ic_expand_less_black_22dp" + android:src="@drawable/ic_expand_less_grey_24dp" android:tint="@android:color/tab_indicator_text" android:visibility="gone" app:layout_constraintEnd_toStartOf="@+id/save_button_item_post_comment" @@ -156,7 +155,6 @@ android:background="?actionBarItemBackground" android:clickable="true" android:focusable="true" - android:tint="@android:color/tab_indicator_text" app:layout_constraintEnd_toStartOf="@+id/share_button_item_post_comment" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent"/> @@ -169,8 +167,7 @@ android:background="?actionBarItemBackground" android:clickable="true" android:focusable="true" - android:src="@drawable/ic_outline_share_20px" - android:tint="@android:color/tab_indicator_text" + android:src="@drawable/ic_share_grey_24dp" app:layout_constraintEnd_toStartOf="@+id/reply_button_item_post_comment" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent"/> @@ -183,8 +180,7 @@ android:background="?actionBarItemBackground" android:clickable="true" android:focusable="true" - android:src="@drawable/ic_reply_black_20dp" - android:tint="@android:color/tab_indicator_text" + android:src="@drawable/ic_reply_grey_24dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent"/> diff --git a/app/src/main/res/layout/item_post.xml b/app/src/main/res/layout/item_post.xml index c702e529..5733f9c5 100644 --- a/app/src/main/res/layout/item_post.xml +++ b/app/src/main/res/layout/item_post.xml @@ -256,7 +256,7 @@ android:background="@color/grey" android:visibility="gone"/> - <androidx.constraintlayout.widget.ConstraintLayout + <!--<androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="wrap_content"> @@ -265,69 +265,147 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="12dp" - android:src="@drawable/ic_arrow_upward_black_24dp" + android:src="@drawable/ic_arrow_upward_grey_24dp" android:tint="@android:color/tab_indicator_text" android:background="?actionBarItemBackground" android:clickable="true" android:focusable="true" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toStartOf="parent" /> + app:layout_constraintEnd_toStartOf="@id/score_text_view_item_post" /> <TextView android:id="@+id/score_text_view_item_post" android:layout_width="64dp" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:gravity="center" android:textSize="?attr/font_12" android:textStyle="bold" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/plus_button_item_post" /> + app:layout_constraintEnd_toStartOf="@id/minus_button_item_post" /> <ImageView android:id="@+id/minus_button_item_post" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="12dp" - android:src="@drawable/ic_arrow_downward_black_24dp" + android:src="@drawable/ic_arrow_downward_grey_24dp" android:tint="@android:color/tab_indicator_text" 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" /> + app:layout_constraintEnd_toEndOf="parent" /> + + <TextView + android:id="@+id/comments_count_item_post" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="12dp" + android:gravity="center_vertical" + android:textSize="?attr/font_12" + android:textStyle="bold" + android:drawableStart="@drawable/ic_comment_grey_24dp" + android:drawablePadding="12dp" + app:layout_constraintHorizontal_bias="0" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@id/save_button_item_post" + app:layout_constraintEnd_toStartOf="@id/plus_button_item_post" /> <ImageView - android:id="@+id/comment_button_item_post" + android:id="@+id/save_button_item_post" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="12dp" - android:src="@drawable/ic_comment_white_24dp" android:tint="@android:color/tab_indicator_text" + android:background="?actionBarItemBackground" + android:clickable="true" + android:focusable="true" app:layout_constraintHorizontal_bias="0" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/minus_button_item_post" /> + app:layout_constraintStart_toEndOf="@id/share_button_item_post" /> + + <ImageView + android:id="@+id/share_button_item_post" + 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:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintHorizontal_bias="1" /> + + </androidx.constraintlayout.widget.ConstraintLayout>--> + + <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/bottom_constraint_layout_item_post" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <ImageView + android:id="@+id/plus_button_item_post" + 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" + android:layout_width="64dp" + android:layout_height="wrap_content" + android:gravity="center" + android:textSize="?attr/font_12" + android:textStyle="bold" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@id/plus_button_item_post" /> + + <ImageView + android:id="@+id/minus_button_item_post" + 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" /> <TextView android:id="@+id/comments_count_item_post" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:padding="12dp" + android:gravity="center_vertical" android:textSize="?attr/font_12" android:textStyle="bold" - app:layout_constraintHorizontal_bias="0" + android:drawableStart="@drawable/ic_comment_grey_24dp" + android:drawablePadding="12dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/comment_button_item_post" /> + app:layout_constraintStart_toEndOf="@id/minus_button_item_post" /> <ImageView android:id="@+id/save_button_item_post" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="12dp" - android:tint="@android:color/tab_indicator_text" android:background="?actionBarItemBackground" android:clickable="true" android:focusable="true" @@ -342,15 +420,13 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="12dp" - android:src="@drawable/ic_outline_share_24px" - android:tint="@android:color/tab_indicator_text" + android:src="@drawable/ic_share_grey_24dp" android:background="?actionBarItemBackground" android:clickable="true" android:focusable="true" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintHorizontal_bias="1" /> + app:layout_constraintEnd_toEndOf="parent" /> </androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/item_post_detail.xml b/app/src/main/res/layout/item_post_detail.xml index 9d7b574b..338975e4 100644 --- a/app/src/main/res/layout/item_post_detail.xml +++ b/app/src/main/res/layout/item_post_detail.xml @@ -248,70 +248,17 @@ android:tint="@android:color/tab_indicator_text" android:visibility="gone" /> - <!--<RelativeLayout - android:layout_width="match_parent" - android:layout_height="wrap_content"> - - <ImageView - android:id="@+id/plus_button_item_post_detail" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_centerVertical="true" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - android:padding="16dp" - android:src="@drawable/ic_arrow_upward_black_24dp" - android:tint="@android:color/tab_indicator_text" /> - - <TextView - android:id="@+id/score_text_view_item_post_detail" - android:layout_width="64dp" - android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:layout_toEndOf="@id/plus_button_item_post_detail" - android:gravity="center" - android:textSize="?attr/font_default" /> - - <ImageView - android:id="@+id/minus_button_item_post_detail" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:layout_toEndOf="@id/score_text_view_item_post_detail" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - android:padding="16dp" - android:src="@drawable/ic_arrow_downward_black_24dp" - android:tint="@android:color/tab_indicator_text" /> - - <ImageView - android:id="@+id/share_button_item_post_detail" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentEnd="true" - android:layout_centerVertical="true" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - android:padding="16dp" - android:src="@drawable/ic_outline_share_24px" - android:tint="@android:color/tab_indicator_text" /> - - </RelativeLayout>--> - <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="wrap_content" + android:id="@+id/bottom_constraint_layout_item_post_detail"> <ImageView android:id="@+id/plus_button_item_post_detail" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="12dp" - android:src="@drawable/ic_arrow_upward_black_24dp" + android:src="@drawable/ic_arrow_upward_grey_24dp" android:tint="@android:color/tab_indicator_text" android:background="?actionBarItemBackground" android:clickable="true" @@ -323,7 +270,7 @@ <TextView android:id="@+id/score_text_view_item_post_detail" android:layout_width="64dp" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:gravity="center" android:textSize="?attr/font_12" android:textStyle="bold" @@ -336,7 +283,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="12dp" - android:src="@drawable/ic_arrow_downward_black_24dp" + android:src="@drawable/ic_arrow_downward_grey_24dp" android:tint="@android:color/tab_indicator_text" android:background="?actionBarItemBackground" android:clickable="true" @@ -345,31 +292,19 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toEndOf="@id/score_text_view_item_post_detail" /> - <ImageView - android:id="@+id/comment_button_item_post_detail" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="12dp" - android:src="@drawable/ic_comment_white_24dp" - android:tint="@android:color/tab_indicator_text" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" - app:layout_constraintHorizontal_bias="0" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/minus_button_item_post_detail" /> - <TextView android:id="@+id/comments_count_item_post_detail" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:padding="12dp" + android:gravity="center_vertical" android:textSize="?attr/font_12" android:textStyle="bold" - app:layout_constraintHorizontal_bias="0" + android:drawableStart="@drawable/ic_comment_grey_24dp" + android:drawablePadding="12dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/comment_button_item_post_detail" /> + app:layout_constraintStart_toEndOf="@id/minus_button_item_post_detail" /> <ImageView android:id="@+id/save_button_item_post_detail" @@ -391,15 +326,13 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="12dp" - android:src="@drawable/ic_outline_share_24px" - android:tint="@android:color/tab_indicator_text" + android:src="@drawable/ic_share_grey_24dp" android:background="?actionBarItemBackground" android:clickable="true" android:focusable="true" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintHorizontal_bias="1" /> + app:layout_constraintEnd_toEndOf="parent" /> </androidx.constraintlayout.widget.ConstraintLayout> |