2015年9月28日

ProgressDialog 进度条的初步认识

摘要: public class MainActivity extends Activity implements View.OnClickListener{ private ProgressBar progress; private Button add; private Button ... 阅读全文

posted @ 2015-09-28 15:39 纸玫瑰 阅读(722) 评论(0) 推荐(0)

初识别进度条

摘要: public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceS... 阅读全文

posted @ 2015-09-28 10:58 纸玫瑰 阅读(270) 评论(0) 推荐(0)

2015年9月27日

Spinner simpleAdapte适配器 下拉列表

摘要: public class MainActivity extends AppCompatActivity { private TextView text; private Spinner spinner; private SimpleAdapter adapter; priva... 阅读全文

posted @ 2015-09-27 22:52 纸玫瑰 阅读(108) 评论(0) 推荐(0)

下拉菜单 Spinner 简单纯字符串版

摘要: 下拉菜单 Spinner 简单纯字符串版public class MainActivity extends Activity implements AdapterView.OnItemSelectedListener{ private Spinner spinner; private T... 阅读全文

posted @ 2015-09-27 21:10 纸玫瑰 阅读(322) 评论(0) 推荐(0)

2015年9月25日

onItemSelected 获取选中的 信息 3种方法

摘要: @Override public void onItemSelected(AdapterView parent, View view, int position, long id) {方法1:通过ArrayAdapter 提供的getItem(position) 直接获取位置内容 ... 阅读全文

posted @ 2015-09-25 20:39 纸玫瑰 阅读(1028) 评论(0) 推荐(0)

GridView 二维排布

摘要: 与ListView一维排布相对public class MainActivity extends Activity implements AdapterView.OnItemClickListener{ private GridView gv; private int[] icon = ... 阅读全文

posted @ 2015-09-25 15:08 纸玫瑰 阅读(196) 评论(0) 推荐(0)

2015年9月24日

datePicker 及 timePicker Diolage弹出对话框式 比较好看的 监听事件

摘要: DatePickerDialog 的监听 new DatePickerDialog(this, new DatePickerDialog.OnDateSetListener() { @Override public void onDateS... 阅读全文

posted @ 2015-09-24 20:59 纸玫瑰 阅读(268) 评论(0) 推荐(0)

datePicker 及 timePicker 监听事件 获取用户选择 年月日分秒信息

摘要: public class MainActivity extends AppCompatActivity { private TimePicker timePicker; private DatePicker datePicker; private Calendar cal; ... 阅读全文

posted @ 2015-09-24 20:20 纸玫瑰 阅读(4184) 评论(0) 推荐(0)

2015年9月23日

ListView 一维排布 动态滑动添加新item代码

摘要: protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ... 阅读全文

posted @ 2015-09-23 12:30 纸玫瑰 阅读(291) 评论(0) 推荐(0)

Toast的基本用法 吐司打印

摘要: //Toast.makeText(上下文,内容,显示时间);Toast toast =Toast.makeText(this,"位置="+position+"内容="+text,Toast.LENGTH_SHORT);//在屏幕中显示的位置,X轴的相对偏移,Y轴的相对偏移toast.setGravi... 阅读全文

posted @ 2015-09-23 10:58 纸玫瑰 阅读(452) 评论(0) 推荐(0)

导航

< 2025年7月 >
29 30 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31 1 2
3 4 5 6 7 8 9
点击右上角即可分享
微信分享提示