diff options
3 files changed, 11 insertions, 68 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/DetailActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/DetailActivity.java index 8c7538a7..1a228c48 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/DetailActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/DetailActivity.java @@ -95,26 +95,16 @@ public class DetailActivity extends OnlineActivity implements HeadlinesEventList hf.setSearchQuery(searchQuery); ft.replace(R.id.headlines_fragment, hf, FRAG_HEADLINES); - ft.replace(R.id.article_fragment, new LoadingFragment(), null); - ft.commit(); - - setTitle(feed.title); + ArticlePager af = new ArticlePager(); + af.initialize(article != null ? hf.getArticleById(article.id) : new Article(), feed, m_articles); + af.setSearchQuery(searchQuery); - new Handler().postDelayed(new Runnable() { - @Override - public void run() { - FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); + ft.replace(R.id.article_fragment, af, FRAG_ARTICLE); - ArticlePager af = new ArticlePager(); - af.initialize(article != null ? hf.getArticleById(article.id) : new Article(), feed, m_articles); - af.setSearchQuery(searchQuery); - - ft.replace(R.id.article_fragment, af, FRAG_ARTICLE); - - ft.commit(); - } - }, 100); + ft.commit(); + + setTitle(feed.title); } } } @@ -286,26 +276,11 @@ public class DetailActivity extends OnlineActivity implements HeadlinesEventList FragmentTransaction ft = getSupportFragmentManager() .beginTransaction(); - ft.replace(R.id.article_fragment, new LoadingFragment(), null); - - ft.commitAllowingStateLoss(); - - final Article fArticle = article; - final Feed fFeed = hf.getFeed(); - - new Handler().postDelayed(new Runnable() { - @Override - public void run() { - FragmentTransaction ft = getSupportFragmentManager() - .beginTransaction(); + ArticlePager af = new ArticlePager(); + af.initialize(article, hf.getFeed(), m_articles); - ArticlePager af = new ArticlePager(); - af.initialize(fArticle, fFeed, m_articles); - - ft.replace(R.id.article_fragment, af, FRAG_ARTICLE); - ft.commitAllowingStateLoss(); - } - }, 10); + ft.replace(R.id.article_fragment, af, FRAG_ARTICLE); + ft.commitAllowingStateLoss(); } } } diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/LoadingFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/LoadingFragment.java deleted file mode 100644 index e8edca20..00000000 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/LoadingFragment.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.fox.ttrss; - -import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; - -public class LoadingFragment extends Fragment { - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - - View view = inflater.inflate(R.layout.fragment_loading, container, false); - - return view; - } - -} diff --git a/org.fox.ttrss/src/main/res/layout/fragment_loading.xml b/org.fox.ttrss/src/main/res/layout/fragment_loading.xml deleted file mode 100644 index b9b3e977..00000000 --- a/org.fox.ttrss/src/main/res/layout/fragment_loading.xml +++ /dev/null @@ -1,14 +0,0 @@ - - <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="fill_parent" - android:layout_height="fill_parent" > - - - <ProgressBar - android:id="@+id/progress" - style="?android:attr/progressBarStyleLarge" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center" /> - - </FrameLayout> |