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