material design icon overhaul
@ -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"
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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() {
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
8
org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineActivity.java
Normal file → Executable 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();
|
||||
}
|
||||
|
6
org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedCategoriesFragment.java
Normal file → Executable 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) {
|
||||
|
28
org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsFragment.java
Normal file → Executable file
@ -316,34 +316,6 @@ public class OfflineFeedsFragment extends Fragment implements OnItemClickListene
|
||||
tu.setText(String.valueOf(cursor.getInt(cursor.getColumnIndex("unread"))));
|
||||
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);
|
||||
|
||||
|
@ -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() {
|
||||
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 183 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_attachment.png
Executable file
After Width: | Height: | Size: 662 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_bookmark_outline_plus.png
Executable file
After Width: | Height: | Size: 544 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_check.png
Executable file
After Width: | Height: | Size: 428 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_check_all.png
Executable file
After Width: | Height: | Size: 579 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_checkbox_marked.png
Executable file
After Width: | Height: | Size: 507 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_checkbox_marked_dark.png
Executable file
After Width: | Height: | Size: 547 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_cloud_download.png
Executable file
After Width: | Height: | Size: 766 B |
Before Width: | Height: | Size: 1.4 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_cloud_upload.png
Executable file
After Width: | Height: | Size: 754 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_comment_plus_outline.png
Executable file
After Width: | Height: | Size: 482 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_content_copy.png
Executable file
After Width: | Height: | Size: 392 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_email.png
Executable file
After Width: | Height: | Size: 578 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_email_open.png
Executable file
After Width: | Height: | Size: 749 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_filter.png
Executable file
After Width: | Height: | Size: 372 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_filter_outline.png
Executable file
After Width: | Height: | Size: 422 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_filter_remove.png
Executable file
After Width: | Height: | Size: 664 B |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.4 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_login.png
Executable file
After Width: | Height: | Size: 451 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_logout.png
Executable file
After Width: | Height: | Size: 459 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_magnify.png
Executable file
After Width: | Height: | Size: 740 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 977 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_open_in_new.png
Executable file
After Width: | Height: | Size: 466 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_playlist_plus.png
Executable file
After Width: | Height: | Size: 236 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_plus_circle.png
Executable file
After Width: | Height: | Size: 702 B |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.0 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_refresh.png
Executable file
After Width: | Height: | Size: 809 B |
Before Width: | Height: | Size: 3.1 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_rss.png
Executable file
After Width: | Height: | Size: 1.2 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_rss_box.png
Executable file
After Width: | Height: | Size: 927 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_rss_box_dark.png
Executable file
After Width: | Height: | Size: 1.3 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_rss_dark.png
Executable file
After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.7 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_select.png
Executable file
After Width: | Height: | Size: 274 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_select_all.png
Executable file
After Width: | Height: | Size: 393 B |
Before Width: | Height: | Size: 1.4 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_select_off.png
Executable file
After Width: | Height: | Size: 483 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_settings.png
Executable file
After Width: | Height: | Size: 911 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_share.png
Executable file
After Width: | Height: | Size: 569 B |
Before Width: | Height: | Size: 1.6 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_sort.png
Executable file
After Width: | Height: | Size: 338 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_star.png
Executable file
After Width: | Height: | Size: 802 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_star_dark.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.2 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_star_outline.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_star_outline_dark.png
Executable file
After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 261 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_attachment.png
Executable file
After Width: | Height: | Size: 1.0 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_bookmark_outline_plus.png
Executable file
After Width: | Height: | Size: 759 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_check.png
Executable file
After Width: | Height: | Size: 517 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_check_all.png
Executable file
After Width: | Height: | Size: 781 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_checkbox_marked.png
Executable file
After Width: | Height: | Size: 666 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_checkbox_marked_dark.png
Executable file
After Width: | Height: | Size: 756 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_cloud_download.png
Executable file
After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.6 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_cloud_upload.png
Executable file
After Width: | Height: | Size: 1.0 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_comment_plus_outline.png
Executable file
After Width: | Height: | Size: 702 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_content_copy.png
Executable file
After Width: | Height: | Size: 590 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_email.png
Executable file
After Width: | Height: | Size: 786 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_email_open.png
Executable file
After Width: | Height: | Size: 1.0 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_filter.png
Executable file
After Width: | Height: | Size: 494 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_filter_outline.png
Executable file
After Width: | Height: | Size: 585 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_filter_remove.png
Executable file
After Width: | Height: | Size: 925 B |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.4 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_login.png
Executable file
After Width: | Height: | Size: 661 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_logout.png
Executable file
After Width: | Height: | Size: 652 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_magnify.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.2 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_open_in_new.png
Executable file
After Width: | Height: | Size: 627 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_playlist_plus.png
Executable file
After Width: | Height: | Size: 396 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_plus_circle.png
Executable file
After Width: | Height: | Size: 978 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_refresh.png
Executable file
After Width: | Height: | Size: 1.1 KiB |