12 2013 档案

摘要:获取适配尺寸的图片:File files = new File(imagePath); FileInputStream is = null; BufferedInputStream bis = null; BitmapFactory.Options opts = new BitmapFactory.Options(); if (files.length() < 51200) { // 20-50k opts.inSampleSize = 2; } else if (files.length() < 307200) { // 50-300k opts... 阅读全文
posted @ 2013-12-23 10:09 上风华 阅读(378) 评论(0) 推荐(0)
摘要:MainActivity.javaimport android.app.AlertDialog;import android.app.Notification;import android.content.DialogInterface;import android.content.Intent;import android.content.res.Resources;import android.os.Bundle;import android.support.v4.app.FragmentActivity;import android.support.v4.app.FragmentMana 阅读全文
posted @ 2013-12-23 09:57 上风华 阅读(2518) 评论(0) 推荐(0)
摘要:最近要做一个建议反馈的模块:将内容生成xml文件再发送出去,下面是三个参数:时间,内容,联系人,机型SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String localtime = df.format(new Date());String mContent = content.getText().toString().trim(); StringmContact = getContact();text.setText("设备名称:" + android.os.Bui 阅读全文
posted @ 2013-12-17 15:07 上风华 阅读(377) 评论(0) 推荐(0)