mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Switch to new dot icons, fix overlap in list view.
This commit is contained in:
parent
a2c82a6853
commit
0d99487c8d
12 changed files with 28 additions and 85 deletions
BIN
media/android/NewsBlur/res/drawable/g_icn_hidden.png
Normal file
BIN
media/android/NewsBlur/res/drawable/g_icn_hidden.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 648 B |
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<item>
|
||||
<shape android:shape="oval" >
|
||||
<solid android:color="@color/negative" />
|
||||
<stroke android:width="3dp" android:color="@color/item_background" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<item>
|
||||
<shape android:shape="oval" >
|
||||
<solid android:color="@color/negative" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<item>
|
||||
<shape android:shape="oval" >
|
||||
<solid android:color="@color/neutral" />
|
||||
<stroke android:width="3dp" android:color="@color/item_background" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<item>
|
||||
<shape android:shape="oval" >
|
||||
<solid android:color="@color/neutral_read" />
|
||||
<stroke android:width="3dp" android:color="@color/item_background" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<item>
|
||||
<shape android:shape="oval" >
|
||||
<solid android:color="@color/positive" />
|
||||
<stroke android:width="3dp" android:color="@color/item_background" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<item>
|
||||
<shape android:shape="oval" >
|
||||
<solid android:color="@color/positive_read" />
|
||||
<stroke android:width="3dp" android:color="@color/item_background" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
|
@ -22,11 +22,11 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/row_item_sidebar"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@id/row_item_favicon_borderbar_1" />
|
||||
android:layout_toRightOf="@id/row_item_favicon_borderbar_2" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/row_item_feedicon"
|
||||
|
@ -90,4 +90,4 @@
|
|||
android:textSize="11dp" />
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -22,11 +22,11 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/row_item_sidebar"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_toRightOf="@id/row_item_favicon_borderbar_1" />
|
||||
android:layout_toRightOf="@id/row_item_favicon_borderbar_2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/row_item_title"
|
||||
|
@ -66,4 +66,4 @@
|
|||
android:textSize="11dp" />
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -22,11 +22,11 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/row_item_sidebar"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_toRightOf="@id/row_item_favicon_borderbar_1" />
|
||||
android:layout_toRightOf="@id/row_item_favicon_borderbar_2" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/row_item_feedicon"
|
||||
|
@ -87,4 +87,4 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.net.URLDecoder;
|
|||
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.support.v4.widget.SimpleCursorAdapter.ViewBinder;
|
||||
import android.text.Html;
|
||||
import android.text.TextUtils;
|
||||
|
@ -56,13 +57,16 @@ public class FeedItemViewBinder implements ViewBinder {
|
|||
int title = cursor.getInt(cursor.getColumnIndex(DatabaseConstants.STORY_INTELLIGENCE_TITLE));
|
||||
int score = Story.getIntelligenceTotal(title, authors, tags, feed);
|
||||
|
||||
if (score > 0) {
|
||||
view.setBackgroundResource(hasBeenRead == 0 ? R.drawable.positive_count_circle : R.drawable.positive_count_circle_read);
|
||||
Drawable icon;
|
||||
if (score > 0) {
|
||||
icon = view.getResources().getDrawable(R.drawable.g_icn_focus);
|
||||
} else if (score == 0) {
|
||||
view.setBackgroundResource(hasBeenRead == 0 ? R.drawable.neutral_count_circle : R.drawable.neutral_count_circle_read);
|
||||
icon = view.getResources().getDrawable(R.drawable.g_icn_unread);
|
||||
} else {
|
||||
view.setBackgroundResource(R.drawable.negative_count_circle);
|
||||
icon = view.getResources().getDrawable(R.drawable.g_icn_hidden);
|
||||
}
|
||||
icon.mutate().setAlpha(hasBeenRead == 0 ? 255 : 127);
|
||||
view.setBackgroundDrawable(icon);
|
||||
|
||||
((TextView) view).setText("");
|
||||
return true;
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.newsblur.view;
|
|||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.support.v4.widget.SimpleCursorAdapter.ViewBinder;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.Html;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
@ -39,13 +40,16 @@ public class SocialItemViewBinder implements ViewBinder {
|
|||
|
||||
int score = Story.getIntelligenceTotal(title, authors, tags, feed);
|
||||
|
||||
if (score > 0) {
|
||||
view.setBackgroundResource(hasBeenRead == 0 ? R.drawable.positive_count_circle : R.drawable.positive_count_circle_read);
|
||||
Drawable icon;
|
||||
if (score > 0) {
|
||||
icon = view.getResources().getDrawable(R.drawable.g_icn_focus);
|
||||
} else if (score == 0) {
|
||||
view.setBackgroundResource(hasBeenRead == 0 ? R.drawable.neutral_count_circle : R.drawable.neutral_count_circle_read);
|
||||
icon = view.getResources().getDrawable(R.drawable.g_icn_unread);
|
||||
} else {
|
||||
view.setBackgroundResource(R.drawable.negative_count_circle);
|
||||
icon = view.getResources().getDrawable(R.drawable.g_icn_hidden);
|
||||
}
|
||||
icon.mutate().setAlpha(hasBeenRead == 0 ? 255 : 127);
|
||||
view.setBackgroundDrawable(icon);
|
||||
|
||||
((TextView) view).setText("");
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue