自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(16)
  • 收藏
  • 关注

转载 android一键锁屏

原文地址:http://www.fengfly.com/plus/view-209437-1.html 要用到下面两个类: DeviceAdminReceiver设备管理组件。这个类提供了一个方便解释由系统发出的意图的动作。你的设备管理应用程序必须包含一个DeviceAdminReceiver的子类。本程序中,就代表一个手机上的设备管理器. DevicePolicyManage...

2014-05-26 10:26:00 133

转载 将流中的数据转换成字符串

public class StreamTools {     public static String readFromStream(InputStream is) throws Exception {        ByteArrayOutputStream baos = new ByteArrayOutputStream();         byte[] buffer = n...

2013-06-12 00:21:00 367

转载 Android加载大图片OOM异常解决

项目用到加载大图片,app老是出现OOM异常,总结了几点经验,供参考。 1、手动干涉dalvik的堆内存处理效率: 1 private final static float TARGET_HEAP_UTILIZATION = 0.75f; 2 //for same activity 3 public void onCreate() 4 { ...

2013-05-21 00:31:00 142

转载 JSON数据解析

package com.heaven.shopping.engine.impl.impl; import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Map; import org.json.JSONException;import org.json.JSONO...

2013-05-21 00:13:00 135

转载 HttpClientAdapter1(工具类)

package com.ithm.lottery16.net; import java.io.InputStream; import org.apache.commons.lang3.StringUtils;import org.apache.http.HttpHost;import org.apache.http.HttpRequest;import org.apache.http...

2013-05-21 00:10:00 182

转载 android 开机启动

public class StartupReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Intent startupintent = new Intent(context,StrongTracks.class...

2013-05-20 16:05:00 105

转载 android 设置apn

ContentValues values = new ContentValues();values.put(NAME, "CMCC cmwap");values.put(APN, "cmwap");values.put(PROXY, "10.0.0.172"); values.put(PORT, "80");values.put(MMSPROXY, "");values.put(MMS...

2013-05-20 16:04:00 115

转载 android 调节屏幕亮度

public void setBrightness(int level) { ContentResolver cr = getContentResolver(); Settings.System.putInt(cr, "screen_brightness", level); Window window = getWindow(); LayoutParams attributes = wi...

2013-05-20 16:03:00 127

转载 BitMap、Drawable、inputStream及byte[] 互转

(1) BitMap to inputStream: ByteArrayOutputStream baos = new ByteArrayOutputStream(); bm.compress(Bitmap.CompressFormat.PNG, 100, baos); InputStream isBm = new ByteArrayInputStream(baos ....

2013-05-20 16:01:00 95

转载 android 获取sd卡状态

/** 获取存储卡路径 */ File sdcardDir=Environment.getExternalStorageDirectory(); /** StatFs 看文件系统空间使用情况 */ StatFs statFs=new StatFs(sdcardDir.getPath()); /** Block 的 size*/ Long blockSize=statFs.getBlock...

2013-05-20 15:59:00 91

转载 android 获取mac地址

1、<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> 2、private String getLocalMacAddress() { WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE)...

2013-05-20 15:58:00 157

转载 android 横竖屏切换

< activity android:name="MyActivity" android:configChanges="orientation|keyboardHidden"> public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(n...

2013-05-20 15:57:00 99

转载 android 根据uri获取路径

Uri uri = data.getData(); String[] proj = { MediaStore.Images.Media.DATA }; Cursor actualimagecursor = managedQuery(uri,proj,null,null,null); int actual_image_column_index = actualimagecursor....

2013-05-20 15:56:00 125

转载 httpclient超时

http://pan.baidu.com/share/link?shareid=106157&uk=3710762942 转载于:https://www.cnblogs.com/gsdimz/archive/2013/05/20/3088732.html

2013-05-20 15:52:00 94

转载 android 判断网络状态

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> private boolean getNetWorkStatus() { boolean netSataus = false; ConnectivityManager cwjManager =...

2013-05-20 15:48:00 98

转载 HttpClientAdapter(工具类)

package com.heaven.shopping.net; import java.util.ArrayList;import java.util.List;import java.util.Map; import org.apache.commons.lang3.StringUtils;import org.apache.http.HttpEntity;import org....

2013-05-20 11:15:00 362

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除