remove loadingfragment
This commit is contained in:
parent
449ac639e3
commit
089e3e70b5
@ -95,16 +95,6 @@ public class DetailActivity extends OnlineActivity implements HeadlinesEventList
|
|||||||
hf.setSearchQuery(searchQuery);
|
hf.setSearchQuery(searchQuery);
|
||||||
|
|
||||||
ft.replace(R.id.headlines_fragment, hf, FRAG_HEADLINES);
|
ft.replace(R.id.headlines_fragment, hf, FRAG_HEADLINES);
|
||||||
ft.replace(R.id.article_fragment, new LoadingFragment(), null);
|
|
||||||
|
|
||||||
ft.commit();
|
|
||||||
|
|
||||||
setTitle(feed.title);
|
|
||||||
|
|
||||||
new Handler().postDelayed(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
|
||||||
|
|
||||||
ArticlePager af = new ArticlePager();
|
ArticlePager af = new ArticlePager();
|
||||||
af.initialize(article != null ? hf.getArticleById(article.id) : new Article(), feed, m_articles);
|
af.initialize(article != null ? hf.getArticleById(article.id) : new Article(), feed, m_articles);
|
||||||
@ -113,8 +103,8 @@ public class DetailActivity extends OnlineActivity implements HeadlinesEventList
|
|||||||
ft.replace(R.id.article_fragment, af, FRAG_ARTICLE);
|
ft.replace(R.id.article_fragment, af, FRAG_ARTICLE);
|
||||||
|
|
||||||
ft.commit();
|
ft.commit();
|
||||||
}
|
|
||||||
}, 100);
|
setTitle(feed.title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -283,30 +273,15 @@ public class DetailActivity extends OnlineActivity implements HeadlinesEventList
|
|||||||
|
|
||||||
hf.setActiveArticle(article);
|
hf.setActiveArticle(article);
|
||||||
|
|
||||||
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()
|
FragmentTransaction ft = getSupportFragmentManager()
|
||||||
.beginTransaction();
|
.beginTransaction();
|
||||||
|
|
||||||
ArticlePager af = new ArticlePager();
|
ArticlePager af = new ArticlePager();
|
||||||
af.initialize(fArticle, fFeed, m_articles);
|
af.initialize(article, hf.getFeed(), m_articles);
|
||||||
|
|
||||||
ft.replace(R.id.article_fragment, af, FRAG_ARTICLE);
|
ft.replace(R.id.article_fragment, af, FRAG_ARTICLE);
|
||||||
ft.commitAllowingStateLoss();
|
ft.commitAllowingStateLoss();
|
||||||
}
|
}
|
||||||
}, 10);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -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>
|
|
Loading…
Reference in New Issue
Block a user