action mode: show amount of selected articles
This commit is contained in:
parent
ba12f1bba2
commit
b92b49e492
@ -1487,8 +1487,12 @@ public class OnlineActivity extends CommonActivity {
|
|||||||
HeadlinesFragment hf = (HeadlinesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
|
HeadlinesFragment hf = (HeadlinesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
|
||||||
|
|
||||||
if (hf != null && !m_forceDisableActionMode) {
|
if (hf != null && !m_forceDisableActionMode) {
|
||||||
if (hf.getSelectedArticles().size() > 0 && m_headlinesActionMode == null) {
|
if (hf.getSelectedArticles().size() > 0) {
|
||||||
m_headlinesActionMode = startSupportActionMode(m_headlinesActionModeCallback);
|
if (m_headlinesActionMode == null) {
|
||||||
|
m_headlinesActionMode = startSupportActionMode(m_headlinesActionModeCallback);
|
||||||
|
}
|
||||||
|
|
||||||
|
m_headlinesActionMode.setTitle(String.valueOf(hf.getSelectedArticles().size()));
|
||||||
} else if (hf.getSelectedArticles().size() == 0 && m_headlinesActionMode != null) {
|
} else if (hf.getSelectedArticles().size() == 0 && m_headlinesActionMode != null) {
|
||||||
m_headlinesActionMode.finish();
|
m_headlinesActionMode.finish();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user