android.widget.ListView.setLayoutAnimation()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(132)

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

ListView.setLayoutAnimation介绍

暂无

代码示例

代码示例来源:origin: H07000223/FlycoDialog_Master

mLv.setLayoutAnimation(mLac);

代码示例来源:origin: H07000223/FlycoDialog_Master

mLv.setLayoutAnimation(mLac);

代码示例来源:origin: linglongxin24/AnimationDemo

/**
   * 布局动画
   */
  private void commonAdapterTest() {
    ListView listView = (ListView) findViewById(R.id.listview);
    List<String> datas = new ArrayList<>();
    for (int i = 0; i < 18; i++) {
      datas.add("万能适配器测试" + i);
    }
    LayoutAnimationController layoutAnimationController= new LayoutAnimationController(AnimationUtils.loadAnimation(this, R.anim.zoom_in));
    layoutAnimationController.setOrder(LayoutAnimationController.ORDER_NORMAL);
    listView.setLayoutAnimation(layoutAnimationController);
    listView.setAdapter(new CommonAdapter<String>(this, datas, R.layout.item) {

      @Override
      protected void convertView(View item, String s) {
        TextView textView = CommonViewHolder.get(item, R.id.textView);
        textView.setText(s);
      }
    });
  }
}

代码示例来源:origin: dsolonenko/financisto

private void applyAnimationToListView() {
  AnimationSet set = new AnimationSet(true);
  Animation animation = new AlphaAnimation(0.0f, 1.0f);
  animation.setDuration(50);
  set.addAnimation(animation);
  animation = new TranslateAnimation(
    Animation.RELATIVE_TO_SELF, 0.0f,Animation.RELATIVE_TO_SELF, 0.0f,
    Animation.RELATIVE_TO_SELF, -1.0f, Animation.RELATIVE_TO_SELF, 0.0f
  );
  animation.setDuration(100);
  set.addAnimation(animation);
  LayoutAnimationController controller = new LayoutAnimationController(set, 0.5f);
  ListView listView = getListView();
  listView.setLayoutAnimation(controller);
}

代码示例来源:origin: qiubiteme/android_api_demos

@Override
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setListAdapter(new ArrayAdapter<>(this,
      android.R.layout.simple_list_item_1, mStrings));
  AnimationSet set = new AnimationSet(true);
  Animation animation = new AlphaAnimation(0.0f, 1.0f);
  animation.setDuration(50);
  set.addAnimation(animation);
  animation = new TranslateAnimation(
      Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f,
      Animation.RELATIVE_TO_SELF, -1.0f, Animation.RELATIVE_TO_SELF, 0.0f
  );
  animation.setDuration(100);
  set.addAnimation(animation);
  LayoutAnimationController controller = new LayoutAnimationController(set, 0.9f);
  ListView listView = getListView();
  listView.setLayoutAnimation(controller);
}

代码示例来源:origin: li2/learning-android-open-source

@Override
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setListAdapter(new ArrayAdapter<String>(this,
      android.R.layout.simple_list_item_1, mStrings));
  AnimationSet set = new AnimationSet(true);
  Animation animation = new AlphaAnimation(0.0f, 1.0f);
  animation.setDuration(50);
  set.addAnimation(animation);
  animation = new TranslateAnimation(
    Animation.RELATIVE_TO_SELF, 0.0f,Animation.RELATIVE_TO_SELF, 0.0f,
    Animation.RELATIVE_TO_SELF, -1.0f,Animation.RELATIVE_TO_SELF, 0.0f
  );
  animation.setDuration(100);
  set.addAnimation(animation);
  LayoutAnimationController controller = new LayoutAnimationController(set, 0.5f);
  ListView listView = getListView();        
  listView.setLayoutAnimation(controller);
}

代码示例来源:origin: smuyyh/SprintNBA

mLv.setLayoutAnimation(mLac);

代码示例来源:origin: SMSTicket/sms-ticket

vList.setVisibility(View.GONE);
if (mShowAnimation) {
  vList.setLayoutAnimation(new LayoutAnimationController(AnimationUtils.loadAnimation(c, android.R.anim
    .slide_in_left)));

代码示例来源:origin: xuhongv/SmartHome

Adapter adapter = new Adapter();
listView.setAdapter(adapter);
listView.setLayoutAnimation(mLac);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
  @Override

代码示例来源:origin: smuyyh/SprintNBA

mLv.setLayoutAnimation(mLac);

代码示例来源:origin: Yuphee/RecordVideo

mLv.setLayoutAnimation(mLac);

相关文章

ListView类方法