android.support.v7.widget.CardView.setTransitionName()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(115)

本文整理了Java中android.support.v7.widget.CardView.setTransitionName()方法的一些代码示例,展示了CardView.setTransitionName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CardView.setTransitionName()方法的具体详情如下:
包路径:android.support.v7.widget.CardView
类名称:CardView
方法名:setTransitionName

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");

相关文章