摘要:Activity的跳转,通过intent实现。在mainActivity中,使用startActivity()方法启动一个新的Activity。 public void onClick_Jump(View _view) { Intent intent2 = new Intent(MyA...
阅读全文
posted @ 2014-11-08 20:21
black smith
文章分类 - Android
摘要:Activity的跳转,通过intent实现。在mainActivity中,使用startActivity()方法启动一个新的Activity。 public void onClick_Jump(View _view) { Intent intent2 = new Intent(MyA...
阅读全文
posted @ 2014-11-08 20:21
摘要:Android中提供了Widget包(android.widget.*),包含各种UI元素在应用程序的屏幕中使用。如按钮、列表框、进度条、图片显示等。一、按钮(Button)Android Studio中拖进Button。xml中有: 在 activity.java 中加入以下代码:public ...
阅读全文
posted @ 2014-11-04 21:08
摘要:方式一:在activity的onCreate()方法中,嵌入如下代码: Button button = (Button)findViewById(R.id.button1); button.setOnClickListener( new OnClickListener() { ...
阅读全文
posted @ 2014-11-04 20:36
|