various menu updates
This commit is contained in:
parent
b5cbb033fc
commit
ef07afec72
@ -1,5 +1,6 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/main"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" >
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/headlines"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" >
|
||||
|
||||
|
@ -49,6 +49,7 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/feed_and_author"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
|
@ -106,25 +106,17 @@
|
||||
android:icon="@drawable/ic_menu_publish_light"
|
||||
android:showAsAction="ifRoom"
|
||||
android:title="@string/article_toggle_published"/>
|
||||
<item
|
||||
android:id="@+id/share_article"
|
||||
android:actionProviderClass="android.widget.ShareActionProvider"
|
||||
android:icon="@android:drawable/ic_menu_share"
|
||||
android:showAsAction="ifRoom"
|
||||
android:title="@string/share_article"/>
|
||||
<item
|
||||
android:id="@+id/set_unread"
|
||||
android:icon="@drawable/ic_undo_light"
|
||||
android:showAsAction="ifRoom"
|
||||
android:title="@string/article_set_unread"/>
|
||||
<item
|
||||
android:id="@+id/toggle_attachments"
|
||||
android:icon="@drawable/ic_menu_attaches_light"
|
||||
android:showAsAction="ifRoom"
|
||||
android:title="@string/attachments_prompt"/>
|
||||
android:title="@string/attachments_prompt"/>
|
||||
<item
|
||||
android:id="@+id/catchup_above"
|
||||
android:title="@string/article_mark_read_above"/>
|
||||
android:id="@+id/share_article"
|
||||
android:icon="@android:drawable/ic_menu_share"
|
||||
android:showAsAction="ifRoom"
|
||||
android:title="@string/share_article"/>
|
||||
<!-- android:actionProviderClass="android.widget.ShareActionProvider" -->
|
||||
<item
|
||||
android:id="@+id/set_labels"
|
||||
android:showAsAction=""
|
||||
@ -135,13 +127,15 @@
|
||||
android:showAsAction=""
|
||||
android:title="@string/article_set_note"/>
|
||||
|
||||
<!--
|
||||
<item
|
||||
android:id="@+id/close_article"
|
||||
android:icon="@android:drawable/ic_menu_close_clear_cancel"
|
||||
android:showAsAction=""
|
||||
android:title="@string/close_article"/>
|
||||
-->
|
||||
<item
|
||||
android:id="@+id/catchup_above"
|
||||
android:title="@string/article_mark_read_above"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/set_unread"
|
||||
android:icon="@drawable/ic_undo_light"
|
||||
android:showAsAction="ifRoom"
|
||||
android:title="@string/article_set_unread"/>
|
||||
|
||||
</group>
|
||||
|
||||
|
@ -316,4 +316,8 @@ public class ArticlePager extends Fragment {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void notifyUpdated() {
|
||||
m_adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
@ -874,11 +874,11 @@ public class OnlineActivity extends CommonActivity {
|
||||
}
|
||||
return true;
|
||||
case R.id.share_article:
|
||||
if (android.os.Build.VERSION.SDK_INT < 14) {
|
||||
//if (android.os.Build.VERSION.SDK_INT < 14) {
|
||||
if (ap != null) {
|
||||
shareArticle(ap.getSelectedArticle());
|
||||
}
|
||||
}
|
||||
//}
|
||||
return true;
|
||||
case R.id.toggle_marked:
|
||||
if (ap != null & ap.getSelectedArticle() != null) {
|
||||
@ -971,6 +971,7 @@ public class OnlineActivity extends CommonActivity {
|
||||
a.unread = true;
|
||||
saveArticleUnread(a);
|
||||
if (hf != null) hf.notifyUpdated();
|
||||
if (ap != null) ap.notifyUpdated();
|
||||
}
|
||||
return true;
|
||||
case R.id.set_labels:
|
||||
@ -1449,7 +1450,7 @@ public class OnlineActivity extends CommonActivity {
|
||||
MenuItem search = m_menu.findItem(R.id.search);
|
||||
search.setEnabled(getApiLevel() >= 2);
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT >= 14) {
|
||||
/* if (android.os.Build.VERSION.SDK_INT >= 14) {
|
||||
ShareActionProvider shareProvider = (ShareActionProvider) m_menu.findItem(R.id.share_article).getActionProvider();
|
||||
|
||||
ArticlePager af = (ArticlePager) getSupportFragmentManager().findFragmentByTag(FRAG_ARTICLE);
|
||||
@ -1461,7 +1462,7 @@ public class OnlineActivity extends CommonActivity {
|
||||
m_menu.findItem(R.id.share_article).setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
|
||||
}
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
if (!isCompatMode()) {
|
||||
HeadlinesFragment hf = (HeadlinesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
|
||||
|
Loading…
Reference in New Issue
Block a user