From 9d729579bf7ea9e179774766c02ddae105d4ccd7 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Fri, 4 Jan 2019 16:02:11 +0800 Subject: Minor UI tweaks. --- .../infinityforreddit/PostRecyclerViewAdapter.java | 35 +++++++++++----- .../infinityforreddit/ViewPostDetailActivity.java | 19 ++++----- .../main/res/drawable-hdpi/ic_share_black_24dp.png | Bin 398 -> 0 bytes .../main/res/drawable-mdpi/ic_share_black_24dp.png | Bin 262 -> 0 bytes .../res/drawable-xhdpi/ic_share_black_24dp.png | Bin 483 -> 0 bytes .../res/drawable-xxhdpi/ic_share_black_24dp.png | Bin 675 -> 0 bytes .../res/drawable-xxxhdpi/ic_share_black_24dp.png | Bin 888 -> 0 bytes .../res/drawable/ic_account_circle_grey_24dp.xml | 5 --- .../drawable/ic_outline_account_circle_24px.xml | 9 +++++ .../main/res/drawable/ic_outline_share_24px.xml | 9 +++++ app/src/main/res/drawable/nsfw_rounded_corner.xml | 16 -------- app/src/main/res/drawable/rounded_corner.xml | 16 -------- app/src/main/res/layout/activity_main.xml | 2 +- .../main/res/layout/activity_view_post_detail.xml | 41 +++++++------------ app/src/main/res/layout/item_post.xml | 45 ++++++++++----------- app/src/main/res/values-v28/styles.xml | 4 +- app/src/main/res/values/styles.xml | 4 +- 17 files changed, 95 insertions(+), 110 deletions(-) delete mode 100644 app/src/main/res/drawable-hdpi/ic_share_black_24dp.png delete mode 100644 app/src/main/res/drawable-mdpi/ic_share_black_24dp.png delete mode 100644 app/src/main/res/drawable-xhdpi/ic_share_black_24dp.png delete mode 100644 app/src/main/res/drawable-xxhdpi/ic_share_black_24dp.png delete mode 100644 app/src/main/res/drawable-xxxhdpi/ic_share_black_24dp.png delete mode 100644 app/src/main/res/drawable/ic_account_circle_grey_24dp.xml create mode 100644 app/src/main/res/drawable/ic_outline_account_circle_24px.xml create mode 100644 app/src/main/res/drawable/ic_outline_share_24px.xml delete mode 100644 app/src/main/res/drawable/nsfw_rounded_corner.xml delete mode 100644 app/src/main/res/drawable/rounded_corner.xml (limited to 'app') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java index aeec7593..4fd07046 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java @@ -11,6 +11,8 @@ import android.net.Uri; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.customtabs.CustomTabsIntent; +import android.support.design.card.MaterialCardView; +import android.support.design.chip.Chip; import android.support.v4.content.ContextCompat; import android.support.v7.util.DiffUtil; import android.support.v7.widget.CardView; @@ -334,7 +336,7 @@ class PostRecyclerViewAdapter extends PagedListAdapter { @@ -438,7 +444,8 @@ class PostRecyclerViewAdapter extends PagedListAdapter - - diff --git a/app/src/main/res/drawable/ic_outline_account_circle_24px.xml b/app/src/main/res/drawable/ic_outline_account_circle_24px.xml new file mode 100644 index 00000000..0c9a104b --- /dev/null +++ b/app/src/main/res/drawable/ic_outline_account_circle_24px.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_outline_share_24px.xml b/app/src/main/res/drawable/ic_outline_share_24px.xml new file mode 100644 index 00000000..82ddcec3 --- /dev/null +++ b/app/src/main/res/drawable/ic_outline_share_24px.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/nsfw_rounded_corner.xml b/app/src/main/res/drawable/nsfw_rounded_corner.xml deleted file mode 100644 index 0d3eacc5..00000000 --- a/app/src/main/res/drawable/nsfw_rounded_corner.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/rounded_corner.xml b/app/src/main/res/drawable/rounded_corner.xml deleted file mode 100644 index 421af4ca..00000000 --- a/app/src/main/res/drawable/rounded_corner.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index c9bfd7d1..4e6dd8aa 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -47,7 +47,7 @@ android:layout_height="24dp" android:layout_marginEnd="32dp" android:layout_gravity="center_vertical" - android:src="@drawable/ic_account_circle_grey_24dp"/> + android:src="@drawable/ic_outline_account_circle_24px"/> - @@ -30,12 +30,7 @@ android:id="@+id/relative_layout_view_post_detail" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginBottom="8dp" - android:layout_marginEnd="16dp" - android:layout_marginLeft="16dp" - android:layout_marginRight="16dp" - android:layout_marginStart="16dp" - android:layout_marginTop="16dp"> + android:layout_margin="16dp"> - + android:textColor="@android:color/white" + app:chipBackgroundColor="@color/colorPrimaryDark"/> @@ -129,25 +122,26 @@ android:id="@+id/crosspost_image_view_view_post_detail" android:layout_width="24dp" android:layout_height="24dp" + android:layout_marginTop="8dp" android:layout_marginStart="8dp" android:layout_marginEnd="8dp" android:layout_toStartOf="@id/nsfw_text_view_item_best_post" android:layout_toEndOf="@id/gilded_number_text_view_view_post_detail" - android:layout_centerVertical="true" android:src="@drawable/crosspost" android:tint="@color/colorAccent" android:visibility="gone"/> - + android:visibility="gone" + app:chipBackgroundColor="@color/colorAccent"/> @@ -249,14 +243,14 @@ android:clickable="true" android:focusable="true" android:padding="16dp" - android:src="@drawable/ic_share_black_24dp" + android:src="@drawable/ic_outline_share_24px" android:tint="@android:color/tab_indicator_text" /> - + - - - + android:id="@+id/card_view_view_post_detail" + app:cardCornerRadius="16dp"> + android:orientation="vertical"> + android:layout_margin="16dp"> - + android:textColor="@android:color/white" + app:chipBackgroundColor="@color/colorPrimaryDark"/> @@ -112,26 +108,27 @@ android:id="@+id/crosspost_image_view_item_best_post" android:layout_width="24dp" android:layout_height="24dp" + android:layout_marginTop="8dp" android:layout_marginStart="8dp" android:layout_marginEnd="8dp" android:layout_toStartOf="@id/nsfw_text_view_item_best_post" android:layout_toEndOf="@id/gilded_number_text_view_item_best_post" - android:layout_centerVertical="true" android:src="@drawable/crosspost" android:tint="@color/colorAccent" android:visibility="gone"/> - + android:visibility="gone" + app:chipBackgroundColor="@color/colorAccent"/> @@ -230,7 +227,7 @@ android:layout_alignParentEnd="true" android:layout_centerVertical="true" android:padding="16dp" - android:src="@drawable/ic_share_black_24dp" + android:src="@drawable/ic_outline_share_24px" android:tint="@android:color/tab_indicator_text" android:background="?actionBarItemBackground" android:clickable="true" @@ -240,4 +237,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/values-v28/styles.xml b/app/src/main/res/values-v28/styles.xml index 7b88cdf3..07037335 100644 --- a/app/src/main/res/values-v28/styles.xml +++ b/app/src/main/res/values-v28/styles.xml @@ -1,12 +1,14 @@ - diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 38b86b13..1ea7c276 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -1,11 +1,13 @@ -