上一页 1 ··· 5 6 7 8 9 10 11 12 下一页
  2011年5月5日
摘要: 1、直接抽象类 对象 = new 抽象类(){ //重写此抽象类的抽象方法 };例子: private TimerTask t1 = new TimerTask(){ @Override public void run() { // TODO Auto-generated method stub //在此实现该抽象方法 } };外层public class TimerActivity2 extends Activity { /** Called when the activity is first created. */ public Timer timer = new Timer(); pr 阅读全文
posted @ 2011-05-05 16:39 snowdrop 阅读(25997) 评论(0) 推荐(0) 编辑
  2011年5月3日
摘要: 如果模拟器太大,运行如下即可,如果找不到,往右下角拉拉就有这个选项了Run--->Run Configuration 阅读全文
posted @ 2011-05-03 22:31 snowdrop 阅读(291) 评论(0) 推荐(0) 编辑
  2011年4月25日
摘要: 好久没有在eclipse下面写东西了,今天写了一个东西,在手机上面运行,发现提示[2011-04-25 14:19:41 - StandardSensorTest] Android Launch![2011-04-25 14:19:41 - StandardSensorTest] adb is running normally.[2011-04-25 14:19:41 - StandardSensorTest] Could not find StandardSensorTest.apk!以前可以运行的很多工程也是提示这个信息,到模拟器上面运行发现提示,什么空间不足。百度第一个问题,得到解决办法 阅读全文
posted @ 2011-04-25 14:27 snowdrop 阅读(5391) 评论(0) 推荐(0) 编辑
  2011年4月23日
摘要: 1、try,catch,finally总结:程序1:package com.trycatch.test6;publicclass TryCatchTest6 {publicstaticvoid main(String[] args) {int a[] = { 1, 2, 3 };try {// int b=5/0;for (int i =0; i < a.length; i++) {System.out.println("a=="+ a[i]);}int b =5/0; }catch (ArithmeticException e) {System.out.printl 阅读全文
posted @ 2011-04-23 18:41 snowdrop 阅读(3915) 评论(2) 推荐(0) 编辑
  2011年2月25日
摘要: 错误提示:[2011-02-24 17:29:36 - StyleTest1] Android Launch![2011-02-24 17:29:36 - StyleTest1] The connection to adb is down, and a severe error has occured.[2011-02-24 17:29:36 - StyleTest1] You must restart adb and Eclipse.[2011-02-24 17:29:36 - StyleTest1] Please ensure that adb is correctly located a 阅读全文
posted @ 2011-02-25 09:47 snowdrop 阅读(11070) 评论(0) 推荐(0) 编辑
  2010年12月22日
摘要: 在显示的视图中加一条间隔线,不像ListView里面的那种虚线,而是一条实线如果是LinearLayout布局,必须要在<View/>的属性里面指定宽和高两个属性,否则就会出错,如果是TableLayout布局,只需要指定高这个属性就可以了xml布局如下:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?xml version="1.0" encoding="utf-8"?> 阅读全文
posted @ 2010-12-22 16:30 snowdrop 阅读(24056) 评论(0) 推荐(1) 编辑
  2010年12月15日
摘要: 其实所谓的静态注册,动态注册,是指接收广播的时候,是静态注册接收还是动态注册接收,发送的时候不分静态,动态以发送intent为例,一共分4种情况,以每次注册两个Broadcast为例:情况一,注册2个静态Broadcast如果是静态注册的,接收的一定是某一个类继承BroadcastReceiver2个java文件如下:BroadcastActivity.java代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package com.bro 阅读全文
posted @ 2010-12-15 14:28 snowdrop 阅读(23713) 评论(0) 推荐(3) 编辑
  2010年12月2日
摘要: 记得以前直接import,import exsiting projects就可以,不知道为什么这次导入的时候,总是出现这个,在网上搜索,学习http://www.devdiv.net/bbs/thread-34441-1-1.html,才知道,在new Android Project里面换一个选项create project from existing,即可。。学习了,嘿嘿。。 阅读全文
posted @ 2010-12-02 20:48 snowdrop 阅读(3453) 评论(0) 推荐(0) 编辑
  2010年12月1日
摘要: activity代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package com.dialog.test1;import android.app.Activity;import android.app.AlertDialog;import android.content.DialogInterface;import android.os.Bundle;import android.widget.Button;import andro 阅读全文
posted @ 2010-12-01 16:21 snowdrop 阅读(20242) 评论(0) 推荐(0) 编辑
  2010年11月29日
摘要: 1、用setContentView方法各个文件定义layout2.xml代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:ori 阅读全文
posted @ 2010-11-29 17:52 snowdrop 阅读(12757) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 下一页