Visual fixes for feedback from 0.27

This commit is contained in:
RyanBateman 2012-09-27 14:48:12 -04:00
parent f7e68939e4
commit 98420300be
25 changed files with 110 additions and 73 deletions

View file

@ -0,0 +1,11 @@
<?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>

View file

@ -0,0 +1,11 @@
<?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>

View file

@ -29,16 +29,25 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp" >
<ImageView
android:id="@+id/reading_feed_icon"
android:layout_width="17dp"
android:layout_height="17dp"
android:layout_alignParentLeft="true"
android:layout_marginTop="10dp"
android:layout_marginRight="5dp"
android:contentDescription="@string/description_row_folder_icon" />
<TextView
android:id="@+id/reading_feed_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:paddingTop="10dp"
android:layout_marginTop="7dp"
android:layout_toRightOf="@id/reading_feed_icon"
android:layout_alignParentBottom="@id/reading_feed_icon"
android:textColor="@color/newsblur_blue"
android:textSize="13sp" />
android:textSize="16dp" />
<TextView
android:id="@+id/reading_item_date"

View file

@ -4,8 +4,8 @@
android:layout_height="match_parent"
android:background="@drawable/selector_feed_background"
android:orientation="vertical"
android:paddingBottom="8dp"
android:paddingTop="8dp" >
android:paddingBottom="7dp"
android:paddingTop="7dp" >
<LinearLayout
android:id="@+id/row_feedcounters"
@ -27,10 +27,9 @@
android:gravity="center"
android:textColor="@color/black"
android:textSize="14sp"
android:paddingTop="1dp"
android:paddingBottom="2dp"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:paddingLeft="3dp"
android:paddingRight="3dp"
android:paddingBottom="1dp"
android:textStyle="bold" />
<TextView

View file

@ -3,8 +3,7 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/selector_folder_background"
android:paddingBottom="10dp"
android:paddingTop="10dp" >
>
<ImageView
android:id="@+id/row_folder_icon"
@ -68,6 +67,8 @@
android:layout_toRightOf="@id/row_folder_icon"
android:layout_toLeftOf="@id/row_foldersums"
android:textColor="@color/folder_text"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:textSize="16dp"
android:textStyle="bold" />

View file

@ -3,8 +3,8 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/selector_feed_background"
android:paddingBottom="3dp"
android:paddingTop="3dp" >
android:paddingBottom="2dp"
android:paddingTop="2dp">
<LinearLayout
android:id="@+id/row_foldersums"

View file

@ -40,7 +40,7 @@
android:id="@+id/row_item_feedtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginLeft="4dp"
android:layout_toRightOf="@id/row_item_feedicon"
android:layout_alignBottom="@id/row_item_feedicon"
android:ellipsize="end"

View file

@ -40,11 +40,13 @@
<color name="half_lightgray">#77dddddd</color>
<color name="positive">#47730B</color>
<color name="positive_read">#75be13</color>
<color name="highlight">#d2e6fd</color>
<color name="darkneutral">#C59A00</color>
<color name="neutral">#F5A90C</color>
<color name="neutral_read">#ffdc43</color>
<color name="linkblue">#405BA8</color>

View file

@ -134,5 +134,7 @@
<string name="add_follow">All Done!</string>
<string name="share_with_comments">Share with comments</string>
<string name="share_this_story">Share this story</string>
<string name="comment_favourited">Comment favorited</string>
<string name="error_liking_comment">Error favoriting comment</string>
</resources>

View file

@ -22,6 +22,7 @@ public abstract class ItemsList extends SherlockFragmentActivity implements Sync
public static final String EXTRA_BLURBLOG_USERID = "blurblogId";
public static final String EXTRA_BLURBLOG_USER_ICON = "userIcon";
public static final String RESULT_EXTRA_READ_STORIES = "storiesToMarkAsRead";
public static final String EXTRA_BLURBLOG_TITLE = "blurblogTitle";
protected ItemListFragment itemListFragment;
protected FragmentManager fragmentManager;

View file

