本文整理匯總了Java中android.support.v7.app.AppCompatActivity.supportStartPostponedEnterTransition方法的典型用法代碼示例。如果您正苦於以下問題:Java AppCompatActivity.supportStartPostponedEnterTransition方法的具體用法?Java AppCompatActivity.supportStartPostponedEnterTransition怎麽用?Java AppCompatActivity.supportStartPostponedEnterTransition使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.support.v7.app.AppCompatActivity
的用法示例。
在下文中一共展示了AppCompatActivity.supportStartPostponedEnterTransition方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setData
import android.support.v7.app.AppCompatActivity; //導入方法依賴的package包/類
public void setData() {
n = NewsUtil.CheckisFavourite(getActivity(), mTitle);
if (n == 1) {
n = 0;
myFavoriteNews.setImageResource(R.drawable.star);
} else {
n = 1;
myFavoriteNews.setImageResource(R.drawable.star_off);
}
//Got Advantages why to use Glide over picasso that's why replaced picasso.
Glide.with(this).load(mUrlToImage)
.thumbnail(0.1f)
.error(placeholder)
.crossFade()
.diskCacheStrategy(DiskCacheStrategy.SOURCE)
.skipMemoryCache(true)
.into(mToolbarImage);
mTitleText.setText(mTitle);
mByText.setText(mAuthor);
mArticleBody.setText(mDescription);
myFavoriteNews.setContentDescription(getString(R.string.my_favorite_save));
mTitleText.setContentDescription(getString(R.string.content_desc_title)+mTitle);
mByText.setContentDescription(getString(R.string.content_desc_author)+mAuthor);
mArticleBody.setContentDescription(getString(R.string.content_desc_article)+mDescription);
AppCompatActivity activity = (AppCompatActivity)getActivity();
// We need to start the enter transition after the data has loaded
if ( mTransitionAnimation ) {
activity.supportStartPostponedEnterTransition();
if ( null != toolbar ) {
activity.setSupportActionBar(toolbar);
activity.getSupportActionBar().setDisplayShowTitleEnabled(false);
activity.getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
}
}