为什么viewholde类静态 [英] why viewholde class static

查看:53
本文介绍了为什么viewholde类静态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们在这个类中创建自定义适配器时,我们使用类

就像

when we create custom adapter so inside this class we use a class
like

static class ViewHolder
{
TextView textview;
ImageView imageview;
}





我的问题是为什么它是静态的,因为我们创建了viewholde的对象所以如果我们创建它非静态然后我们影响关于代码



my question is why it static because we create the object of viewholde so if we create it nonstatic then we effect on the code

推荐答案

您已经在Android论坛中发布了这个问题;请不要交叉。
You already posted this question in the Android forum; please do not crosspost.


这篇关于为什么viewholde类静态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