further use handlers in onArticleSelected()
This commit is contained in:
parent
f1d50cad48
commit
2a02f4b211
@ -157,13 +157,20 @@ public class HeadlinesActivity extends OnlineActivity implements HeadlinesEventL
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (open) {
|
if (open) {
|
||||||
FragmentTransaction ft = getSupportFragmentManager()
|
|
||||||
.beginTransaction();
|
|
||||||
|
|
||||||
ArticlePager af = (ArticlePager) getSupportFragmentManager().findFragmentByTag(FRAG_ARTICLE);
|
final Article fArticle = article;
|
||||||
af.setActiveArticle(article);
|
|
||||||
|
|
||||||
ft.commit();
|
new Handler().postDelayed(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
ArticlePager af = (ArticlePager) getSupportFragmentManager().findFragmentByTag(FRAG_ARTICLE);
|
||||||
|
|
||||||
|
if (af != null) {
|
||||||
|
af.setActiveArticle(fArticle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, 10);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
HeadlinesFragment hf = (HeadlinesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
|
HeadlinesFragment hf = (HeadlinesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);
|
||||||
if (hf != null) {
|
if (hf != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user