摘要: 1. 单实体数据模型如:{ "userId": "U46554751", "userName": "张三李四王麻子", "userPhone": "13030303131", "userFollow": "86", "userFuns": "5125", "userFavorite": "615", "userEBuy": "1 阅读全文
posted @ 2013-08-12 21:48 Dive 阅读(603) 评论(0) 推荐(0) 编辑
摘要: 在Android中提供了两种智能输入框,它们是AutoCompleteTextView、MultiAutoCompleteTextView。它们的功能大致一样。显示效果像Google搜索一样,当你在搜索框里输入一些字符时(至少两个字符),会自动弹出一个下拉框提示类似的结果。下面详细介绍一下。一、AutoCompleteTextView1、简介一个继承自EditView的可编辑的文本视图,能够实现动态匹配输入的内容。如google搜索引擎当输入文本时可以根据内容显示匹配的热门信息。2、重要方法clearListSelection():清除选中的列表项dismissDropDown():如果存在关 阅读全文
posted @ 2013-08-12 21:34 Dive 阅读(1745) 评论(0) 推荐(0) 编辑
摘要: package android.lekko.tools; import android.app.Activity; import android.content.ContentResolver; import android.provider.Settings; import android.provider.Settings.System; import android.view.WindowManager; import android.widget.Toast; public class LightnessControl { // 判断是否开启了自动亮度调节 pub... 阅读全文
posted @ 2013-03-24 19:06 Dive 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 第一步:首先创建一个广播接收者,重构其抽象方法 onReceive(Context context, Intent intent),在其中启动你想要启动的Service或app。 import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log; public class BootBroadcastReceiver extends BroadcastRecei... 阅读全文
posted @ 2013-03-24 18:48 Dive 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 获取WifiManagerWifiManager wm = (WifiManager) this.getSystemService(Context.WIFI_SERVICE);设置wifi功能开启bRet = wifiManager.isWifiEnabled();//判断是否开启bRet = wifiManager.setWifiEnabled(true);//设置开启关闭注意,调用setWifiEnabled后,系统进行wifi模块的开启需要一定时间,此时通过wifiManager.getWifiState()获取的状态来判断是否完成。 WifiManager.WIFI_STATE_DIS 阅读全文
posted @ 2013-03-24 18:44 Dive 阅读(611) 评论(0) 推荐(0) 编辑
摘要: package com.app.model;import java.io.DataOutputStream;import java.io.FileInputStream;import java.io.IOException;import java.io.InputStream;import java.net.HttpURLConnection;import java.net.URL;import android.app.Activity;import android.content.Intent;import android.os.Bundle;import android.widget.To 阅读全文
posted @ 2012-09-25 18:32 Dive 阅读(351) 评论(0) 推荐(0) 编辑
摘要: xml文件: Activity:package com.jieer; import android.app.Activity; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Intent; import android.os.Bundle; import android.os.Handler; i... 阅读全文
posted @ 2012-08-31 08:19 Dive 阅读(446) 评论(0) 推荐(0) 编辑
摘要: Activity中添加代码protected void onCreate(Bundle savedInstanceState) {/* 下面是判断当前手机是否支持语音识别功能 */ PackageManager pm = mapIndex.curr.getPackageManager(); List list = pm.queryIntentActivities(new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0); if(list.size()==0) {... 阅读全文
posted @ 2012-08-27 18:54 Dive 阅读(247) 评论(0) 推荐(0) 编辑
摘要: public static void showNotification() { NotificationManager nm = (NotificationManager) DownLoadActivity.mContext .getSystemService(NOTIFICATION_SERVICE); Notification notification = new Notification(R.drawable.lx_download, "xxxx", System.currentTimeMillis()); Intent intent = new Intent(map 阅读全文
posted @ 2012-08-27 18:41 Dive 阅读(322) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/android100/archive/2012/07/25/android-open-source.html 阅读全文
posted @ 2012-07-28 12:49 Dive 阅读(114) 评论(0) 推荐(0) 编辑