• 大小: 1.06MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-14
  • 语言: 其他
  • 标签: CardView  

资源简介

CardView效果+移除CardView流畅的动画效果

资源截图

代码片段和文件信息

package com.dexafree.materiallistviewexample;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.CheckBox;

/**
 * Created by Fabio on 06.01.2015.
 */
public class BasicListAdapter extends ArrayAdapter {
    public BasicListAdapter(final Context context) {
        super(context android.R.layout.simple_list_item_1);
    }

    @Override
    public View getView(final int position View convertView final ViewGroup parent) {
        ViewHolder viewHolder;
        if (convertView == null) {
            convertView = LayoutInflater.from(getContext()).inflate(R.layout.list_item parent false);

            viewHolder = new ViewHolder();
            viewHolder.mCheckBox = (CheckBox) convertView.findViewById(R.id.checkBox);
            convertView.setTag(viewHolder);
        } else {
            viewHolder = (ViewHolder) convertView.getTag();
        }

        viewHolder.mCheckBox.setText(getItem(position));
        /*
viewHolder.mCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(final CompoundButton buttonView final boolean isChecked) {
// Do something awesome!
}
});
*/

        return convertView;
    }

    static class ViewHolder {
        CheckBox mCheckBox;
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-06-17 10:32  MaterialList-master\
     文件          60  2015-06-17 10:32  MaterialList-master\.gitignore
     文件         755  2015-06-17 10:32  MaterialList-master\.travis.yml
     文件         913  2015-06-17 10:32  MaterialList-master\CHANGELOG.md
     文件        9329  2015-06-17 10:32  MaterialList-master\README.md
     目录           0  2015-06-17 10:32  MaterialList-master\app\
     文件           7  2015-06-17 10:32  MaterialList-master\app\.gitignore
     文件         690  2015-06-17 10:32  MaterialList-master\app\build.gradle
     文件        3387  2015-06-17 10:32  MaterialList-master\app\manifest-merger-release-report.txt
     文件         634  2015-06-17 10:32  MaterialList-master\app\proguard-rules.pro
     目录           0  2015-06-17 10:32  MaterialList-master\app\src\
     目录           0  2015-06-17 10:32  MaterialList-master\app\src\main\
     文件         785  2015-06-17 10:32  MaterialList-master\app\src\main\AndroidManifest.xml
     目录           0  2015-06-17 10:32  MaterialList-master\app\src\main\java\
     目录           0  2015-06-17 10:32  MaterialList-master\app\src\main\java\com\
     目录           0  2015-06-17 10:32  MaterialList-master\app\src\main\java\com\dexafree\
     目录           0  2015-06-17 10:32  MaterialList-master\app\src\main\java\com\dexafree\materiallistviewexample\
     文件        1418  2015-06-17 10:32  MaterialList-master\app\src\main\java\com\dexafree\materiallistviewexample\BasicListAdapter.java
     文件       11264  2015-06-17 10:32  MaterialList-master\app\src\main\java\com\dexafree\materiallistviewexample\MainActivity.java
     目录           0  2015-06-17 10:32  MaterialList-master\app\src\main\res\
     目录           0  2015-06-17 10:32  MaterialList-master\app\src\main\res\drawable-hdpi\
     文件        9397  2015-06-17 10:32  MaterialList-master\app\src\main\res\drawable-hdpi\ic_launcher.png
     目录           0  2015-06-17 10:32  MaterialList-master\app\src\main\res\drawable-mdpi\
     文件        5237  2015-06-17 10:32  MaterialList-master\app\src\main\res\drawable-mdpi\ic_launcher.png
     目录           0  2015-06-17 10:32  MaterialList-master\app\src\main\res\drawable-nodpi\
     文件      114852  2015-06-17 10:32  MaterialList-master\app\src\main\res\drawable-nodpi\dog.png
     文件      777633  2015-06-17 10:32  MaterialList-master\app\src\main\res\drawable-nodpi\photo.jpg
     目录           0  2015-06-17 10:32  MaterialList-master\app\src\main\res\drawable-xhdpi\
     文件       14383  2015-06-17 10:32  MaterialList-master\app\src\main\res\drawable-xhdpi\ic_launcher.png
     目录           0  2015-06-17 10:32  MaterialList-master\app\src\main\res\drawable-xxhdpi\
     文件       19388  2015-06-17 10:32  MaterialList-master\app\src\main\res\drawable-xxhdpi\ic_launcher.png
............此处省略107个文件信息

评论

共有 条评论