- 博客(8)
- 资源 (4)
- 收藏
- 关注
原创 判断当前网络类型
判断当前网络类型 public final static int NONE = 0; // public final static int WIFI = 1; // public final static int MOBILE = 2; // 3G GPRS public final static int ETHERNET = 3;// public static int getN
2013-12-25 09:42:22
594
原创 延时跳转的几种方式
Android延时的两种方式:1,采用Timer和TimerTaskTimer timer = new Timer();TimerTask task = new TimerTask() { @Override public void run() { Intent intent = new Intent(MainActivity.this, Test.class); startA
2013-12-06 12:51:56
902
原创 BroadcastReceiver的OnReceive函数中启动对话框
处理怎样在接收广播后启动对话框用来提示用户,开始看到OnReceive存在context,因此new AlertDialog,但是在show时出错,怀疑是OnReceive中不能进行过长时间的操作,因此新开一个Thread去处理AlertDialog,但是还是会抛异常:android.view.WindowManager$BadTokenException: Unable to add win
2013-12-03 13:46:25
1698
原创 Android代码片段收集
有用的Android代码片段收集,方便自己和大家1,采用Global变量在多个应用间共享配置数据定义变量:settings.java : TEST_IN_SETUP_USER_FLOW设置变量:Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.TEST_IN_SETUP_USER_FLOW,
2013-10-21 11:44:38
654
原创 Android应用启动动画实例
Android应用启动主Activity前显示动画显示欢迎界面并跳转到主界面首先,创建一个动画layout startmain.xml<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android
2013-08-20 14:33:07
1161
原创 Android Handler和Thread实例及Timer()延时
Android对UI的处理需要放在Activity主线程去处理,因此对UI的操作不能在新建的Thread中处理因此,采用Handler机制实现,以更新当前时间为例:1,采用Thread方式处理首先新建Handler:Handler m_handler;static final int m_what = 100000;m_handler=new Handler(){ @Over
2013-08-20 11:13:22
1326
原创 Android AutoCompleteTextView实现
AutoCompleteTextView用于用户输入提示用户字符1,先在主界面xml中定义好 android:layout_width="match_parent" android:text="" android:layout_height="wrap_content" android:id="@+id/autocomplete_autoComp
2013-08-20 10:13:42
638
原创 C/C++ 拾遗(1)
1、请填写BOOL , float, 指针变量 与“零值”比较的 if 语句。 请写出 BOOL flag 与“零值”比较的 if 语句: if ( flag ) if ( !flag ) 请写出 float x 与“零值”比较的 if 语句: const float EPSINON = 0.
2012-08-12 21:45:56
363
大规模多点温度巡检系统设计及应用
2010-05-16
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人