- 博客(11)
- 资源 (1)
- 收藏
- 关注
转载 Gridview的stretchMode详解附自动宽度
<GridView android:id="@+id/grid"android:layout_width="fill_parent"android:layout_height="fill_parent"android:verticalSpacing="35px" android:horizontalSpacing="5px" android:numColumns="auto_fit"
2013-03-29 17:01:15 9605
原创 Canvas画path后导致卡的问题
目测canvas调用drawPath后,在onTouch事件中不停地画一些其它的东西,并且不停地invalidate(),会导致卡顿,解决方法是把drawPath需要画的东西用drawLine来代替
2013-03-28 12:53:21 2588
原创 中文转Unicode编码的范围(包含中文标点)
/** * 为了解决中文乱码问题,一律转城Unicode * @param str * @return */ public String chinaToUnicode(String str) { String result = ""; for (int i = 0; i < str.length(); i++) { int chr1 = (char) str.cha
2013-03-28 09:45:04 4769
原创 自定义Dialog背景透明
@null true @android:color/transparent true @null 以上在style.xml中添加代码中如下调用:dialog = new Dialog(context, R.style.AsyncTaskDialog);
2013-03-26 12:31:55 1066
转载 java精确除运算,保留任意位小数
import java.math.BigDecimal;import java.text.NumberFormat;/** * java精确除法运算,可保留任意长的小数位,多位小数,不限小数位长度 */public class Demo { public static void main(String[] args) { // 除数 BigDecimal bd = new Bi
2013-03-26 09:39:54 2861
原创 java解决sqlserver中文乱码
/** * 为了解决中文乱码问题,一律转城Unicode * @param str * @return */ public String chinaToUnicode(String str) { String result = ""; for (int i = 0; i < str.length(); i++) { int chr1 = (char) str.cha
2013-03-20 22:35:52 4491
转载 使用ViewHolder优化ListView
ViewHolder 是设计个静态类,缓存一下,避免Listview更新的时候,重新操作。public View getView(int position, View convertView, ViewGroup parent) {ViewHolder holder;if (convertView == null) {convertView = mInflater.inflat
2013-03-20 17:20:30 808
原创 Webview使用assets中的自定义html左右有白边
在html中设置body的css属性margin:0; body{ background:#DFE4E7; line-height: 130%; margin:0; }
2013-03-20 10:45:41 1034
原创 root权限后实现静默安装
package com.example.installtest;import java.io.DataOutputStream;import java.io.IOException;import android.app.Activity;import android.os.Bundle;import android.util.Log;import android.view.Menu
2013-03-13 14:07:46 1122
转载 MyEclipse连接SQL Server 2008数据库的操作方法
MyEclipse连接SQL Server 2008数据库的操作方法是本文我们主要要介绍的内容,接下来就让我们一起来了解一下这部分内容吧。一、修改SQL Server 2008首先要确保SQL Server 数据库的登录方式是『混合验证模式』。如果不是也不要紧,数据库登录模式至少是 『Windows身份验证模式』,所以打开Microsoft SQL Server Managemen
2013-03-05 10:17:40 2462
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人