Android ListView简单应用

时间:2021-10-10 05:32:06
【文件属性】:

文件名称:Android ListView简单应用

文件大小:1.28MB

文件格式:RAR

更新时间:2021-10-10 05:32:06

Android ListView

主要代码: public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ArrayAdapter arrayAdapter=new ArrayAdapter( MainActivity.this,android.R.layout.simple_list_item_1,msWordS ); ListView listView = findViewById(R.id.Main_ListView); listView.setAdapter(arrayAdapter); } private String[] msWordS={"A","B","C","D","E","F"}; }


网友评论