05 2013 档案

摘要:网络111 刘修军本例子简单了解Buutton、TextView、EditText、对话框的用法。功能:计算圆的面积,当输入非数字时,会弹出一个提示框,提示用户输入数字。 View Code import java.text.DecimalFormat;import android.app.Activity;import android.app.AlertDialog;import android.app.AlertDialog.Builder;import android.content.DialogInterface;import andro... 阅读全文
posted @ 2013-05-18 21:21 拼搏的豆子 阅读(167) 评论(0) 推荐(0) 编辑
摘要:网络111 刘修军ListView是用于显示一组列表项的列表视图。ListView中的列表项可以是一串文字,也可以是包含文字和图片的用户自定义的组合。(1)getAdapter 返回ListView 当前用的适配器。(2)getCheckedItemPosition() 返回当前被选中的项目,选择模式被设置为CHOICE_MODE_SINGLE时有效。复选框使用getCheckedItemPositions()方法。(3)OnKeyDown(int keyCode,KeyEvent event) ListView响应键盘按键事件。还有onKeyUp(),onTouchEvent()等方法。简单 阅读全文
posted @ 2013-05-09 18:48 拼搏的豆子 阅读(151) 评论(0) 推荐(0) 编辑
摘要:网络111 刘修军简单实现对话框,界面如下:代码:public class MyDialogActivity extends Activity implements OnClickListener { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main);... 阅读全文
posted @ 2013-05-07 21:41 拼搏的豆子 阅读(157) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示