摘要: 简单来说,就是直接将字符串转化为html字符,然后让textView显示。import android.app.Activity;import android.os.Bundle;import android.text.Html;import android.widget.TextView;publ... 阅读全文
posted @ 2014-02-20 14:27 酱包 阅读(485) 评论(0) 推荐(0) 编辑
摘要: /** * 将dip转换为px * * @param context * @param dipValue * @return */ public static int dip2px(Con... 阅读全文
posted @ 2014-01-26 13:28 酱包 阅读(165) 评论(0) 推荐(0) 编辑
摘要: DecimalFormat formater = new DecimalFormat("#0.##"); System.out.println(formater.format(123456.7897456)); 阅读全文
posted @ 2014-01-08 16:55 酱包 阅读(581) 评论(0) 推荐(0) 编辑
摘要: 一、启动android默认浏览器 Intent intent= new Intent(); intent.setAction("android.intent.action.VIEW"); Uri content_url = Uri.parse("url地址");... 阅读全文
posted @ 2013-12-31 11:20 酱包 阅读(2753) 评论(0) 推荐(0) 编辑
摘要: 方法一:TextView tv = new TextView(this);tv.setText("Test set TextView's color.");//方案一:代码中通过argb值的方式tv.setTextColor(Color.rgb(255, 255, 255));方法二:Resourc... 阅读全文
posted @ 2013-12-28 14:54 酱包 阅读(894) 评论(0) 推荐(0) 编辑
摘要: Afinal是一个orm、ioc框架,遵循约定大于配置原则,无需任何配置即可完成所有工作,但也可以通过配置达到个人的个性化需求。Afinal提倡代码快速简洁,尽量一行代码完成的事情不会用两行。Afinal里面目前包含了四大组件:FinalHttp:用于请求http数据,直接ajax方式请求,文件上传... 阅读全文
posted @ 2013-12-02 16:09 酱包 阅读(139) 评论(0) 推荐(0) 编辑
摘要: package com.rjgrid.gaojiaosns.img.util;import java.io.BufferedOutputStream;import java.io.ByteArrayOutputStream;import java.io.File;import java.io.Fil... 阅读全文
posted @ 2013-11-14 10:47 酱包 阅读(195) 评论(0) 推荐(0) 编辑
摘要: textView.addTextChangedListener(new TextWatcher() { //对输入窗口的字数监听 @Override public void beforeTextChanged(CharSequence s, int st... 阅读全文
posted @ 2013-11-12 15:27 酱包 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 很简单:区别在于JSONObject是一个{}包裹起来的一个对象(Object),而JSONArray则是[]包裹起来的一个数组(Array)。 阅读全文
posted @ 2013-10-30 13:41 酱包 阅读(205) 评论(0) 推荐(0) 编辑
摘要: private float mPosX; private float mPosY; private float mCurrentPosX; private float mCurrentPosY; private ImageView imageview; @Override protected vo... 阅读全文
posted @ 2013-10-28 15:28 酱包 阅读(707) 评论(0) 推荐(0) 编辑