本文整理汇总了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);
}