aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java35
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/ViewPostDetailActivity.java19
-rw-r--r--app/src/main/res/drawable-hdpi/ic_share_black_24dp.pngbin398 -> 0 bytes
-rw-r--r--app/src/main/res/drawable-mdpi/ic_share_black_24dp.pngbin262 -> 0 bytes
-rw-r--r--app/src/main/res/drawable-xhdpi/ic_share_black_24dp.pngbin483 -> 0 bytes
-rw-r--r--app/src/main/res/drawable-xxhdpi/ic_share_black_24dp.pngbin675 -> 0 bytes
-rw-r--r--app/src/main/res/drawable-xxxhdpi/ic_share_black_24dp.pngbin888 -> 0 bytes
-rw-r--r--app/src/main/res/drawable/ic_account_circle_grey_24dp.xml5
-rw-r--r--app/src/main/res/drawable/ic_outline_account_circle_24px.xml9
-rw-r--r--app/src/main/res/drawable/ic_outline_share_24px.xml9
-rw-r--r--app/src/main/res/drawable/nsfw_rounded_corner.xml16
-rw-r--r--app/src/main/res/drawable/rounded_corner.xml16
-rw-r--r--app/src/main/res/layout/activity_main.xml2
-rw-r--r--app/src/main/res/layout/activity_view_post_detail.xml41
-rw-r--r--app/src/main/res/layout/item_post.xml45
-rw-r--r--app/src/main/res/values-v28/styles.xml4
-rw-r--r--app/src/main/res/values/styles.xml4
17 files changed, 95 insertions, 110 deletions
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<Post, RecyclerView.ViewHo
}
if(nsfw) {
- ((DataViewHolder) holder).nsfwTextView.setVisibility(View.VISIBLE);
+ ((DataViewHolder) holder).nsfwChip.setVisibility(View.VISIBLE);
}
switch (voteType) {
@@ -368,7 +370,8 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo
switch (post.getPostType()) {
case Post.IMAGE_TYPE:
- ((DataViewHolder) holder).typeTextView.setText("IMAGE");
+ ((DataViewHolder) holder).typeChip.setVisibility(View.VISIBLE);
+ ((DataViewHolder) holder).typeChip.setText("IMAGE");
final String imageUrl = post.getUrl();
((DataViewHolder) holder).imageView.setOnClickListener(new View.OnClickListener() {
@@ -384,7 +387,8 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo
});
break;
case Post.LINK_TYPE:
- ((DataViewHolder) holder).typeTextView.setText("LINK");
+ ((DataViewHolder) holder).typeChip.setVisibility(View.VISIBLE);
+ ((DataViewHolder) holder).typeChip.setText("LINK");
((DataViewHolder) holder).imageView.setOnClickListener(new View.OnClickListener() {
@Override
@@ -399,7 +403,8 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo
});
break;
case Post.GIF_VIDEO_TYPE:
- ((DataViewHolder) holder).typeTextView.setText("GIF");
+ ((DataViewHolder) holder).typeChip.setVisibility(View.VISIBLE);
+ ((DataViewHolder) holder).typeChip.setText("GIF");
final Uri gifVideoUri = Uri.parse(post.getVideoUrl());
((DataViewHolder) holder).imageView.setOnClickListener(new View.OnClickListener() {
@@ -420,7 +425,8 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo
});
break;
case Post.VIDEO_TYPE:
- ((DataViewHolder) holder).typeTextView.setText("VIDEO");
+ ((DataViewHolder) holder).typeChip.setVisibility(View.VISIBLE);
+ ((DataViewHolder) holder).typeChip.setText("VIDEO");
final Uri videoUri = Uri.parse(post.getVideoUrl());
((DataViewHolder) holder).imageView.setOnClickListener(view -> {
@@ -438,7 +444,8 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo
});
break;
case Post.NO_PREVIEW_LINK_TYPE:
- ((DataViewHolder) holder).typeTextView.setText("LINK");
+ ((DataViewHolder) holder).typeChip.setVisibility(View.VISIBLE);
+ ((DataViewHolder) holder).typeChip.setText("LINK");
final String noPreviewLinkUrl = post.getUrl();
((DataViewHolder) holder).noPreviewLinkImageView.setVisibility(View.VISIBLE);
((DataViewHolder) holder).noPreviewLinkImageView.setOnClickListener(new View.OnClickListener() {
@@ -454,7 +461,7 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo
});
break;
case Post.TEXT_TYPE:
- ((DataViewHolder) holder).typeTextView.setText("TEXT");
+ ((DataViewHolder) holder).typeChip.setVisibility(View.GONE);
break;
}
@@ -665,17 +672,17 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo
}
class DataViewHolder extends RecyclerView.ViewHolder {
- @BindView(R.id.card_view_view_post_detail) CardView cardView;
+ @BindView(R.id.card_view_view_post_detail) MaterialCardView cardView;
@BindView(R.id.subreddit_icon_gif_image_view_best_post_item) AspectRatioGifImageView subredditIconGifImageView;
@BindView(R.id.subreddit_text_view_best_post_item) TextView subredditNameTextView;
@BindView(R.id.stickied_post_image_view_best_post_item) ImageView stickiedPostImageView;
@BindView(R.id.post_time_text_view_best_post_item) TextView postTimeTextView;
@BindView(R.id.title_text_view_best_post_item) TextView titleTextView;
- @BindView(R.id.type_text_view_item_best_post) TextView typeTextView;
+ @BindView(R.id.type_text_view_item_best_post) Chip typeChip;
@BindView(R.id.gilded_image_view_item_best_post) ImageView gildedImageView;
@BindView(R.id.gilded_number_text_view_item_best_post) TextView gildedNumberTextView;
@BindView(R.id.crosspost_image_view_item_best_post) ImageView crosspostImageView;
- @BindView(R.id.nsfw_text_view_item_best_post) TextView nsfwTextView;
+ @BindView(R.id.nsfw_text_view_item_best_post) Chip nsfwChip;
@BindView(R.id.image_view_wrapper_item_best_post) RelativeLayout relativeLayout;
@BindView(R.id.progress_bar_best_post_item) ProgressBar progressBar;
@BindView(R.id.image_view_best_post_item) AspectRatioGifImageView imageView;
@@ -689,6 +696,12 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo
DataViewHolder(View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
+ scoreTextView.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ //Do nothing in order to prevent clicking this to start ViewPostDetailActivity
+ }
+ });
}
}
@@ -728,7 +741,7 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo
((DataViewHolder) holder).gildedImageView.setVisibility(View.GONE);
((DataViewHolder) holder).gildedNumberTextView.setVisibility(View.GONE);
((DataViewHolder) holder).crosspostImageView.setVisibility(View.GONE);
- ((DataViewHolder) holder).nsfwTextView.setVisibility(View.GONE);
+ ((DataViewHolder) holder).nsfwChip.setVisibility(View.GONE);
((DataViewHolder) holder).progressBar.setVisibility(View.GONE);
((DataViewHolder) holder).imageView.setVisibility(View.GONE);
((DataViewHolder) holder).errorRelativeLayout.setVisibility(View.GONE);
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewPostDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewPostDetailActivity.java
index b1d7af06..4e813b22 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewPostDetailActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewPostDetailActivity.java
@@ -8,6 +8,7 @@ import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.customtabs.CustomTabsIntent;
+import android.support.design.chip.Chip;
import android.support.design.widget.CoordinatorLayout;
import android.support.design.widget.Snackbar;
import android.support.v4.content.ContextCompat;
@@ -66,11 +67,11 @@ public class ViewPostDetailActivity extends AppCompatActivity {
@BindView(R.id.post_time_text_view_view_post_detail) TextView mPostTimeTextView;
@BindView(R.id.subreddit_text_view_view_post_detail) TextView mSubredditTextView;
@BindView(R.id.content_html_text_view_view_post_detail) HtmlTextView mContentTextView;
- @BindView(R.id.type_text_view_view_post_detail) TextView mTypeTextView;
+ @BindView(R.id.type_text_view_view_post_detail) Chip mTypeChip;
@BindView(R.id.gilded_image_view_view_post_detail) ImageView mGildedImageView;
@BindView(R.id.gilded_number_text_view_view_post_detail) TextView mGildedNumberTextView;
@BindView(R.id.crosspost_image_view_view_post_detail) ImageView mCrosspostImageView;
- @BindView(R.id.nsfw_text_view_view_post_detail) TextView mNSFWTextView;
+ @BindView(R.id.nsfw_text_view_view_post_detail) Chip mNSFWChip;
@BindView(R.id.image_view_wrapper_view_post_detail) RelativeLayout mRelativeLayout;
@BindView(R.id.load_wrapper_view_post_detail) RelativeLayout mLoadWrapper;
@@ -207,7 +208,7 @@ public class ViewPostDetailActivity extends AppCompatActivity {
}
if(mPost.isNSFW()) {
- mNSFWTextView.setVisibility(View.VISIBLE);
+ mNSFWChip.setVisibility(View.VISIBLE);
}
mScoreTextView.setText(Integer.toString(mPost.getScore()));
@@ -224,7 +225,7 @@ public class ViewPostDetailActivity extends AppCompatActivity {
switch (mPost.getPostType()) {
case Post.IMAGE_TYPE:
- mTypeTextView.setText("IMAGE");
+ mTypeChip.setText("IMAGE");
mImageView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
@@ -238,7 +239,7 @@ public class ViewPostDetailActivity extends AppCompatActivity {
});
break;
case Post.LINK_TYPE:
- mTypeTextView.setText("LINK");
+ mTypeChip.setText("LINK");
mImageView.setOnClickListener(new View.OnClickListener() {
@Override
@@ -253,7 +254,7 @@ public class ViewPostDetailActivity extends AppCompatActivity {
});
break;
case Post.GIF_VIDEO_TYPE:
- mTypeTextView.setText("GIF");
+ mTypeChip.setText("GIF");
final Uri gifVideoUri = Uri.parse(mPost.getVideoUrl());
mImageView.setOnClickListener(new View.OnClickListener() {
@@ -274,7 +275,7 @@ public class ViewPostDetailActivity extends AppCompatActivity {
});
break;
case Post.VIDEO_TYPE:
- mTypeTextView.setText("VIDEO");
+ mTypeChip.setText("VIDEO");
final Uri videoUri = Uri.parse(mPost.getVideoUrl());
mImageView.setOnClickListener(new View.OnClickListener() {
@@ -295,7 +296,7 @@ public class ViewPostDetailActivity extends AppCompatActivity {
});
break;
case Post.NO_PREVIEW_LINK_TYPE:
- mTypeTextView.setText("LINK");
+ mTypeChip.setText("LINK");
if(!mPost.getSelfText().equals("")) {
mContentTextView.setVisibility(View.VISIBLE);
mContentTextView.setHtml(mPost.getSelfText());
@@ -314,7 +315,7 @@ public class ViewPostDetailActivity extends AppCompatActivity {
});
break;
case Post.TEXT_TYPE:
- mTypeTextView.setText("TEXT");
+ mTypeChip.setVisibility(View.GONE);
if(!mPost.getSelfText().equals("")) {
mContentTextView.setVisibility(View.VISIBLE);
mContentTextView.setHtml(mPost.getSelfText());
diff --git a/app/src/main/res/drawable-hdpi/ic_share_black_24dp.png b/app/src/main/res/drawable-hdpi/ic_share_black_24dp.png
deleted file mode 100644
index 20ba4806..00000000
--- a/app/src/main/res/drawable-hdpi/ic_share_black_24dp.png
+++ /dev/null
Binary files differ
diff --git a/app/src/main/res/drawable-mdpi/ic_share_black_24dp.png b/app/src/main/res/drawable-mdpi/ic_share_black_24dp.png
deleted file mode 100644
index f02d360a..00000000
--- a/app/src/main/res/drawable-mdpi/ic_share_black_24dp.png
+++ /dev/null
Binary files differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_share_black_24dp.png b/app/src/main/res/drawable-xhdpi/ic_share_black_24dp.png
deleted file mode 100644
index 81c80b70..00000000
--- a/app/src/main/res/drawable-xhdpi/ic_share_black_24dp.png
+++ /dev/null
Binary files differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_share_black_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_share_black_24dp.png
deleted file mode 100644
index 784933ad..00000000
--- a/app/src/main/res/drawable-xxhdpi/ic_share_black_24dp.png
+++ /dev/null
Binary files differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_share_black_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_share_black_24dp.png
deleted file mode 100644
index 5a8544ce..00000000
--- a/app/src/main/res/drawable-xxxhdpi/ic_share_black_24dp.png
+++ /dev/null
Binary files differ
diff --git a/app/src/main/res/drawable/ic_account_circle_grey_24dp.xml b/app/src/main/res/drawable/ic_account_circle_grey_24dp.xml
deleted file mode 100644
index 070d1d17..00000000
--- a/app/src/main/res/drawable/ic_account_circle_grey_24dp.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<vector android:height="24dp" android:tint="#9E9E9E"
- android:viewportHeight="24.0" android:viewportWidth="24.0"
- android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
- <path android:fillColor="#FF000000" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,5c1.66,0 3,1.34 3,3s-1.34,3 -3,3 -3,-1.34 -3,-3 1.34,-3 3,-3zM12,19.2c-2.5,0 -4.71,-1.28 -6,-3.22 0.03,-1.99 4,-3.08 6,-3.08 1.99,0 5.97,1.09 6,3.08 -1.29,1.94 -3.5,3.22 -6,3.22z"/>
-</vector>
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 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM7.07,18.28c0.43,-0.9 3.05,-1.78 4.93,-1.78s4.51,0.88 4.93,1.78C15.57,19.36 13.86,20 12,20s-3.57,-0.64 -4.93,-1.72zM18.36,16.83c-1.43,-1.74 -4.9,-2.33 -6.36,-2.33s-4.93,0.59 -6.36,2.33C4.62,15.49 4,13.82 4,12c0,-4.41 3.59,-8 8,-8s8,3.59 8,8c0,1.82 -0.62,3.49 -1.64,4.83zM12,6c-1.94,0 -3.5,1.56 -3.5,3.5S10.06,13 12,13s3.5,-1.56 3.5,-3.5S13.94,6 12,6zM12,11c-0.83,0 -1.5,-0.67 -1.5,-1.5S11.17,8 12,8s1.5,0.67 1.5,1.5S12.83,11 12,11z"/>
+</vector>
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 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92s2.92,-1.31 2.92,-2.92c0,-1.61 -1.31,-2.92 -2.92,-2.92zM18,4c0.55,0 1,0.45 1,1s-0.45,1 -1,1 -1,-0.45 -1,-1 0.45,-1 1,-1zM6,13c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1 1,0.45 1,1 -0.45,1 -1,1zM18,20.02c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1 1,0.45 1,1 -0.45,1 -1,1z"/>
+</vector>
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 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android" >
- <!--<stroke
- android:width="1dp"
- android:color="@color/colorPrimary" />-->
-
- <solid android:color="@color/colorAccent" />
-
- <padding
- android:left="4dp"
- android:right="4dp"
- android:top="4dp"
- android:bottom="4dp"/>
-
- <corners android:radius="4dp" />
-</shape> \ 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 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android" >
- <!--<stroke
- android:width="1dp"
- android:color="@color/colorPrimary" />-->
-
- <solid android:color="@color/colorPrimary" />
-
- <padding
- android:left="4dp"
- android:right="4dp"
- android:top="4dp"
- android:bottom="4dp"/>
-
- <corners android:radius="4dp" />
-</shape> \ 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"/>
<TextView
android:layout_width="wrap_content"
diff --git a/app/src/main/res/layout/activity_view_post_detail.xml b/app/src/main/res/layout/activity_view_post_detail.xml
index c9020ae9..5880a9d3 100644
--- a/app/src/main/res/layout/activity_view_post_detail.xml
+++ b/app/src/main/res/layout/activity_view_post_detail.xml
@@ -17,7 +17,7 @@
android:orientation="vertical"
android:descendantFocusability="blocksDescendants">
- <android.support.v7.widget.CardView
+ <android.support.design.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content">
@@ -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">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/subreddit_icon_circle_image_view_view_post_detail"
@@ -79,7 +74,6 @@
android:id="@+id/content_html_text_view_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"
@@ -91,36 +85,35 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp">
- <TextView
+ <android.support.design.chip.Chip
android:id="@+id/type_text_view_view_post_detail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
- android:layout_centerVertical="true"
android:textSize="12sp"
- android:background="@drawable/rounded_corner"
- android:textColor="@android:color/white" />
+ android:textColor="@android:color/white"
+ app:chipBackgroundColor="@color/colorPrimaryDark"/>
<ImageView
android:id="@+id/gilded_image_view_view_post_detail"
android:layout_width="24dp"
android:layout_height="24dp"
+ android:layout_marginTop="8dp"
android:layout_toEndOf="@id/type_text_view_view_post_detail"
- android:layout_centerVertical="true"
android:visibility="gone"/>
<TextView
android:id="@+id/gilded_number_text_view_view_post_detail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
android:layout_marginStart="4dp"
android:layout_marginEnd="8dp"
android:layout_toEndOf="@id/gilded_image_view_view_post_detail"
- android:layout_centerVertical="true"
android:visibility="gone"
android:textSize="20sp"
android:textColor="@color/gold"/>
@@ -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"/>
- <TextView
+ <android.support.design.chip.Chip
android:id="@+id/nsfw_text_view_view_post_detail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/nsfw"
android:layout_alignParentEnd="true"
+ android:layout_marginTop="8dp"
android:layout_marginStart="8dp"
- android:background="@drawable/nsfw_rounded_corner"
android:textColor="@android:color/white"
- android:visibility="gone" />
+ android:visibility="gone"
+ app:chipBackgroundColor="@color/colorAccent"/>
</RelativeLayout>
@@ -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" />
</RelativeLayout>
</LinearLayout>
- </android.support.v7.widget.CardView>
+ </android.support.design.card.MaterialCardView>
<com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar
android:id="@+id/comment_progress_bar_view_post_detail"
@@ -292,11 +286,6 @@
android:textColor="#000000"
android:textSize="18sp" />
- <!--<android.support.v7.widget.RecyclerView
- android:id="@+id/recycler_view_view_post_detail"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />-->
-
<com.multilevelview.MultiLevelRecyclerView
android:id="@+id/recycler_view_view_post_detail"
android:layout_width="match_parent"
diff --git a/app/src/main/res/layout/item_post.xml b/app/src/main/res/layout/item_post.xml
index 79a545e6..1021a3b0 100644
--- a/app/src/main/res/layout/item_post.xml
+++ b/app/src/main/res/layout/item_post.xml
@@ -1,24 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
-<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
+<android.support.design.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
- android:id="@+id/card_view_view_post_detail">
+ android:id="@+id/card_view_view_post_detail"
+ app:cardCornerRadius="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:background="#FFFFFF">
+ android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="8dp"
- android:layout_marginStart="16dp"
- android:layout_marginEnd="16dp"
- android:layout_marginTop="16dp">
+ android:layout_margin="16dp">
<CustomView.AspectRatioGifImageView
android:id="@+id/subreddit_icon_gif_image_view_best_post_item"
@@ -73,37 +71,35 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp">
- <TextView
+ <android.support.design.chip.Chip
android:id="@+id/type_text_view_item_best_post"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:background="@drawable/rounded_corner"
- android:layout_marginEnd="8dp"
- android:layout_centerVertical="true"
+ android:layout_marginTop="8dp"
+ android:layout_marginEnd="16dp"
android:textSize="12sp"
- android:textColor="@android:color/white"/>
+ android:textColor="@android:color/white"
+ app:chipBackgroundColor="@color/colorPrimaryDark"/>
<ImageView
android:id="@+id/gilded_image_view_item_best_post"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_toEndOf="@id/type_text_view_item_best_post"
- android:layout_centerVertical="true"
- android:layout_marginStart="8dp"
+ android:layout_marginTop="8dp"
android:visibility="gone"/>
<TextView
android:id="@+id/gilded_number_text_view_item_best_post"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
android:layout_marginStart="4dp"
android:layout_marginEnd="8dp"
android:layout_toEndOf="@id/gilded_image_view_item_best_post"
- android:layout_centerVertical="true"
android:visibility="gone"
android:textSize="20sp"
android:textColor="@color/gold"/>
@@ -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"/>
- <TextView
+ <android.support.design.chip.Chip
android:id="@+id/nsfw_text_view_item_best_post"
android:text="@string/nsfw"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:background="@drawable/nsfw_rounded_corner"
android:layout_alignParentEnd="true"
+ android:layout_marginTop="8dp"
android:layout_marginStart="8dp"
- android:layout_centerVertical="true"
+ android:textSize="12sp"
android:textColor="@android:color/white"
- android:visibility="gone"/>
+ android:visibility="gone"
+ app:chipBackgroundColor="@color/colorAccent"/>
</RelativeLayout>
@@ -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 @@
</LinearLayout>
-</android.support.v7.widget.CardView> \ No newline at end of file
+</android.support.design.card.MaterialCardView> \ 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 @@
<resources>
<!-- Base application theme. -->
- <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
+ <style name="AppTheme" parent="Theme.MaterialComponents.Light">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
+ <item name="android:navigationBarColor">@android:color/black</item>
+ <item name="android:textColorPrimary">@android:color/white</item>
</style>
</resources>
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 @@
<resources>
<!-- Base application theme. -->
- <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
+ <style name="AppTheme" parent="Theme.MaterialComponents.Light">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
+ <item name="android:navigationBarColor">@android:color/black</item>
+ <item name="android:textColorPrimary">@android:color/white</item>
</style>
<style name="AppTheme.NoActionBar">