登录  | 立即注册

游客您好!登录后享受更多精彩

查看: 824|回复: 0

【Android教程】低级listview适配器

[复制链接]

444

主题

509

帖子

2051

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
2051

荣誉管理论坛元老

发表于 2021-6-20 20:41:40 来自手机 | 显示全部楼层 |阅读模式 来自:
  1. 低级ListView适配器$ H& h$ `1 g2 B7 d5 d

  2. : y0 ?# g! k- }  ]& ^- @
  3. List<String> data = new ArrayList<String>();
    $ f& r$ N2 L- t0 o' p5 e1 u
  4. ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_expandable_list_item_1,strs);4 _) q" x; j6 \+ E- R1 m0 U" h* Z
  5. list.setAdapter(adapter);2 A' T3 w6 E# E$ R5 v/ }8 j
  6. data.add("1")
      ]7 j6 Y, }8 h4 P! x( f! I+ W0 k
复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|星空社区 |网站地图

GMT+8, 2024-5-6 14:17 , Processed in 0.050933 second(s), 23 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表