摘要: 1 package com.dome; 2 3 import android.app.Activity; 4 import android.content.Intent; 5 import android.os.Bundle; 6 import android.view.KeyEvent; 7 import android.view.View; 8 import android.view.WindowManager; 9 import android.view.inputmethod.InputMethodManager; 10 imp... 阅读全文
posted @ 2012-03-05 16:23 灰太狼_lilongmin 阅读(2008) 评论(0) 推荐(0) 编辑
摘要: http://bbs.51cto.com/thread-883840-1.html 阅读全文
posted @ 2012-03-05 11:20 灰太狼_lilongmin 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 虽然Apache下有个时间工具类的包,但这里写得时间工具类主要是自己在工作中常用的一些求时间的方法,见代码: 1 [java] view plaincopyprint? 2 /** 3 * UtilsTest 4 * 时间日期工具类,封装工作中常用的一些时间日期计算方法等 5 * 还可以提供更多的重载方法,用于时间的转化等 6 */ 7 package com.labci.util.test; 8 import java.text.DateFormat; 9 import java.text.ParseException; 10 import ... 阅读全文
posted @ 2012-02-25 16:04 灰太狼_lilongmin 阅读(2387) 评论(0) 推荐(0) 编辑
摘要: 1 <!-- 2 加粗中文 android:shadowColor="#000000" 3 android:shadowDx="0.2" 4 android:shadowDy="0.0" 5 android:shadowRadius="0.2" 6 --> 7 <TextView 8 android:id="@+id/notice_title" 9 an... 阅读全文
posted @ 2012-02-25 14:54 灰太狼_lilongmin 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 1 public class StringUtils 2 { 3 /** 4 * 判断给定字符串是否空白串。<br> 5 * 空白串是指由空格、制表符、回车符、换行符组成的字符串<br> 6 * 若输入字符串为null或空字符串,返回true 7 * @param input 8 * @return boolean 9 */10 public static boolean isBlank( String input ) 11 {12 if ( input == null || "".equals( i... 阅读全文
posted @ 2012-02-23 17:02 灰太狼_lilongmin 阅读(2441) 评论(0) 推荐(0) 编辑
摘要: 1 public void transImage(String fromFile, String toFile, int width, int height, int quality) 2 3 { 4 5 try 6 7 { 8 9 Bitmap bitmap = BitmapFactory.decodeFile(fromFile);10 11 int bitmapWidth = bitmap.getWidth();12 13 int bitmapHeight = bitm... 阅读全文
posted @ 2012-02-23 10:16 灰太狼_lilongmin 阅读(934) 评论(0) 推荐(0) 编辑
摘要: 1 // 注册2 dateReceiver = new DateReceiver();3 IntentFilter filter = new IntentFilter();4 filter.addAction(Intent.ACTION_DATE_CHANGED);5 StartUp.this.registerReceiver(dateReceiver, filter); 阅读全文
posted @ 2012-02-22 20:13 灰太狼_lilongmin 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 1. 下列哪些语句关于内存收受接管的申明是正确的? (b )A、 法度员必须创建一个线程来开释内存B、 内存收受接管法度负责开释无用内存C、 内存收受接管法度容许法度员直接开释内存D、 内存收受接管法度可以在指定的时候开释内存对象2. 下面异常是属于Runtime Exception 的是(abcd)(多选) A、ArithmeticException B、IllegalArgumentException C、NullPointerException D、BufferUnderflowException3. Math.round(11.5)便是几许(). Math.round(... 阅读全文
posted @ 2012-02-22 18:23 灰太狼_lilongmin 阅读(845) 评论(0) 推荐(0) 编辑
摘要: 1 public class MyActivity extends Activity{ 2 ... 3 4 public static class Receiver extends BroadcastReceiver{ 5 6 @Override 7 public void onReceive(Context context, Intent intent) { 8 .... 9 }10 11 }12 13 ...14}1 <receiver android:name=".org.dan... 阅读全文
posted @ 2012-02-22 17:50 灰太狼_lilongmin 阅读(1113) 评论(0) 推荐(0) 编辑
摘要: 1 public class LaunchNotificationActivity 2 extends Activity { 3 /** Called when the activity is first created. */ 4 @Override 5 public void onCreate(Bundle savedInstanceState) { 6 super.onCreate(savedInstanceState); 7 8 LinearLayout layout = new LinearLayout(this);... 阅读全文
posted @ 2012-02-21 16:57 灰太狼_lilongmin 阅读(329) 评论(0) 推荐(0) 编辑