@ -17,9 +17,7 @@ import com.newsblur.service.SyncService;
public class SocialFeedItemsList extends ItemsList {
private String username;
private String userId;
private String userIcon;
private String userIcon, userId, username, title;
private boolean stopLoading = false;
private APIManager apiManager;
@ -32,8 +30,9 @@ public class SocialFeedItemsList extends ItemsList {
username = getIntent().getStringExtra(EXTRA_BLURBLOG_USERNAME);
userIcon = getIntent().getStringExtra(EXTRA_BLURBLOG_USER_ICON );
userId = getIntent().getStringExtra(EXTRA_BLURBLOG_USERID);
title = getIntent().getStringExtra(EXTRA_BLURBLOG_TITLE);
setTitle(username);
setTitle(title);
if (itemListFragment == null) {
itemListFragment = SocialFeedItemListFragment.newInstance(userId, username, currentState);

View file

@ -89,6 +89,7 @@ public class BlurDatabase extends SQLiteOpenHelper {
DatabaseConstants.STORY_DATE + TEXT + ", " +
DatabaseConstants.STORY_SHARED_DATE + TEXT + ", " +
DatabaseConstants.STORY_SHORTDATE + TEXT + ", " +
DatabaseConstants.STORY_LONGDATE + TEXT + ", " +
DatabaseConstants.STORY_FEED_ID + INTEGER + ", " +
DatabaseConstants.STORY_ID + TEXT + " PRIMARY KEY, " +
DatabaseConstants.STORY_INTELLIGENCE_AUTHORS + INTEGER + ", " +

View file

@ -80,6 +80,7 @@ public class DatabaseConstants {
public static final String STORY_FRIEND_USER_IDS = "comment_user_ids";
public static final String STORY_PUBLIC_USER_IDS = "public_user_ids";
public static final String STORY_SHORTDATE = "shortDate";
public static final String STORY_LONGDATE = "longDate";
public static final String STORY_SOCIAL_USER_ID = "socialUserId";
public static final String STORY_SOURCE_USER_ID = "sourceUserId";
public static final String STORY_TAGS = "tags";
@ -134,7 +135,7 @@ public class DatabaseConstants {
};
public static final String[] STORY_COLUMNS = {
STORY_AUTHORS, STORY_COMMENT_COUNT, STORY_CONTENT, STORY_DATE, STORY_SHARED_DATE, STORY_SHORTDATE, STORY_TABLE + "." + STORY_FEED_ID, STORY_TABLE + "." + STORY_ID, STORY_INTELLIGENCE_AUTHORS, STORY_INTELLIGENCE_FEED, STORY_INTELLIGENCE_TAGS, STORY_INTELLIGENCE_TITLE,
STORY_AUTHORS, STORY_COMMENT_COUNT, STORY_CONTENT, STORY_DATE, STORY_SHARED_DATE, STORY_SHORTDATE, STORY_LONGDATE, STORY_TABLE + "." + STORY_FEED_ID, STORY_TABLE + "." + STORY_ID, STORY_INTELLIGENCE_AUTHORS, STORY_INTELLIGENCE_FEED, STORY_INTELLIGENCE_TAGS, STORY_INTELLIGENCE_TITLE,
STORY_PERMALINK, STORY_READ, STORY_SHARE_COUNT, STORY_TAGS, STORY_TITLE, STORY_SOCIAL_USER_ID, STORY_SOURCE_USER_ID, STORY_SHARED_USER_IDS, STORY_FRIEND_USER_IDS, STORY_PUBLIC_USER_IDS
};

View file

@ -8,6 +8,7 @@ import android.support.v4.widget.SimpleCursorAdapter;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.newsblur.R;
@ -18,15 +19,13 @@ public class FeedItemsAdapter extends SimpleCursorAdapter {
private Cursor cursor;
private final Feed feed;
private int storyTitleUnread, storyTitleRead, storyAuthorUnread, storyAuthorRead, storyDateUnread, storyDateRead;
private int storyAuthorUnread, storyAuthorRead, storyDateUnread, storyDateRead;
public FeedItemsAdapter(Context context, Feed feed, int layout, Cursor c, String[] from, int[] to, int flags) {
super(context, layout, c, from, to, flags);
this.feed = feed;
this.cursor = c;
storyTitleUnread = context.getResources().getColor(R.color.story_title_unread);
storyTitleRead = context.getResources().getColor(R.color.story_title_read);
storyAuthorUnread = context.getResources().getColor(R.color.story_author_unread);
storyAuthorRead = context.getResources().getColor(R.color.story_author_read);
storyDateUnread = context.getResources().getColor(R.color.story_date_unread);
@ -49,7 +48,6 @@ public class FeedItemsAdapter extends SimpleCursorAdapter {
View v = super.getView(position, view, viewGroup);
View borderOne = v.findViewById(R.id.row_item_favicon_borderbar_1);
View borderTwo = v.findViewById(R.id.row_item_favicon_borderbar_2);
View sidebar = v.findViewById(R.id.row_item_sidebar);
cursor.moveToPosition(position);
if (!TextUtils.equals(feed.faviconColour, "#null") && !TextUtils.equals(feed.faviconFade, "#null")) {
@ -64,16 +62,21 @@ public class FeedItemsAdapter extends SimpleCursorAdapter {
if (Story.fromCursor(cursor).read == 0) {
((TextView) v.findViewById(R.id.row_item_author)).setTextColor(storyAuthorUnread);
((TextView) v.findViewById(R.id.row_item_date)).setTextColor(storyDateUnread);
((TextView) v.findViewById(R.id.row_item_date)).setTypeface(null, Typeface.NORMAL);
((TextView) v.findViewById(R.id.row_item_author)).setTypeface(null, Typeface.BOLD);
((TextView) v.findViewById(R.id.row_item_title)).setTypeface(null, Typeface.BOLD);
borderOne.getBackground().setAlpha(255);
sidebar.getBackground().setAlpha(255);
borderTwo.getBackground().setAlpha(255);
} else {
((TextView) v.findViewById(R.id.row_item_author)).setTextColor(storyAuthorRead);
((TextView) v.findViewById(R.id.row_item_date)).setTextColor(storyDateRead);
((TextView) v.findViewById(R.id.row_item_date)).setTypeface(null, Typeface.NORMAL);
((TextView) v.findViewById(R.id.row_item_author)).setTypeface(null, Typeface.NORMAL);
((TextView) v.findViewById(R.id.row_item_title)).setTypeface(null, Typeface.NORMAL);
borderOne.getBackground().setAlpha(125);
sidebar.getBackground().setAlpha(125);
borderTwo.getBackground().setAlpha(125);
}

View file

@ -29,7 +29,7 @@ public class FeedReadingAdapter extends ReadingAdapter {
return loadingFragment;
} else {
stories.moveToPosition(position);
return ReadingItemFragment.newInstance(Story.fromCursor(stories), feed.title, feed.faviconColour, feed.faviconFade, classifier, false);
return ReadingItemFragment.newInstance(Story.fromCursor(stories), feed.title, feed.faviconColour, feed.faviconFade, feed.faviconUrl, classifier, false);
}
}

View file

@ -34,12 +34,13 @@ public class MixedFeedsReadingAdapter extends ReadingAdapter {
String feedTitle = stories.getString(stories.getColumnIndex(DatabaseConstants.FEED_TITLE));
String feedFaviconColor = stories.getString(stories.getColumnIndex(DatabaseConstants.FEED_FAVICON_BORDER));
String feedFaviconFade = stories.getString(stories.getColumnIndex(DatabaseConstants.FEED_FAVICON_COLOUR));
String feedFaviconUrl = stories.getString(stories.getColumnIndex(DatabaseConstants.FEED_FAVICON_URL));
Uri classifierUri = FeedProvider.CLASSIFIER_URI.buildUpon().appendPath(story.feedId).build();
Cursor feedClassifierCursor = resolver.query(classifierUri, null, null, null, null);
Classifier classifier = Classifier.fromCursor(feedClassifierCursor);
return ReadingItemFragment.newInstance(story, feedTitle, feedFaviconColor, feedFaviconFade, classifier, true);
return ReadingItemFragment.newInstance(story, feedTitle, feedFaviconColor, feedFaviconFade, feedFaviconUrl, classifier, true);
}
}

View file

@ -53,7 +53,6 @@ public class MultipleFeedItemsAdapter extends SimpleCursorAdapter {
View v = super.getView(position, view, viewGroup);
View borderOne = v.findViewById(R.id.row_item_favicon_borderbar_1);
View borderTwo = v.findViewById(R.id.row_item_favicon_borderbar_2);
View sidebar = v.findViewById(R.id.row_item_sidebar);
cursor.moveToPosition(position);
String feedColour = cursor.getString(cursor.getColumnIndex(DatabaseConstants.FEED_FAVICON_BORDER));
@ -76,20 +75,28 @@ public class MultipleFeedItemsAdapter extends SimpleCursorAdapter {
((TextView) v.findViewById(R.id.row_item_date)).setTextColor(storyDateUnread);
((TextView) v.findViewById(R.id.row_item_feedtitle)).setTextColor(storyFeedUnread);
((TextView) v.findViewById(R.id.row_item_title)).setTextColor(storyTitleUnread);
((TextView) v.findViewById(R.id.row_item_feedtitle)).setTypeface(null, Typeface.BOLD);
((TextView) v.findViewById(R.id.row_item_date)).setTypeface(null, Typeface.BOLD);
((TextView) v.findViewById(R.id.row_item_author)).setTypeface(null, Typeface.BOLD);
((TextView) v.findViewById(R.id.row_item_title)).setTypeface(null, Typeface.BOLD);
((ImageView) v.findViewById(R.id.row_item_feedicon)).setAlpha(255);
borderOne.getBackground().setAlpha(255);
sidebar.getBackground().setAlpha(255);
borderTwo.getBackground().setAlpha(255);
} else {
((TextView) v.findViewById(R.id.row_item_author)).setTextColor(storyAuthorRead);
((TextView) v.findViewById(R.id.row_item_date)).setTextColor(storyDateRead);
((TextView) v.findViewById(R.id.row_item_feedtitle)).setTextColor(storyFeedRead);
((TextView) v.findViewById(R.id.row_item_title)).setTextColor(storyTitleRead);
((TextView) v.findViewById(R.id.row_item_feedtitle)).setTypeface(null, Typeface.NORMAL);
((TextView) v.findViewById(R.id.row_item_date)).setTypeface(null, Typeface.NORMAL);
((TextView) v.findViewById(R.id.row_item_author)).setTypeface(null, Typeface.NORMAL);
((TextView) v.findViewById(R.id.row_item_title)).setTypeface(null, Typeface.NORMAL);
((ImageView) v.findViewById(R.id.row_item_feedicon)).setAlpha(125);
borderOne.getBackground().setAlpha(125);
sidebar.getBackground().setAlpha(125);
borderTwo.getBackground().setAlpha(125);
}

View file

@ -76,6 +76,9 @@ public class Story implements Serializable {
@SerializedName("short_parsed_date")
public String shortDate;
@SerializedName("long_parsed_date")
public String longDate;
public ContentValues getValues() {
final ContentValues values = new ContentValues();
values.put(DatabaseConstants.STORY_ID, id);
@ -83,6 +86,7 @@ public class Story implements Serializable {
values.put(DatabaseConstants.STORY_DATE, date.getTime());
values.put(DatabaseConstants.STORY_SHARED_DATE, sharedDate != null ? sharedDate.getTime() : new Date().getTime());
values.put(DatabaseConstants.STORY_SHORTDATE, shortDate);
values.put(DatabaseConstants.STORY_LONGDATE, longDate);
values.put(DatabaseConstants.STORY_CONTENT, content);
values.put(DatabaseConstants.STORY_PERMALINK, permalink);
values.put(DatabaseConstants.STORY_COMMENT_COUNT, commentCount);
@ -111,6 +115,7 @@ public class Story implements Serializable {
story.date = new Date(cursor.getLong(cursor.getColumnIndex(DatabaseConstants.STORY_DATE)));
story.sharedDate = new Date(cursor.getLong(cursor.getColumnIndex(DatabaseConstants.STORY_DATE)));
story.shortDate = cursor.getString(cursor.getColumnIndex(DatabaseConstants.STORY_SHORTDATE));
story.longDate = cursor.getString(cursor.getColumnIndex(DatabaseConstants.STORY_LONGDATE));
story.shareCount = cursor.getString(cursor.getColumnIndex(DatabaseConstants.STORY_SHARE_COUNT));
story.commentCount = cursor.getInt(cursor.getColumnIndex(DatabaseConstants.STORY_COMMENT_COUNT));
story.socialUserId = cursor.getString(cursor.getColumnIndex(DatabaseConstants.STORY_SOCIAL_USER_ID));

View file

@ -122,7 +122,7 @@ public class FolderListFragment extends Fragment implements OnGroupClickListener
private void checkOpenFolderPreferences() {
for (int i = 0; i < folderAdapter.getGroupCount(); i++) {
long groupId = folderAdapter.getGroupId(i);
if (sharedPreferences.getBoolean(AppConstants.FOLDER_PRE + groupId, false)) {
if (sharedPreferences.getBoolean(AppConstants.FOLDER_PRE + groupId, true)) {
list.expandGroup(i);
}
}
@ -271,10 +271,12 @@ public class FolderListFragment extends Fragment implements OnGroupClickListener
String username = blurblogCursor.getString(blurblogCursor.getColumnIndex(DatabaseConstants.SOCIAL_FEED_USERNAME));
String userIcon = blurblogCursor.getString(blurblogCursor.getColumnIndex(DatabaseConstants.SOCIAL_FEED_ICON));
String userId = blurblogCursor.getString(blurblogCursor.getColumnIndex(DatabaseConstants.SOCIAL_FEED_ID));
String blurblogTitle = blurblogCursor.getString(blurblogCursor.getColumnIndex(DatabaseConstants.SOCIAL_FEED_TITLE));
final Intent intent = new Intent(getActivity(), SocialFeedItemsList.class);
intent.putExtra(ItemsList.EXTRA_BLURBLOG_USER_ICON, userIcon);
intent.putExtra(ItemsList.EXTRA_BLURBLOG_USERNAME, username);
intent.putExtra(ItemsList.EXTRA_BLURBLOG_TITLE, blurblogTitle);
intent.putExtra(ItemsList.EXTRA_BLURBLOG_USERID, userId);
intent.putExtra(ItemsList.EXTRA_STATE, currentState);
getActivity().startActivityForResult(intent, FEEDCHECK );

View file

@ -48,7 +48,7 @@ public class ReadingItemFragment extends Fragment implements ClassifierDialogFra
private LayoutInflater inflater;
private APIManager apiManager;
private ImageLoader imageLoader;
private String feedColor, feedTitle, feedFade;
private String feedColor, feedTitle, feedFade, feedIconUrl;
private Classifier classifier;
private ContentResolver resolver;
private NewsblurWebview web;
@ -60,8 +60,9 @@ public class ReadingItemFragment extends Fragment implements ClassifierDialogFra
private View view;
private UserDetails user;
public String previouslySavedShareText;
private ImageView feedIcon;
public static ReadingItemFragment newInstance(Story story, String feedTitle, String feedFaviconColor, String feedFaviconFade, Classifier classifier, boolean displayFeedDetails) {
public static ReadingItemFragment newInstance(Story story, String feedTitle, String feedFaviconColor, String feedFaviconFade, String faviconUrl, Classifier classifier, boolean displayFeedDetails) {
ReadingItemFragment readingFragment = new ReadingItemFragment();
Bundle args = new Bundle();
@ -69,6 +70,7 @@ public class ReadingItemFragment extends Fragment implements ClassifierDialogFra
args.putString("feedTitle", feedTitle);
args.putString("feedColor", feedFaviconColor);
args.putString("feedFade", feedFaviconFade);
args.putString("faviconUrl", faviconUrl);
args.putBoolean("displayFeedDetails", displayFeedDetails);
args.putSerializable("classifier", classifier);
readingFragment.setArguments(args);
@ -91,6 +93,7 @@ public class ReadingItemFragment extends Fragment implements ClassifierDialogFra
user = PrefsUtils.getUserDetails(getActivity());
feedIconUrl = getArguments().getString("faviconUrl");
feedTitle = getArguments().getString("feedTitle");
feedColor = getArguments().getString("feedColor");
feedFade = getArguments().getString("feedFade");
@ -173,12 +176,17 @@ public class ReadingItemFragment extends Fragment implements ClassifierDialogFra
TextView itemDate = (TextView) view.findViewById(R.id.reading_item_date);
itemAuthors = (TextView) view.findViewById(R.id.reading_item_authors);
itemFeed = (TextView) view.findViewById(R.id.reading_feed_title);
feedIcon = (ImageView) view.findViewById(R.id.reading_feed_icon);
if (!displayFeedDetails) {
itemFeed.setVisibility(View.GONE);
feedIcon.setVisibility(View.GONE);
} else {
imageLoader.displayImage(feedIconUrl, feedIcon);
itemFeed.setText(feedTitle);
}
itemDate.setText(story.shortDate);
itemDate.setText(story.longDate);
itemTitle.setText(story.title);
if (!TextUtils.isEmpty(story.authors)) {
@ -201,8 +209,6 @@ public class ReadingItemFragment extends Fragment implements ClassifierDialogFra
}
});
itemFeed.setText(feedTitle);
itemTitle.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {

View file

@ -51,9 +51,9 @@ public class LikeCommentTask extends AsyncTask<Void, Void, Boolean>{
newArray[newArray.length - 1] = userId;
comment.likingUsers = newArray;
Toast.makeText(context, "Comment liked", Toast.LENGTH_SHORT).show();
Toast.makeText(context, R.string.comment_favourited, Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(context, "Error liking comment", Toast.LENGTH_SHORT).show();
Toast.makeText(context, R.string.error_liking_comment, Toast.LENGTH_SHORT).show();
}
}
}

View file

@ -1,27 +0,0 @@
package com.newsblur.network;
import java.lang.ref.WeakReference;
import android.os.AsyncTask;
import android.widget.ImageView;
public class MarkCommentAsFavouriteTask extends AsyncTask<Void, Void, Void> {
WeakReference<ImageView> referenceToView;
private String commentId;
public MarkCommentAsFavouriteTask(ImageView favouriteIconView, final String commentId) {
this.commentId = commentId;
referenceToView = new WeakReference<ImageView>(favouriteIconView);
}
@Override
protected Void doInBackground(Void... params) {
// TODO Auto-generated method stub
return null;
}
}

View file

@ -25,10 +25,11 @@ public class FeedItemViewBinder implements ViewBinder {
@Override
public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
final String columnName = cursor.getColumnName(columnIndex);
int hasBeenRead = cursor.getInt(cursor.getColumnIndex(DatabaseConstants.STORY_READ));
if (TextUtils.equals(columnName, DatabaseConstants.STORY_READ)) {
String read = cursor.getString(columnIndex);
if (TextUtils.equals(read, "0")) {
if (hasBeenRead == 0) {
((TextView) view).setTextColor(darkGray);
} else {
((TextView) view).setTextColor(lightGray);
}
@ -43,13 +44,14 @@ public class FeedItemViewBinder implements ViewBinder {
return true;
} else if (TextUtils.equals(columnName, DatabaseConstants.STORY_INTELLIGENCE_AUTHORS)) {
int authors = cursor.getInt(columnIndex);
int tags = cursor.getInt(cursor.getColumnIndex(DatabaseConstants.STORY_INTELLIGENCE_TAGS));
int feed = cursor.getInt(cursor.getColumnIndex(DatabaseConstants.STORY_INTELLIGENCE_FEED));
int title = cursor.getInt(cursor.getColumnIndex(DatabaseConstants.STORY_INTELLIGENCE_TITLE));
if (authors + tags + feed + title > 0) {
view.setBackgroundResource(R.drawable.positive_count_circle);
view.setBackgroundResource(hasBeenRead == 0 ? R.drawable.positive_count_circle : R.drawable.positive_count_circle_read);
} else if (authors + tags + feed + title == 0) {
view.setBackgroundResource(R.drawable.neutral_count_circle);
view.setBackgroundResource(hasBeenRead == 0 ? R.drawable.neutral_count_circle : R.drawable.neutral_count_circle_read);
} else {
view.setBackgroundResource(R.drawable.negative_count_circle);
}

View file

@ -46,7 +46,7 @@ public class SocialFeedViewBinder implements ViewBinder {
return true;
} else if (TextUtils.equals(cursor.getColumnName(columnIndex), DatabaseConstants.SOCIAL_FEED_ICON)) {
String url = cursor.getString(columnIndex);
imageLoader.displayImage(url, (ImageView) view);
imageLoader.displayImage(url, (ImageView) view, false);
return true;
} else if (TextUtils.equals(cursor.getColumnName(columnIndex), DatabaseConstants.SOCIAL_FEED_NEGATIVE_COUNT)) {
int feedNegative = cursor.getInt(columnIndex);

View file

@ -24,6 +24,7 @@ public class SocialItemViewBinder implements ViewBinder {
@Override
public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
final String columnName = cursor.getColumnName(columnIndex);
final int hasBeenRead = cursor.getInt(cursor.getColumnIndex(DatabaseConstants.STORY_READ));
if (TextUtils.equals(cursor.getColumnName(columnIndex), DatabaseConstants.FEED_FAVICON_URL)) {
String faviconUrl = cursor.getString(columnIndex);
imageLoader.displayImage(faviconUrl, ((ImageView) view), false);
@ -34,9 +35,9 @@ public class SocialItemViewBinder implements ViewBinder {
int feed = cursor.getInt(cursor.getColumnIndex(DatabaseConstants.STORY_INTELLIGENCE_FEED));
int title = cursor.getInt(cursor.getColumnIndex(DatabaseConstants.STORY_INTELLIGENCE_TITLE));
if (authors + tags + feed + title > 0) {
view.setBackgroundResource(R.drawable.positive_count_circle);
view.setBackgroundResource(hasBeenRead == 0 ? R.drawable.positive_count_circle : R.drawable.positive_count_circle_read);
} else if (authors + tags + feed + title == 0) {
view.setBackgroundResource(R.drawable.neutral_count_circle);
view.setBackgroundResource(hasBeenRead == 0 ? R.drawable.neutral_count_circle : R.drawable.neutral_count_circle_read);
} else {
view.setBackgroundResource(R.drawable.negative_count_circle);
}