From b07b70f989ac0f4e8774c8ee9f3be9fea1613c65 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 7 Nov 2014 02:26:25 +0400 Subject: [PATCH] add missing pixmaps; remove headline empty view --- .../java/org/fox/ttrss/FeedsFragment.java | 8 +- .../java/org/fox/ttrss/HeadlinesFragment.java | 4 +- .../offline/OfflineHeadlinesFragment.java | 2 +- .../drawable-hdpi/ic_published_special.png | Bin 0 -> 2024 bytes .../drawable/s_headline_published_special.svg | 905 ++++++++++++++++++ .../main/res/layout/headlines_fragment.xml | 5 +- 6 files changed, 917 insertions(+), 7 deletions(-) create mode 100644 org.fox.ttrss/src/main/res/drawable-hdpi/ic_published_special.png create mode 100644 org.fox.ttrss/src/main/res/drawable/s_headline_published_special.svg diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java index 61d48ac3..633e52c2 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java @@ -241,7 +241,7 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh AdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo; ListView list = (ListView) getView().findViewById(R.id.feeds); - Feed feed = (Feed) list.getItemAtPosition(info.position); + Feed feed = (Feed) getFeedAtPosition(info.position); menu.setHeaderTitle(feed.display_title != null ? feed.display_title : feed.title); @@ -837,7 +837,11 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh public Feed getFeedAtPosition(int position) { try { - return m_adapter.getItem(position); + ListView list = (ListView) getView().findViewById(R.id.feeds); + + return (Feed) list.getItemAtPosition(position); + } catch (NullPointerException e) { + return null; } catch (IndexOutOfBoundsException e) { return null; } diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java index 646ac11e..5a6200be 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java @@ -457,9 +457,9 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, if (getView() != null) { ListView list = (ListView)getView().findViewById(R.id.headlines_list); - if (list != null) { + /* if (list != null) { list.setEmptyView(getView().findViewById(R.id.no_headlines)); - } + } */ } super.onPostExecute(result); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java index 324f57fb..2687223e 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java @@ -325,7 +325,7 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis list.setAdapter(m_adapter); list.setOnItemClickListener(this); list.setOnScrollListener(this); - list.setEmptyView(view.findViewById(R.id.no_headlines)); + //list.setEmptyView(view.findViewById(R.id.no_headlines)); registerForContextMenu(list); return view; diff --git a/org.fox.ttrss/src/main/res/drawable-hdpi/ic_published_special.png b/org.fox.ttrss/src/main/res/drawable-hdpi/ic_published_special.png new file mode 100644 index 0000000000000000000000000000000000000000..21d48a335d3ff065d71ff05d9d8880e752fd73c3 GIT binary patch literal 2024 zcmVP)?Nfu0kt%`umO!}n1@VBOsiCb1RJ63AHul=ZiS5L8v+;T_ zvzM9KnK_3CH?DVgW_N9GV)MQ2IsZBT|DE&S&SC^{o49--GHEMYO5nxOnFdPf2p|kS2xDsogE2zL#Y@9I$&JHB zCwgvla)>eZ=B_gy003c#G4|%U(a9p))(M;&og5;JyvBevJb3GB0|VAT7geO*2og^b3GtY#S*l^KdkjYQTmZp5stX)*So3@!u10e&sdqoYjFjncjb&a?K5 zFPbwfM(1Lt5?wM<6SoWLjLOXWX>TbQWf2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oi=34KsG@xUx-WsgRz~qWz%3VcKJeNk^le@LM|d; zvf7&60t8GFLM{S)UI#7>_arT}F7B*ZwZlSd{VxaWh3v|3-xx*u%5J_11WZz-uUr}K zTX*@QN_=IwZwwJn@5-29FouYyHyRIM^KX@V_<#Ak&Hn%*kSi+h(C8Zg0000 + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.fox.ttrss/src/main/res/layout/headlines_fragment.xml b/org.fox.ttrss/src/main/res/layout/headlines_fragment.xml index a9060aa8..d0c318f1 100644 --- a/org.fox.ttrss/src/main/res/layout/headlines_fragment.xml +++ b/org.fox.ttrss/src/main/res/layout/headlines_fragment.xml @@ -20,14 +20,15 @@ - - + --> \ No newline at end of file