aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/AndroidManifest.xml2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/TrendingSearchRecyclerViewAdapter.java3
-rw-r--r--app/src/main/res/drawable/trending_search_title_background.xml9
-rw-r--r--app/src/main/res/layout/item_trending_search.xml7
4 files changed, 17 insertions, 4 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index d88f5f22..30cfcf72 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -37,7 +37,7 @@
<activity android:name=".activities.TrendingActivity"
android:label="@string/trending_activity_label"
android:parentActivityName=".activities.MainActivity"
- android:theme="@style/AppTheme.NoActionBar" />
+ android:theme="@style/AppTheme.Slidable" />
<activity
android:name=".activities.PostGalleryActivity"
android:label="@string/post_gallery_activity_label"
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/TrendingSearchRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/TrendingSearchRecyclerViewAdapter.java
index 2e7264e4..b550b91e 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/TrendingSearchRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/TrendingSearchRecyclerViewAdapter.java
@@ -86,6 +86,8 @@ public class TrendingSearchRecyclerViewAdapter extends RecyclerView.Adapter<Recy
((TrendingSearchViewHolder) holder).noPreviewLinkImageView.setVisibility(View.VISIBLE);
}
}
+
+ ((TrendingSearchViewHolder) holder).titleTextView.setText(trendingSearch.displayString);
}
}
@@ -207,7 +209,6 @@ public class TrendingSearchRecyclerViewAdapter extends RecyclerView.Adapter<Recy
noPreviewLinkImageView.setColorFilter(customThemeWrapper.getNoPreviewPostTypeIconTint(), android.graphics.PorterDuff.Mode.SRC_IN);
progressBar.setIndeterminateTintList(ColorStateList.valueOf(customThemeWrapper.getColorAccent()));
errorTextView.setTextColor(customThemeWrapper.getPrimaryTextColor());
- titleTextView.setTextColor(customThemeWrapper.getPostTitleColor());
itemView.setOnClickListener(view -> {
itemClickListener.onClick(trendingSearches.get(getBindingAdapterPosition()));
diff --git a/app/src/main/res/drawable/trending_search_title_background.xml b/app/src/main/res/drawable/trending_search_title_background.xml
new file mode 100644
index 00000000..8bcd7150
--- /dev/null
+++ b/app/src/main/res/drawable/trending_search_title_background.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <gradient android:startColor="#323232"
+ android:endColor="@android:color/transparent"
+ android:angle="90"
+ android:type="linear"
+ android:useLevel="true" />
+</shape> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_trending_search.xml b/app/src/main/res/layout/item_trending_search.xml
index 78981af6..8227b938 100644
--- a/app/src/main/res/layout/item_trending_search.xml
+++ b/app/src/main/res/layout/item_trending_search.xml
@@ -7,7 +7,7 @@
android:layout_marginBottom="8dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
- app:cardCornerRadius="24dp"
+ app:cardCornerRadius="16dp"
app:cardElevation="2dp">
<RelativeLayout
@@ -64,8 +64,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
+ android:padding="16dp"
+ android:background="@drawable/trending_search_title_background"
android:maxLines="2"
- android:textSize="?attr/title_font_18"
+ android:textColor="#FFFFFF"
+ android:textSize="?attr/title_font_20"
android:fontFamily="?attr/title_font_family" />
</com.google.android.material.card.MaterialCardView> \ No newline at end of file