material design icon overhaul

This commit is contained in:
Andrew Dolgov 2015-06-01 16:30:23 +03:00
parent 2fc0f14c28
commit 2c615e430d
209 changed files with 108 additions and 235 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss"
android:versionCode="329"
android:versionName="1.103" >
android:versionCode="330"
android:versionName="1.104" >
<uses-sdk
android:minSdkVersion="15"

View File

@ -509,18 +509,6 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe
tu.setVisibility((cat.unread > 0) ? View.VISIBLE : View.INVISIBLE);
}
ImageView icon = (ImageView)v.findViewById(R.id.icon);
if (icon != null) {
if (m_activity.isDarkTheme()) {
icon.setImageResource(R.drawable.ic_published);
} else {
icon.setImageResource(R.drawable.ic_menu_published_dark);
}
//icon.setImageResource(cat.unread > 0 ? R.drawable.ic_published : R.drawable.ic_unpublished);
}
ImageButton ib = (ImageButton) v.findViewById(R.id.feed_menu_button);
if (ib != null) {

View File

@ -680,53 +680,6 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh
tu.setVisibility((feed.unread > 0) ? View.VISIBLE : View.INVISIBLE);
}
ImageView icon = (ImageView)v.findViewById(R.id.icon);
if (icon != null) {
if ((feed.is_cat && feed.always_display_as_feed) || (!feed.is_cat && feed.id == -4)) {
icon.setImageResource(R.drawable.ic_published_special);
/* } else if (m_enableFeedIcons) {
try {
File storage = m_activity.getExternalCacheDir();
File iconFile = new File(storage.getAbsolutePath() + ICON_PATH + feed.id + ".ico");
if (iconFile.exists()) {
Bitmap bmpOrig = BitmapFactory.decodeFile(iconFile.getAbsolutePath());
if (bmpOrig != null) {
icon.setImageBitmap(bmpOrig);
}
} else {
if (m_activity.isDarkTheme()) {
icon.setImageResource(R.drawable.ic_published);
} else {
icon.setImageResource(R.drawable.ic_menu_published_dark);
}
//icon.setImageResource(feed.unread > 0 ? R.drawable.ic_published : R.drawable.ic_unpublished);
}
} catch (NullPointerException e) {
//icon.setImageResource(feed.unread > 0 ? R.drawable.ic_published : R.drawable.ic_unpublished);
if (m_activity.isDarkTheme()) {
icon.setImageResource(R.drawable.ic_published);
} else {
icon.setImageResource(R.drawable.ic_menu_published_dark);
}
} */
} else {
//icon.setImageResource(feed.unread > 0 ? R.drawable.ic_published : R.drawable.ic_unpublished);
if (m_activity.isDarkTheme()) {
icon.setImageResource(R.drawable.ic_published);
} else {
icon.setImageResource(R.drawable.ic_menu_published_dark);
}
}
}
ImageButton ib = (ImageButton) v.findViewById(R.id.feed_menu_button);
if (ib != null) {

View File

@ -819,7 +819,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
if (holder.markedView != null) {
holder.markedView.setImageResource(article.marked ? R.drawable.ic_star_full : R.drawable.ic_star_empty);
holder.markedView.setImageResource(article.marked ? R.drawable.ic_star_dark : R.drawable.ic_star_outline_dark);
holder.markedView.setOnClickListener(new OnClickListener() {
@ -836,7 +836,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
if (holder.publishedView != null) {
holder.publishedView.setImageResource(article.published ? R.drawable.ic_published : R.drawable.ic_unpublished);
holder.publishedView.setImageResource(article.published ? R.drawable.ic_checkbox_marked_dark : R.drawable.ic_rss_box_dark);
holder.publishedView.setOnClickListener(new OnClickListener() {

View File

@ -920,6 +920,14 @@ public class OnlineActivity extends CommonActivity {
if (hf != null) hf.notifyUpdated();
}
return true;
case R.id.toggle_unread:
if (ap != null & ap.getSelectedArticle() != null) {
Article a = ap.getSelectedArticle();
a.unread = !a.unread;
saveArticleUnread(a);
if (hf != null) hf.notifyUpdated();
}
return true;
/* case R.id.selection_select_none:
if (hf != null) {
ArticleList selected = hf.getSelectedArticles();
@ -1549,11 +1557,14 @@ public class OnlineActivity extends CommonActivity {
Article article = ap.getSelectedArticle();
if (article != null) {
m_menu.findItem(R.id.toggle_marked).setIcon(article.marked ? R.drawable.ic_important_light :
R.drawable.ic_unimportant_light);
m_menu.findItem(R.id.toggle_marked).setIcon(article.marked ? R.drawable.ic_star :
R.drawable.ic_star_outline);
m_menu.findItem(R.id.toggle_published).setIcon(article.published ? R.drawable.ic_menu_published_light :
R.drawable.ic_menu_unpublished_light);
m_menu.findItem(R.id.toggle_published).setIcon(article.published ? R.drawable.ic_checkbox_marked :
R.drawable.ic_rss_box);
m_menu.findItem(R.id.toggle_unread).setIcon(article.unread ? R.drawable.ic_email :
R.drawable.ic_email_open);
}
}

View File

@ -586,11 +586,11 @@ public class OfflineActivity extends CommonActivity {
boolean marked = article.getInt(article.getColumnIndex("marked")) == 1;
boolean published = article.getInt(article.getColumnIndex("published")) == 1;
m_menu.findItem(R.id.toggle_marked).setIcon(marked ? R.drawable.ic_important_light :
R.drawable.ic_unimportant_light);
m_menu.findItem(R.id.toggle_marked).setIcon(marked ? R.drawable.ic_star :
R.drawable.ic_star_outline);
m_menu.findItem(R.id.toggle_published).setIcon(published ? R.drawable.ic_menu_published_light :
R.drawable.ic_menu_unpublished_light);
m_menu.findItem(R.id.toggle_published).setIcon(published ? R.drawable.ic_checkbox_marked :
R.drawable.ic_rss_box);
article.close();
}

View File

@ -279,12 +279,6 @@ public class OfflineFeedCategoriesFragment extends Fragment implements OnItemCli
tu.setVisibility((cursor.getInt(cursor.getColumnIndex("unread")) > 0) ? View.VISIBLE : View.INVISIBLE);
}
ImageView icon = (ImageView)v.findViewById(R.id.icon);
if (icon != null) {
icon.setImageResource(cursor.getInt(cursor.getColumnIndex("unread")) > 0 ? R.drawable.ic_published : R.drawable.ic_unpublished);
}
ImageButton ib = (ImageButton) v.findViewById(R.id.feed_menu_button);
if (ib != null) {

View File

@ -317,34 +317,6 @@ public class OfflineFeedsFragment extends Fragment implements OnItemClickListene
tu.setVisibility((cursor.getInt(cursor.getColumnIndex("unread")) > 0) ? View.VISIBLE : View.INVISIBLE);
}
ImageView icon = (ImageView)v.findViewById(R.id.icon);
if (icon != null) {
if (m_enableFeedIcons) {
try {
File storage = Environment.getExternalStorageDirectory();
File iconFile = new File(storage.getAbsolutePath() + ICON_PATH + cursor.getInt(cursor.getColumnIndex(BaseColumns._ID)) + ".ico");
if (iconFile.exists()) {
Bitmap bmpOrig = BitmapFactory.decodeFile(iconFile.getAbsolutePath());
if (bmpOrig != null) {
icon.setImageBitmap(bmpOrig);
}
} else {
icon.setImageResource(cursor.getInt(cursor.getColumnIndex("unread")) > 0 ? R.drawable.ic_published : R.drawable.ic_unpublished);
}
} catch (NullPointerException e) {
icon.setImageResource(cursor.getInt(cursor.getColumnIndex("unread")) > 0 ? R.drawable.ic_published : R.drawable.ic_unpublished);
}
} else {
icon.setImageResource(cursor.getInt(cursor.getColumnIndex("unread")) > 0 ? R.drawable.ic_published : R.drawable.ic_unpublished);
}
}
ImageButton ib = (ImageButton) v.findViewById(R.id.feed_menu_button);
if (ib != null) {

View File

@ -655,7 +655,7 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis
}
if (holder.markedView != null) {
holder.markedView.setImageResource(article.getInt(article.getColumnIndex("marked")) == 1 ? R.drawable.ic_star_full : R.drawable.ic_star_empty);
holder.markedView.setImageResource(article.getInt(article.getColumnIndex("marked")) == 1 ? R.drawable.ic_star_dark : R.drawable.ic_star_outline_dark);
holder.markedView.setOnClickListener(new OnClickListener() {
@ -674,7 +674,7 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis
}
if (holder.publishedView != null) {
holder.publishedView.setImageResource(article.getInt(article.getColumnIndex("published")) == 1 ? R.drawable.ic_published : R.drawable.ic_unpublished);
holder.publishedView.setImageResource(article.getInt(article.getColumnIndex("published")) == 1 ? R.drawable.ic_checkbox_marked_dark : R.drawable.ic_rss_box_dark);
holder.publishedView.setOnClickListener(new OnClickListener() {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 578 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 740 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 977 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 702 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 809 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 927 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 569 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 666 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 756 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 702 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 786 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 925 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 978 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Some files were not shown because too many files have changed in this diff Show More