摘要: 这是看到了Android_Tutor的博客中的内容,就贴过来自己学习下了public String getLocalIpAddress() { try { for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) { NetworkInterface intf = en.nextElement(); for (Enumeration<InetAddress> enum... 阅读全文
posted @ 2012-08-15 16:54 Tammie-锴 阅读(2025) 评论(0) 推荐(0) 编辑
摘要: PopUpWindow在显示的时候有点像是个widget,是一个独立的程序块。或者说是像个AlertDialog但是注意了:popupWindow是一个阻塞式的弹出框,这就意味着在我们退出这个弹出框之前,程序会一直等待。 AlertDialog是非阻塞式弹出框,AlertDialog弹出的时候,后台可是还可以做其他事情的哦。主要的工作步骤: 1加载popupWindow的布局文件,这和widget的方法差不多。 1)先顶一个画布contentView 2)popupWindow布局view加载到contentVew中 2 .setFocusable(true)很重要,是p... 阅读全文
posted @ 2012-08-15 16:36 Tammie-锴 阅读(346) 评论(0) 推荐(0) 编辑
摘要: import java.util.Timer;import java.util.TimerTask;import java.util.Date;/** * @author vincent */public class TimerTest { public static void main(String[] args) { Timer t = new Timer(); //在5秒之后执行TimerTask的任务 t.schedule(new TimerTask(){ public void run() {System.out.println("this is task ... 阅读全文
posted @ 2012-08-15 14:38 Tammie-锴 阅读(276) 评论(0) 推荐(0) 编辑