自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

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

原创 按比例布局

依赖:compile 'com.android.support:percent:22.2.0' <android.support.percent.PercentRelativeLayout xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_pare

2015-06-29 13:57:17 309

原创 代码中设置dip大小

final DisplayMetrics dm = c.getResources().getDisplayMetrics(); mScrollDistance = (int) (SCROLL_DISTANCE * dm.density + 0.5f);

2014-11-24 15:33:03 557

原创 从相册uri获取图片地址

根据返回的uri获得图片真实路径public static Uri convertFileUri(Context mContext, Uri uri) { String filePath; if (uri != null && "content".equals(uri.getScheme())) { Cursor cursor = mContext .getContentR

2014-03-10 13:06:40 1108

原创 int short byte转换

* @方法功能 字节数组和整型的转换 * @param 字节数组 * @return 整型 */ public static int bytesToInt(byte[] bytes) { int num = bytes[0] & 0xFF; num |= ((bytes[1] << 8) & 0xFF00); num |= ((bytes[2] << 16) & 0xFF

2014-03-05 14:30:29 604

转载 音频采集封装

/** * author 胡俊杰 Todo */package com.zx.recorder;import java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOExcept

2014-03-05 14:29:23 645

转载 android 处理图片工具

import java.io.ByteArrayOutputStream;import java.io.File;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException;import android.graphics.Bitmap;import an

2014-01-08 14:52:25 367

原创 web处理中文

webview.loadData(unescape(String s, "text/html; charset=UTF-8", null);web处理中文

2013-11-01 11:14:17 305

原创 发送intent前验证

// Build the intentUri location = Uri.parse("geo:0,0?q=1600+Amphitheatre+Parkway,+Mountain+View,+California");Intent mapIntent = new Intent(Intent.ACTION_VIEW, location);// Verify it resolvesPack

2013-08-06 11:17:25 398

原创 禁止屏幕旋转重新加载oncreat

android:configChanges="orientation|screenSize|keyboardHidden"

2013-07-15 15:59:20 359

转载 判断网络是否可用

public boolean CheckNetwork() { boolean flag = false; ConnectivityManager cwjManager = (ConnectivityManager) AndroidBaseActivity.self.getSystemService(Context.CONNECTIVITY_SERVICE);

2012-05-03 15:04:51 182

转载 WebService调用

权限    package H.AirTime;import java.io.IOException;import org.ksoap2.SoapEnvelope;import org.ksoap2.SoapFault;import org.ksoap2.serialization.SoapObject;import org.ksoap2.s

2012-01-13 21:41:14 298

转载 shape

android:startColor="#ff8c00"                android:endColor="#FFFFFF"                android:angle="270" />                                        android:width="2dp"                andro

2011-11-03 14:15:00 222

转载 Window Manager Layout Params

WindowManager.LayoutParams 是 WindowManager 接口的嵌套类;继承于 ViewGroup.LayoutParams 。   它的内容十分丰富。其实WindowManager.java的主要内容就是由这个类定义构成。下面来分析一下这个类: 定义public static class WindowManager.LayoutPara

2011-11-03 14:07:51 284

转载 Android ListView的右边滚动滑块启用方法

很多开发者不知道ListView列表控件的快速滚动滑块是如何启用的,这里Android开发网告诉大家,辅助滚动滑块只需要一行代码就可以搞定,如果你使用XML布局只需要在ListView节点中加入  android:fastScrollEnabled="true" 这个属性即可,而

2011-09-20 14:03:57 356

空空如也

空空如也

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

TA关注的人

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