移动开发技术(Android)——实验5Android高级控件的应用

阅读: 评论:0

2024年2月5日发(作者:)

移动开发技术(Android)——实验5Android高级控件的应用

import

import

import

import

import

import

import

import

import

import

CheckBox;EditText;ListView;RadioButton;RadioGroup;kedChangeListener;SimpleAdapter;Spinner;TableRow;TextView;public class MainActivity extends Activity { TextView show; EditText name_ET,age_ET; RadioGroup dep ; CheckBox hobby_CB; TableRow CB_TR; Spinner spinner; ListView listview; String name,age; String department=""; String hobby=""; String xueli=""; Button sb_BT,rs_BT,show_BT; View item; ArrayList allmess; @Override protected void onCreate(Bundle savedInstanceState) { te(savedInstanceState); setContentView(ty_main); name_ET=(EditText) findViewById(_name); age_ET=(EditText) findViewById(_age); dep = (RadioGroup) findViewById(roup1); spinner=(Spinner) findViewById(r);

listview=(ListView) findViewById(ew); allmess = new ArrayList(); CB_TR=(TableRow) findViewById(_TR); sb_BT=(Button) findViewById(_BT); sb_lickListener(new ClickListener()); rs_BT=(Button) findViewById(_BT); rs_lickListener(new ClickListener()); show_BT=(Button) findViewById(_BT); show_lickListener(new ClickListener()); heckedChangeListener(new OnCheckedChangeListener() { @Override public void onCheckedChanged(RadioGroup group, int checkedId) { // TODO Auto-generated method stub RadioButton r; if(checkedId!=-1){ r = (RadioButton) findViewById(checkedId); department=t().toString(); }else{ department=""; } } });

} class ClickListener implements OnClickListener{ @Override public void onClick(View v) { // TODO Auto-generated method stub switch(()){ case _BT: name=name_t().toString();

row1=(TableRow) findViewById(_TR); row2=(TableRow) findViewById(_TR2); sp=(Spinner) findViewById(r); bt_submit=(Button) findViewById(_BT); bt_reset=(Button) findViewById(_BT); bt_show=(Button) findViewById(_BT); lv=(ListView) findViewById(ew); List_allmess=new ArrayList(); rg_version=(RadioGroup) findViewById(roup1); rg_heckedChangeListener(new OnCheckedChangeListener() { @Override public void onCheckedChanged(RadioGroup group, int checkedId) { // TODO Auto-generated method stub RadioButton r; if(checkedId!=-1){ r = (RadioButton) findViewById(checkedId); str_version=t().toString(); }else{ str_version=""; } } });

} public void register(View view){ str_category=""; for(int i=0;i adapter = new ArrayAdapter(, // _list_item_1, r, List_allmess); pter(adapter); }

移动开发技术(Android)——实验5Android高级控件的应用

本文发布于:2024-02-05 19:00:08,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/170713080858028.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:控件   移动   开发技术   实验
留言与评论(共有 0 条评论)
   
验证码:
排行榜

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23