本文整理匯總了Java中android.support.design.widget.CollapsingToolbarLayout.setCollapsedTitleTextColor方法的典型用法代碼示例。如果您正苦於以下問題:Java CollapsingToolbarLayout.setCollapsedTitleTextColor方法的具體用法?Java CollapsingToolbarLayout.setCollapsedTitleTextColor怎麽用?Java CollapsingToolbarLayout.setCollapsedTitleTextColor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.support.design.widget.CollapsingToolbarLayout
的用法示例。
在下文中一共展示了CollapsingToolbarLayout.setCollapsedTitleTextColor方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setupCollapsingImage
import android.support.design.widget.CollapsingToolbarLayout; //導入方法依賴的package包/類
private void setupCollapsingImage() {
appBarLayout = (AppBarLayout) findViewById(R.id.app_bar_layout);
//Fade out CollapsingToolbarLayout title ...from white to transparent
collapsingToolbarLayout = (CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar);
Typeface type = Typeface.createFromAsset(getAssets(), "fonts/open_sans/OpenSans-Light.ttf");
collapsingToolbarLayout.setExpandedTitleTypeface(type);//fonts
collapsingToolbarLayout.setCollapsedTitleTypeface(type);
collapsingToolbarLayout.setTitle(getString(R.string.pod));
collapsingToolbarLayout.setExpandedTitleColor(getResources().getColor(R.color.white_opacity));
collapsingToolbarLayout.setCollapsedTitleTextColor(getResources().getColor(R.color.white_opacity_king));
//Set Picture of the day to collapsing ImageView
collapsingImageView = (ImageView) findViewById(R.id.collapsing_ImageView);
pictureOfTheDayList = storage.retrieveRSS_Feed(MediaType.PICTURE);
if (pictureOfTheDayList != null &&
pictureOfTheDayList.size() > 0 &&
pictureOfTheDayList.get(0) != null &&
pictureOfTheDayList.get(0).getMediaLink() != null)
Glide.with(this)
.load(pictureOfTheDayList.get(0).getMediaLink())
.centerCrop()
.into(collapsingImageView);
}