2013年9月7日
摘要: private ImageView iv_user_photo; private String fileName = ""; private File tempFile; private int crop = 300;// 裁剪大小 private static final int OPEN_CAMERA_CODE = 10; private static final int OPEN_GALLERY_CODE = 11; private static final int CROP_PHOTO_CODE = 12; private OnClic... 阅读全文
posted @ 2013-09-07 16:41 雪鸿·未央 阅读(3309) 评论(1) 推荐(0) 编辑
摘要: //判断SD卡是否存在 if(android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED)) { String path = Environment.getExternalStorageDirectory() + File.separator + "JanuBookingOnline" + File.separator; File file = new File(path); if... 阅读全文
posted @ 2013-09-07 16:32 雪鸿·未央 阅读(1919) 评论(0) 推荐(0) 编辑
摘要: /** * 转换图片成圆形 * @param bitmap 传入Bitmap对象 * @return */ public static Bitmap toRoundBitmap(Bitmap bitmap) { int width = bitmap.getWidth(); int height = bitmap.getHeight(); float roundPx; float left,top,right,bottom,dst_left,dst_top,dst_right,dst_bottom; ... 阅读全文
posted @ 2013-09-07 16:00 雪鸿·未央 阅读(2043) 评论(0) 推荐(0) 编辑
  2012年8月10日
摘要: @Override public boolean onKeyDown(int keyCode, KeyEvent event) { // TODO Auto-generated method stub if (keyCode == KeyEvent.KEYCODE_BACK) { new AlertDialog.Builder(this).setTitle("提示").setMessage("确定退出吗?") .setPositiveButton("确定", new DialogInterface.O... 阅读全文
posted @ 2012-08-10 15:01 雪鸿·未央 阅读(359) 评论(0) 推荐(0) 编辑
  2012年8月9日
摘要: 摘自:http://www.cnblogs.com/sank615/archive/2011/12/20/2286636.htmlTabHost布局 TabHost的布局可以定义在布局文件中,也可以像上一篇的例子一样不用布局文件系统会生成自带布局。 TabHost布局必须包含两个部分,TabWidget和FrameLayout。TabWidget就是每个tab的标签,FrameLayout则是tab内容。 两种情况: 1.如果我们的Activity继承自TabActivity并且在onCreat()方法中调用setContentView(R.layout....),那么我们在包含此Tab... 阅读全文
posted @ 2012-08-09 16:39 雪鸿·未央 阅读(455) 评论(0) 推荐(0) 编辑