上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页
摘要: 这样的场景:OA中的报销审批。如果老板公务缠身,经常出差,员工经常会抱怨得不到及时的报销审批。因此类似审批性质的需求在移动OA中很常用。下面用这样的场景演示一下Android的通知的使用。写了个简单的Activity,按按钮,就产生一个通知,并且有声音提示。下拉通知栏:点选该通知条目,重新进入上面的那个简单的Activity,当然可以打开其他的Activity,这里为了示例简单。可以看到这回提示的通知图标在点选后消失了。源码见:http://easymorse.googlecode.com/svn/trunk/android.notification/主要起作用的代码,就是点击按钮后的处理部分 阅读全文
posted @ 2012-02-21 11:29 灰太狼_lilongmin 阅读(2187) 评论(0) 推荐(0) 编辑
摘要: 编辑器加载中...可以去除信息栏1 private Bitmap shot(Activity activity) { 2 // View是你需要截图的View 3 View view = activity.getWindow().getDecorView(); 4 view.setDrawingCacheEnabled(true); 5 view.buildDrawingCache(); 6 Bitmap b1 = view.getDrawingCache(); 7 8 // 获取状态栏高... 阅读全文
posted @ 2012-02-20 10:26 灰太狼_lilongmin 阅读(543) 评论(0) 推荐(0) 编辑
摘要: 1 imageView.setScaleType(ImageView.ScaleType.FIT_XY ); 1 这里我们重点理解ImageView的属性android:scaleType,即ImageView.setScaleType(ImageView.ScaleType)。android:scaleType是控制图片如何resized/moved来匹对ImageView的size。ImageView.ScaleType / android:scaleType值的意义区别: 2 3 CENTER /center 按图片的原来size居中显示,当图片长/宽超过View的长/宽,则截取... 阅读全文
posted @ 2012-02-19 00:43 灰太狼_lilongmin 阅读(79786) 评论(2) 推荐(6) 编辑
摘要: 1 Thread thread = new Thread(new UpdateStatusThread());2 thread.start(); 1 // 发表微博 2 class UpdateStatusThread 3 implements Runnable { 4 public void run() { 5 int what = -1; 6 Status status = null; 7 weibo.setToken(accessToken, accessSecret);... 阅读全文
posted @ 2012-02-18 22:36 灰太狼_lilongmin 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 1 import java.io.File; 2 3 import android.app.Activity; 4 import android.graphics.Bitmap; 5 import android.graphics.BitmapFactory; 6 import android.os.Bundle; 7 import android.view.View; 8 import android.widget.Button; 9 import android.widget.ImageView; 10 import android.widget.Te... 阅读全文
posted @ 2012-02-18 21:20 灰太狼_lilongmin 阅读(607) 评论(0) 推荐(1) 编辑
摘要: 1 package com.ql.app; 2 3 import java.util.ArrayList; 4 import java.util.List; 5 6 import android.app.Activity; 7 import android.content.Intent; 8 import android.os.Bundle; 9 import android.view.View; 10 import android.widget.Button; 11 import android.widget.EditText; 12 import... 阅读全文
posted @ 2012-02-18 21:07 灰太狼_lilongmin 阅读(277) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/xieqibao/article/details/6682128 阅读全文
posted @ 2012-02-18 20:54 灰太狼_lilongmin 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 1 package com.bingo.util; 2 3 import java.io.BufferedOutputStream; 4 import java.io.ByteArrayOutputStream; 5 import java.io.File; 6 import java.io.FileOutputStream; 7 import java.io.IOException; 8 import java.io.InputStream; 9 10 import android.graphics.Bitmap; 11 import android.graphics... 阅读全文
posted @ 2012-02-18 20:26 灰太狼_lilongmin 阅读(4953) 评论(0) 推荐(0) 编辑
摘要: 1 方法一: 2 public void saveFile(Bitmap bm, String fileName) 3 throws IOException { 4 File dirFile = new File(ALBUM_PATH); 5 if (!dirFile.exists()) { 6 dirFile.mkdir(); 7 } 8 File myCaptureFile = new File(ALBUM_PATH + fileName); 9 BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStrea. 阅读全文
posted @ 2012-02-18 19:47 灰太狼_lilongmin 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 1.public byte[] getBitmapByte(Bitmap bitmap) { ByteArrayOutputStream out = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.JPEG, 100, out); try { out.flush(); out.close(); } catch (IOException e) { e.printStackTrace(); } return out.toByteArray(); }2.调用getBitmapByte();byte[] conten 阅读全文
posted @ 2012-02-18 17:19 灰太狼_lilongmin 阅读(2770) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页