use proper marked/published icons on dark theme headline views
This commit is contained in:
parent
2c615e430d
commit
3bb2daaf0e
@ -816,10 +816,11 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (holder.markedView != null) {
|
if (holder.markedView != null) {
|
||||||
holder.markedView.setImageResource(article.marked ? R.drawable.ic_star_dark : R.drawable.ic_star_outline_dark);
|
TypedValue tv = new TypedValue();
|
||||||
|
m_activity.getTheme().resolveAttribute(article.marked ? R.attr.ic_star : R.attr.ic_star_outline, tv, true);
|
||||||
|
|
||||||
|
holder.markedView.setImageResource(tv.resourceId);
|
||||||
|
|
||||||
holder.markedView.setOnClickListener(new OnClickListener() {
|
holder.markedView.setOnClickListener(new OnClickListener() {
|
||||||
|
|
||||||
@ -834,9 +835,11 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (holder.publishedView != null) {
|
if (holder.publishedView != null) {
|
||||||
holder.publishedView.setImageResource(article.published ? R.drawable.ic_checkbox_marked_dark : R.drawable.ic_rss_box_dark);
|
TypedValue tv = new TypedValue();
|
||||||
|
m_activity.getTheme().resolveAttribute(article.published ? R.attr.ic_checkbox_marked : R.attr.ic_rss_box, tv, true);
|
||||||
|
|
||||||
|
holder.publishedView.setImageResource(tv.resourceId);
|
||||||
|
|
||||||
holder.publishedView.setOnClickListener(new OnClickListener() {
|
holder.publishedView.setOnClickListener(new OnClickListener() {
|
||||||
|
|
||||||
|
@ -655,7 +655,10 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (holder.markedView != null) {
|
if (holder.markedView != null) {
|
||||||
holder.markedView.setImageResource(article.getInt(article.getColumnIndex("marked")) == 1 ? R.drawable.ic_star_dark : R.drawable.ic_star_outline_dark);
|
TypedValue tv = new TypedValue();
|
||||||
|
m_activity.getTheme().resolveAttribute(article.getInt(article.getColumnIndex("marked")) == 1 ? R.attr.ic_star : R.attr.ic_star_outline, tv, true);
|
||||||
|
|
||||||
|
holder.markedView.setImageResource(tv.resourceId);
|
||||||
|
|
||||||
holder.markedView.setOnClickListener(new OnClickListener() {
|
holder.markedView.setOnClickListener(new OnClickListener() {
|
||||||
|
|
||||||
@ -674,7 +677,10 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (holder.publishedView != null) {
|
if (holder.publishedView != null) {
|
||||||
holder.publishedView.setImageResource(article.getInt(article.getColumnIndex("published")) == 1 ? R.drawable.ic_checkbox_marked_dark : R.drawable.ic_rss_box_dark);
|
TypedValue tv = new TypedValue();
|
||||||
|
m_activity.getTheme().resolveAttribute(article.getInt(article.getColumnIndex("published")) == 1 ? R.attr.ic_checkbox_marked : R.attr.ic_rss_box, tv, true);
|
||||||
|
|
||||||
|
holder.publishedView.setImageResource(tv.resourceId);
|
||||||
|
|
||||||
holder.publishedView.setOnClickListener(new OnClickListener() {
|
holder.publishedView.setOnClickListener(new OnClickListener() {
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@
|
|||||||
android:paddingRight="4dp"
|
android:paddingRight="4dp"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_star_outline_dark" />
|
android:src="?ic_star_outline" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/published"
|
android:id="@+id/published"
|
||||||
@ -170,7 +170,7 @@
|
|||||||
android:paddingRight="4dp"
|
android:paddingRight="4dp"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_rss_box_dark" />
|
android:src="?ic_rss_box" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/article_menu_button"
|
android:id="@+id/article_menu_button"
|
||||||
|
@ -111,7 +111,7 @@
|
|||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_star_outline_dark" />
|
android:src="?ic_star_outline" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@
|
|||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_star_outline_dark" />
|
android:src="?ic_star_outline" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -108,12 +108,13 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/marked"
|
android:id="@+id/marked"
|
||||||
|
android:tint="?headlineFooterColor"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_gravity="bottom|right"
|
android:layout_gravity="bottom|right"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_star_outline_dark" />
|
android:src="?ic_star_outline" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@
|
|||||||
android:paddingRight="4dp"
|
android:paddingRight="4dp"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_star_outline_dark" />
|
android:src="?ic_star_outline" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/published"
|
android:id="@+id/published"
|
||||||
@ -172,7 +172,7 @@
|
|||||||
android:paddingRight="4dp"
|
android:paddingRight="4dp"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_checkbox_marked_dark" />
|
android:src="?ic_checkbox_marked" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/article_menu_button"
|
android:id="@+id/article_menu_button"
|
||||||
|
@ -113,7 +113,7 @@
|
|||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:src="@drawable/ic_star_outline_dark" />
|
android:src="?ic_star_outline" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,4 +31,7 @@
|
|||||||
<attr name="articleHeaderSeparator" format="reference|color" />
|
<attr name="articleHeaderSeparator" format="reference|color" />
|
||||||
<attr name="ic_rss_box" format="reference"/>
|
<attr name="ic_rss_box" format="reference"/>
|
||||||
<attr name="ic_rss" format="reference"/>
|
<attr name="ic_rss" format="reference"/>
|
||||||
|
<attr name="ic_checkbox_marked" format="reference" />
|
||||||
|
<attr name="ic_star" format="reference" />
|
||||||
|
<attr name="ic_star_outline" format="reference" />
|
||||||
</resources>
|
</resources>
|
@ -39,6 +39,9 @@
|
|||||||
|
|
||||||
<item name="ic_rss_box">@drawable/ic_rss_box_dark</item>
|
<item name="ic_rss_box">@drawable/ic_rss_box_dark</item>
|
||||||
<item name="ic_rss">@drawable/ic_rss_dark</item>
|
<item name="ic_rss">@drawable/ic_rss_dark</item>
|
||||||
|
<item name="ic_checkbox_marked">@drawable/ic_checkbox_marked_dark</item>
|
||||||
|
<item name="ic_star">@drawable/ic_star_dark</item>
|
||||||
|
<item name="ic_star_outline">@drawable/ic_star_outline_dark</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="SepiaTheme" parent="LightTheme">
|
<style name="SepiaTheme" parent="LightTheme">
|
||||||
@ -124,6 +127,10 @@
|
|||||||
|
|
||||||
<item name="ic_rss_box">@drawable/ic_rss_box</item>
|
<item name="ic_rss_box">@drawable/ic_rss_box</item>
|
||||||
<item name="ic_rss">@drawable/ic_rss</item>
|
<item name="ic_rss">@drawable/ic_rss</item>
|
||||||
|
<item name="ic_checkbox_marked">@drawable/ic_checkbox_marked</item>
|
||||||
|
<item name="ic_star">@drawable/ic_star</item>
|
||||||
|
<item name="ic_star_outline">@drawable/ic_star_outline</item>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="DarkDialogTheme" parent="android:Theme"></style>
|
<style name="DarkDialogTheme" parent="android:Theme"></style>
|
||||||
|
Loading…
Reference in New Issue
Block a user