add several menu icons from http://www.androidicons.com/freebies.php
This commit is contained in:
parent
bb0438358d
commit
20a66a8dc2
5
README
5
README
@ -1,3 +1,6 @@
|
||||
Tiny Tiny RSS client for Android tablets
|
||||
|
||||
Licensed under GNU GPL version 2.
|
||||
Uses several free android icons from http://www.androidicons.com/freebies.php
|
||||
|
||||
Licensed under GNU GPL version 2.
|
||||
|
||||
|
BIN
res/drawable-hdpi/ic_menu_database.png
Normal file
BIN
res/drawable-hdpi/ic_menu_database.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
res/drawable-hdpi/ic_menu_exit.png
Normal file
BIN
res/drawable-hdpi/ic_menu_exit.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
res/drawable-hdpi/ic_menu_tick.png
Normal file
BIN
res/drawable-hdpi/ic_menu_tick.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
@ -24,32 +24,34 @@
|
||||
|
||||
<item
|
||||
android:id="@+id/logout"
|
||||
android:icon="@drawable/ic_menu_exit"
|
||||
android:showAsAction=""
|
||||
android:title="@string/logout"/>
|
||||
</group>
|
||||
|
||||
<group android:id="@+id/menu_group_headlines" >
|
||||
|
||||
<item
|
||||
<!-- <item
|
||||
android:id="@+id/load_more_articles"
|
||||
android:icon="@android:drawable/ic_menu_more"
|
||||
android:showAsAction="ifRoom|withText"
|
||||
android:title="@string/load_more_articles"/>
|
||||
android:title="@string/load_more_articles"/> -->
|
||||
|
||||
<item
|
||||
android:id="@+id/catchup_and_load"
|
||||
android:icon="@android:drawable/ic_menu_rotate"
|
||||
android:id="@+id/headlines_mark_as_read"
|
||||
android:icon="@android:drawable/ic_menu_tick"
|
||||
android:showAsAction="ifRoom|withText"
|
||||
android:title="@string/catchup_and_load"/>
|
||||
android:title="@string/headlines_mark_as_read"/>
|
||||
|
||||
<item
|
||||
<!-- <item
|
||||
android:id="@+id/show_all_articles"
|
||||
android:icon="@android:drawable/ic_menu_agenda"
|
||||
android:showAsAction=""
|
||||
android:title="@string/show_all_articles"/>
|
||||
android:title="@string/show_all_articles"/> -->
|
||||
|
||||
<item
|
||||
android:id="@+id/headlines_select"
|
||||
android:icon="@drawable/ic_menu_database"
|
||||
android:title="@string/headlines_select"/>
|
||||
</group>
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
<string name="update_feeds">Refresh feeds</string>
|
||||
<string name="close_article">Close article</string>
|
||||
<string name="share_article">Share article</string>
|
||||
<string name="catchup">Mark as read</string>
|
||||
<string name="catchup">Mark read</string>
|
||||
<string name="sort_feeds_by_unread">Sort feeds by unread count</string>
|
||||
<string name="load_more_articles">Load more</string>
|
||||
<string name="show_all_articles">Show all articles</string>
|
||||
@ -70,7 +70,7 @@
|
||||
<string name="no_headlines_to_display">No headlines to display</string>
|
||||
<string name="browse_cats_like_feeds">Browse categories like feeds</string>
|
||||
<string name="browse_cats_like_feeds_summary">Use category context menu to override this setting</string>
|
||||
<string name="catchup_and_load">Catchup</string>
|
||||
<string name="headlines_mark_as_read">Mark read</string>
|
||||
<string name="error_no_error">No error</string>
|
||||
<string name="error_unknown">Error: Unknown error (see log)</string>
|
||||
<string name="error_http_unauthorized">Error: 401 unauthorized</string>
|
||||
|
@ -222,7 +222,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener {
|
||||
|
||||
ListView list = (ListView)getView().findViewById(R.id.headlines);
|
||||
|
||||
if (list != null && m_offset != 0) {
|
||||
if (list != null && m_offset != 0 && articles.size() > 0) {
|
||||
list.setSelection(last_position-1);
|
||||
}
|
||||
|
||||
|
@ -443,13 +443,13 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe
|
||||
item.setTitle(R.string.menu_unread_feeds);
|
||||
}
|
||||
|
||||
item = menu.findItem(R.id.show_all_articles);
|
||||
/* item = menu.findItem(R.id.show_all_articles);
|
||||
|
||||
if (getUnreadArticlesOnly()) {
|
||||
item.setTitle(R.string.show_all_articles);
|
||||
} else {
|
||||
item.setTitle(R.string.show_unread_articles);
|
||||
}
|
||||
} */
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -588,28 +588,30 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe
|
||||
}
|
||||
|
||||
return true;
|
||||
case R.id.catchup_and_load:
|
||||
case R.id.headlines_mark_as_read:
|
||||
if (hf != null) {
|
||||
final ArticleList articles = hf.getUnreadArticles();
|
||||
ArticleList articles = hf.getUnreadArticles();
|
||||
|
||||
for (Article a : articles)
|
||||
a.unread = false;
|
||||
|
||||
ApiRequest req = new ApiRequest(getApplicationContext()) {
|
||||
@Override
|
||||
protected void onPostExecute(JsonElement result) {
|
||||
if (result != null) {
|
||||
for (Article a : articles)
|
||||
a.unread = false;
|
||||
|
||||
viewFeed(m_activeFeed, true);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
final String articleIds = articlesToIdString(articles);
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
HashMap<String,String> map = new HashMap<String,String>() {
|
||||
{
|
||||
put("sid", m_sessionId);
|
||||
put("op", "updateArticle");
|
||||
put("article_ids", articlesToIdString(articles));
|
||||
put("article_ids", articleIds);
|
||||
put("mode", "0");
|
||||
put("field", "2");
|
||||
}
|
||||
@ -619,9 +621,6 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe
|
||||
|
||||
}
|
||||
return true;
|
||||
case R.id.load_more_articles:
|
||||
viewFeed(m_activeFeed, true);
|
||||
return true;
|
||||
case R.id.share_article:
|
||||
shareArticle(m_selectedArticle);
|
||||
return true;
|
||||
@ -695,7 +694,7 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe
|
||||
}
|
||||
|
||||
return true;
|
||||
case R.id.show_all_articles:
|
||||
/* case R.id.show_all_articles:
|
||||
setUnreadArticlesOnly(!getUnreadArticlesOnly());
|
||||
|
||||
if (getUnreadArticlesOnly()) {
|
||||
@ -704,7 +703,7 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe
|
||||
item.setTitle(R.string.show_unread_articles);
|
||||
}
|
||||
|
||||
return true;
|
||||
return true; */
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
@ -754,8 +753,8 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe
|
||||
m_menu.setGroupVisible(R.id.menu_group_logged_out, false);
|
||||
|
||||
if (m_activeFeed != null) {
|
||||
m_menu.findItem(R.id.load_more_articles).setVisible(m_canLoadMore);
|
||||
m_menu.findItem(R.id.show_all_articles).setVisible(true);
|
||||
//m_menu.findItem(R.id.load_more_articles).setVisible(m_canLoadMore);
|
||||
//m_menu.findItem(R.id.show_all_articles).setVisible(true);
|
||||
} else {
|
||||
m_menu.setGroupVisible(R.id.menu_group_headlines, false);
|
||||
m_menu.setGroupVisible(R.id.menu_group_headlines_selection, false);
|
||||
|
Loading…
Reference in New Issue
Block a user