本文整理了Java中android.support.v7.widget.CardView.setTransitionName()
方法的一些代码示例,展示了CardView.setTransitionName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CardView.setTransitionName()
方法的具体详情如下:
包路径:android.support.v7.widget.CardView
类名称:CardView
方法名:setTransitionName
暂无
代码示例来源:origin: WangDaYeeeeee/GeometricWeather
private void initWidget() {
this.container = findViewById(R.id.activity_manage_container);
this.cardView = findViewById(R.id.activity_manage_searchBar);
cardView.setOnClickListener(this);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
cardView.setTransitionName(getString(R.string.transition_activity_search_bar));
}
this.recyclerView = findViewById(R.id.activity_manage_recyclerView);
recyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
recyclerView.addItemDecoration(new ListDecoration(this));
recyclerView.setAdapter(adapter);
ItemTouchHelper itemTouchHelper = new ItemTouchHelper(
new LocationSwipeCallback(
ItemTouchHelper.UP | ItemTouchHelper.DOWN,
ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT));
itemTouchHelper.attachToRecyclerView(recyclerView);
}
代码示例来源:origin: WangDaYeeeeee/Mysplash
card.setTransitionName(collection.id + "-background");
avatar.setTransitionName(collection.user.username + "-avatar");
代码示例来源:origin: WangDaYeeeeee/Mysplash
public void onBindView(Collection collection) {
this.collection = collection;
title.setText("");
subtitle.setText("");
image.setShowShadow(false);
if (collection.cover_photo != null) {
ImageHelper.loadCollectionCover(image.getContext(), image, collection, getAdapterPosition(), this);
card.setCardBackgroundColor(
ImageHelper.computeCardBackgroundColor(
card.getContext(),
collection.cover_photo.color));
} else {
image.setImageResource(R.color.colorDarkCardBackground);
}
ImageHelper.loadAvatar(avatar.getContext(), avatar, collection.user, getAdapterPosition(), null);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
card.setTransitionName(collection.id + "-background");
avatar.setTransitionName(collection.user.username + "-avatar");
}
}
代码示例来源:origin: WangDaYeeeeee/Mysplash
card.setTransitionName(photo.id + "-" + position + "-background");
代码示例来源:origin: WangDaYeeeeee/Mysplash
card.setTransitionName(photo.id + "-background");
内容来源于网络,如有侵权,请联系作者删除!