add various per-feed icons for the conns/feeds sidebar
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.fox.ttrss"
|
package="org.fox.ttrss"
|
||||||
android:versionCode="337"
|
android:versionCode="338"
|
||||||
android:versionName="1.111" >
|
android:versionName="1.112" >
|
||||||
|
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
android:minSdkVersion="15"
|
android:minSdkVersion="15"
|
||||||
|
@ -13,6 +13,7 @@ import android.os.Bundle;
|
|||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.support.v4.widget.SwipeRefreshLayout;
|
import android.support.v4.widget.SwipeRefreshLayout;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.util.TypedValue;
|
||||||
import android.view.ContextMenu;
|
import android.view.ContextMenu;
|
||||||
import android.view.ContextMenu.ContextMenuInfo;
|
import android.view.ContextMenu.ContextMenuInfo;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@ -25,6 +26,7 @@ import android.widget.AdapterView.AdapterContextMenuInfo;
|
|||||||
import android.widget.AdapterView.OnItemClickListener;
|
import android.widget.AdapterView.OnItemClickListener;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
@ -466,6 +468,16 @@ public class FeedCategoriesFragment extends BaseFeedlistFragment implements OnIt
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImageView icon = (ImageView) v.findViewById(R.id.icon);
|
||||||
|
|
||||||
|
if (icon != null) {
|
||||||
|
TypedValue tv = new TypedValue();
|
||||||
|
|
||||||
|
m_activity.getTheme().resolveAttribute(R.attr.ic_folder_outline, tv, true);
|
||||||
|
icon.setImageResource(tv.resourceId);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
TextView tt = (TextView) v.findViewById(R.id.title);
|
TextView tt = (TextView) v.findViewById(R.id.title);
|
||||||
|
|
||||||
if (tt != null) {
|
if (tt != null) {
|
||||||
|
@ -14,6 +14,7 @@ import android.os.Bundle;
|
|||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.support.v4.widget.SwipeRefreshLayout;
|
import android.support.v4.widget.SwipeRefreshLayout;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.util.TypedValue;
|
||||||
import android.view.ContextMenu;
|
import android.view.ContextMenu;
|
||||||
import android.view.ContextMenu.ContextMenuInfo;
|
import android.view.ContextMenu.ContextMenuInfo;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@ -26,6 +27,7 @@ import android.widget.AdapterView.AdapterContextMenuInfo;
|
|||||||
import android.widget.AdapterView.OnItemClickListener;
|
import android.widget.AdapterView.OnItemClickListener;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
@ -645,6 +647,36 @@ public class FeedsFragment extends BaseFeedlistFragment implements OnItemClickLi
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImageView icon = (ImageView) v.findViewById(R.id.icon);
|
||||||
|
|
||||||
|
if (icon != null) {
|
||||||
|
TypedValue tv = new TypedValue();
|
||||||
|
|
||||||
|
if (feed.id == 0 && !feed.is_cat) {
|
||||||
|
m_activity.getTheme().resolveAttribute(R.attr.ic_archive, tv, true);
|
||||||
|
icon.setImageResource(tv.resourceId);
|
||||||
|
} else if (feed.id == -1 && !feed.is_cat) {
|
||||||
|
m_activity.getTheme().resolveAttribute(R.attr.ic_star, tv, true);
|
||||||
|
icon.setImageResource(tv.resourceId);
|
||||||
|
} else if (feed.id == -2 && !feed.is_cat) {
|
||||||
|
m_activity.getTheme().resolveAttribute(R.attr.ic_checkbox_marked, tv, true);
|
||||||
|
icon.setImageResource(tv.resourceId);
|
||||||
|
} else if (feed.id == -3 && !feed.is_cat) {
|
||||||
|
m_activity.getTheme().resolveAttribute(R.attr.ic_coffee, tv, true);
|
||||||
|
icon.setImageResource(tv.resourceId);
|
||||||
|
} else if (feed.id == -4 && !feed.is_cat) {
|
||||||
|
m_activity.getTheme().resolveAttribute(R.attr.ic_folder_outline, tv, true);
|
||||||
|
icon.setImageResource(tv.resourceId);
|
||||||
|
} else if (feed.is_cat) {
|
||||||
|
m_activity.getTheme().resolveAttribute(R.attr.ic_folder_outline, tv, true);
|
||||||
|
icon.setImageResource(tv.resourceId);
|
||||||
|
} else {
|
||||||
|
m_activity.getTheme().resolveAttribute(R.attr.ic_rss_box, tv, true);
|
||||||
|
icon.setImageResource(tv.resourceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
TextView tt = (TextView) v.findViewById(R.id.title);
|
TextView tt = (TextView) v.findViewById(R.id.title);
|
||||||
|
|
||||||
if (tt != null) {
|
if (tt != null) {
|
||||||
|
@ -12,6 +12,7 @@ import android.provider.BaseColumns;
|
|||||||
import android.support.v4.widget.SimpleCursorAdapter;
|
import android.support.v4.widget.SimpleCursorAdapter;
|
||||||
import android.support.v4.widget.SwipeRefreshLayout;
|
import android.support.v4.widget.SwipeRefreshLayout;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.util.TypedValue;
|
||||||
import android.view.ContextMenu;
|
import android.view.ContextMenu;
|
||||||
import android.view.ContextMenu.ContextMenuInfo;
|
import android.view.ContextMenu.ContextMenuInfo;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@ -23,6 +24,7 @@ import android.widget.AdapterView;
|
|||||||
import android.widget.AdapterView.AdapterContextMenuInfo;
|
import android.widget.AdapterView.AdapterContextMenuInfo;
|
||||||
import android.widget.AdapterView.OnItemClickListener;
|
import android.widget.AdapterView.OnItemClickListener;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
@ -282,6 +284,16 @@ public class OfflineFeedCategoriesFragment extends BaseFeedlistFragment implemen
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImageView icon = (ImageView) v.findViewById(R.id.icon);
|
||||||
|
|
||||||
|
if (icon != null) {
|
||||||
|
TypedValue tv = new TypedValue();
|
||||||
|
|
||||||
|
m_activity.getTheme().resolveAttribute(R.attr.ic_folder_outline, tv, true);
|
||||||
|
icon.setImageResource(tv.resourceId);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
TextView tt = (TextView) v.findViewById(R.id.title);
|
TextView tt = (TextView) v.findViewById(R.id.title);
|
||||||
|
|
||||||
if (tt != null) {
|
if (tt != null) {
|
||||||
|
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_archive.png
Normal file
After Width: | Height: | Size: 257 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_archive_dark.png
Normal file
After Width: | Height: | Size: 264 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_coffee.png
Normal file
After Width: | Height: | Size: 427 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_coffee_dark.png
Normal file
After Width: | Height: | Size: 468 B |
BIN
org.fox.ttrss/src/main/res/drawable-hdpi/ic_folder_outline.png
Normal file
After Width: | Height: | Size: 367 B |
After Width: | Height: | Size: 427 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_archive.png
Normal file
After Width: | Height: | Size: 374 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_archive_dark.png
Normal file
After Width: | Height: | Size: 398 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_coffee.png
Normal file
After Width: | Height: | Size: 606 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_coffee_dark.png
Normal file
After Width: | Height: | Size: 727 B |
BIN
org.fox.ttrss/src/main/res/drawable-xhdpi/ic_folder_outline.png
Normal file
After Width: | Height: | Size: 509 B |
After Width: | Height: | Size: 586 B |
BIN
org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_archive.png
Normal file
After Width: | Height: | Size: 400 B |
BIN
org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_archive_dark.png
Normal file
After Width: | Height: | Size: 411 B |
BIN
org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_coffee.png
Normal file
After Width: | Height: | Size: 753 B |
BIN
org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_coffee_dark.png
Normal file
After Width: | Height: | Size: 928 B |
BIN
org.fox.ttrss/src/main/res/drawable-xxhdpi/ic_folder_outline.png
Normal file
After Width: | Height: | Size: 622 B |
After Width: | Height: | Size: 741 B |
BIN
org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_archive.png
Normal file
After Width: | Height: | Size: 572 B |
BIN
org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_archive_dark.png
Normal file
After Width: | Height: | Size: 608 B |
BIN
org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_coffee.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
org.fox.ttrss/src/main/res/drawable-xxxhdpi/ic_coffee_dark.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 928 B |
After Width: | Height: | Size: 1.1 KiB |
@ -40,6 +40,9 @@
|
|||||||
<attr name="ic_filter_variant" format="reference" />
|
<attr name="ic_filter_variant" format="reference" />
|
||||||
<attr name="ic_cloud_download" format="reference" />
|
<attr name="ic_cloud_download" format="reference" />
|
||||||
<attr name="ic_cloud_upload" format="reference" />
|
<attr name="ic_cloud_upload" format="reference" />
|
||||||
|
<attr name="ic_archive" format="reference" />
|
||||||
|
<attr name="ic_coffee" format="reference" />
|
||||||
|
<attr name="ic_folder_outline" format="reference" />
|
||||||
<declare-styleable name="ScrimInsetsView">
|
<declare-styleable name="ScrimInsetsView">
|
||||||
<attr format="reference|color" name="insetForeground">
|
<attr format="reference|color" name="insetForeground">
|
||||||
</attr></declare-styleable>
|
</attr></declare-styleable>
|
||||||
|
@ -53,6 +53,9 @@
|
|||||||
<item name="ic_filter_variant">@drawable/ic_filter_variant_dark</item>
|
<item name="ic_filter_variant">@drawable/ic_filter_variant_dark</item>
|
||||||
<item name="ic_cloud_download">@drawable/ic_cloud_download_dark</item>
|
<item name="ic_cloud_download">@drawable/ic_cloud_download_dark</item>
|
||||||
<item name="ic_cloud_upload">@drawable/ic_cloud_upload_dark</item>
|
<item name="ic_cloud_upload">@drawable/ic_cloud_upload_dark</item>
|
||||||
|
<item name="ic_archive">@drawable/ic_archive_dark</item>
|
||||||
|
<item name="ic_coffee">@drawable/ic_coffee_dark</item>
|
||||||
|
<item name="ic_folder_outline">@drawable/ic_folder_outline_dark</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="DarkTheme.Base" parent="Theme.AppCompat.NoActionBar">
|
<style name="DarkTheme.Base" parent="Theme.AppCompat.NoActionBar">
|
||||||
@ -107,6 +110,9 @@
|
|||||||
<item name="ic_filter_variant">@drawable/ic_filter_variant</item>
|
<item name="ic_filter_variant">@drawable/ic_filter_variant</item>
|
||||||
<item name="ic_cloud_download">@drawable/ic_cloud_download</item>
|
<item name="ic_cloud_download">@drawable/ic_cloud_download</item>
|
||||||
<item name="ic_cloud_upload">@drawable/ic_cloud_upload</item>
|
<item name="ic_cloud_upload">@drawable/ic_cloud_upload</item>
|
||||||
|
<item name="ic_archive">@drawable/ic_archive</item>
|
||||||
|
<item name="ic_coffee">@drawable/ic_coffee</item>
|
||||||
|
<item name="ic_folder_outline">@drawable/ic_folder_outline</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="DarkDialogTheme" parent="android:Theme"></style>
|
<style name="DarkDialogTheme" parent="android:Theme"></style>
|
||||||
|