use of com.lauren.simplenews.news.presenter.NewsDetailPresenterImpl in project SimpleNews by liuling07.
the class NewsDetailActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_news_detail);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
mProgressBar = (ProgressBar) findViewById(R.id.progress);
mTVNewsContent = (HtmlTextView) findViewById(R.id.htNewsContent);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
onBackPressed();
}
});
mSwipeBackLayout = getSwipeBackLayout();
mSwipeBackLayout.setEdgeSize(ToolsUtil.getWidthInPx(this));
mSwipeBackLayout.setEdgeTrackingEnabled(SwipeBackLayout.EDGE_LEFT);
mNews = (NewsBean) getIntent().getSerializableExtra("news");
CollapsingToolbarLayout collapsingToolbar = (CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar);
collapsingToolbar.setTitle(mNews.getTitle());
ImageLoaderUtils.display(getApplicationContext(), (ImageView) findViewById(R.id.ivImage), mNews.getImgsrc());
mNewsDetailPresenter = new NewsDetailPresenterImpl(getApplication(), this);
mNewsDetailPresenter.loadNewsDetail(mNews.getDocid());
}
Aggregations