diff --git a/app/src/main/java/org/xbmc/kore/ui/sections/video/MovieListFragment.java b/app/src/main/java/org/xbmc/kore/ui/sections/video/MovieListFragment.java
index d96ef17..ffb9776 100644
--- a/app/src/main/java/org/xbmc/kore/ui/sections/video/MovieListFragment.java
+++ b/app/src/main/java/org/xbmc/kore/ui/sections/video/MovieListFragment.java
@@ -20,6 +20,7 @@ import android.content.SharedPreferences;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.database.Cursor;
+import android.graphics.PorterDuff;
import android.net.Uri;
import android.preference.PreferenceManager;
import android.provider.BaseColumns;
@@ -327,16 +328,18 @@ public class MovieListFragment extends AbstractCursorListFragment {
private HostManager hostManager;
private int artWidth, artHeight;
- private int themeAccentColor;
+ private int themeAccentColor, dimmedNeutralColor;
MoviesAdapter(Context context) {
// Get the default accent color
Resources.Theme theme = context.getTheme();
TypedArray styledAttributes = theme.obtainStyledAttributes(new int[] {
- R.attr.colorAccent
+ R.attr.colorAccent, R.attr.dimmedNeutralColor
+
});
themeAccentColor = styledAttributes.getColor(styledAttributes.getIndex(0), getResources().getColor(R.color.accent_default));
+ dimmedNeutralColor = styledAttributes.getColor(styledAttributes.getIndex(1), getResources().getColor(R.color.white_dim_26pct));
styledAttributes.recycle();
this.hostManager = HostManager.getInstance(context);
@@ -356,7 +359,7 @@ public class MovieListFragment extends AbstractCursorListFragment {
final View view = LayoutInflater.from(getContext())
.inflate(R.layout.grid_item_movie, parent, false);
- return new ViewHolder(view, getContext(), themeAccentColor, hostManager, artWidth, artHeight);
+ return new ViewHolder(view, getContext(), themeAccentColor, dimmedNeutralColor, hostManager, artWidth, artHeight);
}
protected int getSectionColumnIdx() { return MovieListQuery.TITLE; }
@@ -376,16 +379,17 @@ public class MovieListFragment extends AbstractCursorListFragment {
int artWidth;
int artHeight;
Context context;
- int themeAccentColor;
+ int themeAccentColor, dimmedNeutralColor;
AbstractFragment.DataHolder dataHolder = new AbstractFragment.DataHolder(0);
- ViewHolder(View itemView, Context context, int themeAccentColor,
+ ViewHolder(View itemView, Context context, int themeAccentColor, int dimmedNeutralColor,
HostManager hostManager,
int artWidth, int artHeight) {
super(itemView);
this.context = context;
this.themeAccentColor = themeAccentColor;
+ this.dimmedNeutralColor = dimmedNeutralColor;
this.hostManager = hostManager;
this.artWidth = artWidth;
this.artHeight = artHeight;
@@ -432,11 +436,16 @@ public class MovieListFragment extends AbstractCursorListFragment {
dataHolder.getTitle(),
artView, artWidth, artHeight);
- if (showWatchedStatus && (cursor.getInt(MovieListQuery.PLAYCOUNT) > 0)) {
+ if (showWatchedStatus) {
checkmarkView.setVisibility(View.VISIBLE);
- checkmarkView.setColorFilter(themeAccentColor);
- } else {
- checkmarkView.setVisibility(View.INVISIBLE);
+ if (cursor.getInt(MovieListQuery.PLAYCOUNT) > 0) {
+ checkmarkView.setColorFilter(themeAccentColor);
+ } else {
+ checkmarkView.setColorFilter(dimmedNeutralColor, PorterDuff.Mode.SRC_IN);
+ }
+ }
+ else {
+ checkmarkView.setVisibility(View.GONE);
}
if (Utils.isLollipopOrLater()) {
diff --git a/app/src/main/res/layout/grid_item_movie.xml b/app/src/main/res/layout/grid_item_movie.xml
index 5ed2cc8..208a9c1 100644
--- a/app/src/main/res/layout/grid_item_movie.xml
+++ b/app/src/main/res/layout/grid_item_movie.xml
@@ -24,7 +24,7 @@
tools:layout_width="match_parent"
tools:layout_height="100dp">
-
@@ -44,10 +44,10 @@
style="@style/TextAppearance.Medialist.Title"
android:layout_width="0dp"
android:layout_height="wrap_content"
- app:layout_constraintRight_toRightOf="parent"
- app:layout_constraintLeft_toRightOf="@id/art"
- app:layout_constraintStart_toEndOf="@id/art"
app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintLeft_toRightOf="@id/art"
+ app:layout_constraintRight_toRightOf="parent"
+ app:layout_constraintStart_toEndOf="@id/art"
app:layout_constraintTop_toTopOf="@id/art" />
+ app:layout_constraintEnd_toStartOf="@id/rating_bar"
+ app:layout_constraintStart_toStartOf="@id/title" />
+ app:icon="?attr/iconRating"
+ app:layout_constraintBottom_toBottomOf="@id/meta_info"
+ app:layout_constraintEnd_toStartOf="@id/checkmark"
+ app:layout_constraintRight_toLeftOf="@id/checkmark"
+ app:layout_constraintTop_toTopOf="@id/meta_info" />
+ app:layout_constraintBottom_toBottomOf="@id/meta_info"
+ app:layout_constraintRight_toRightOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
\ No newline at end of file
diff --git a/app/src/main/res/values/attr.xml b/app/src/main/res/values/attr.xml
index a147752..0441ae4 100644
--- a/app/src/main/res/values/attr.xml
+++ b/app/src/main/res/values/attr.xml
@@ -144,5 +144,8 @@
+
+
+
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index e9c470e..61d27d7 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -370,6 +370,7 @@
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
index 3e45561..25a6252 100644
--- a/app/src/main/res/values/themes.xml
+++ b/app/src/main/res/values/themes.xml
@@ -95,6 +95,8 @@
- @color/white_dim_26pct
- ?attr/colorAccent
+ - @color/white_dim_26pct
+
- @drawable/ic_plus_white_24dp
- @drawable/ic_play_arrow_white_24dp
@@ -240,6 +242,8 @@
- @color/black_dim_26pct
- ?attr/colorAccent
+ - @color/black_dim_26pct
+
- @drawable/ic_plus_white_24dp
- @drawable/ic_play_arrow_white_24dp