摘要: 一、使用匿名内部类实现 onClickListener接口,通用;二、让MainActivity实现onClickListener接口,这种方法适合于有多个组件时,这样用会更加的方便;三、在XML文件中的相应组件中定义onClick方法,自定义的方法;实现的源码:package com.exampl... 阅读全文
posted @ 2015-04-21 07:32 葉颛顼 阅读(597) 评论(0) 推荐(0) 编辑
摘要: 在原文档中是:Start Activity and Getting ResultsThe startActivity(android.content.Intent) method is used to start a new activity, which will be placed at the... 阅读全文
posted @ 2015-04-12 17:16 葉颛顼 阅读(2291) 评论(0) 推荐(0) 编辑
摘要: MainActivity:点击一个Button会跳转到另一个NextActivitypackage com.example;import java.util.ArrayList;import android.os.Bundle;import android.app.Activity;import a... 阅读全文
posted @ 2015-04-12 13:28 葉颛顼 阅读(1806) 评论(0) 推荐(0) 编辑