Search in sources :

Example 1 with HtmlTextView

use of org.sufficientlysecure.htmltextview.HtmlTextView 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());
}
Also used : NewsDetailPresenterImpl(com.lauren.simplenews.news.presenter.NewsDetailPresenterImpl) CollapsingToolbarLayout(android.support.design.widget.CollapsingToolbarLayout) NewsDetailView(com.lauren.simplenews.news.view.NewsDetailView) ImageView(android.widget.ImageView) HtmlTextView(org.sufficientlysecure.htmltextview.HtmlTextView) View(android.view.View) Toolbar(android.support.v7.widget.Toolbar)

Aggregations

CollapsingToolbarLayout (android.support.design.widget.CollapsingToolbarLayout)1 Toolbar (android.support.v7.widget.Toolbar)1 View (android.view.View)1 ImageView (android.widget.ImageView)1 NewsDetailPresenterImpl (com.lauren.simplenews.news.presenter.NewsDetailPresenterImpl)1 NewsDetailView (com.lauren.simplenews.news.view.NewsDetailView)1 HtmlTextView (org.sufficientlysecure.htmltextview.HtmlTextView)1