ImageView 边缘阴影特效 Androidimageview图片阴影立体感 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 自定义theme里面去定义,网上应该有很多demo的吧 photoshop可以实现的,直接让美工实现,拿过来用就行。 简单点就是PS 1分钟搞定复杂的 看这个吧http://blog.csdn.net/wdwlbsm1/article/details/7704166 public static Bitmap createReflectionBitmap(Bitmap bitmap) { final int reflectionGap = 4; int width = bitmap.getWidth(); int height = bitmap.getHeight(); Matrix matrix = new Matrix(); matrix.preScale(1, -1); Bitmap reflectionImage = Bitmap.createBitmap(bitmap, 0, height / 2, width, height / 2, matrix, false); Bitmap bitmapWithReflection = Bitmap.createBitmap(width, (height + height / 2), Config.ARGB_8888); Canvas canvas = new Canvas(bitmapWithReflection); canvas.drawBitmap(bitmap, 0, 0, null); Paint deafalutPaint = new Paint(); canvas.drawRect(0, height, width, height + reflectionGap, deafalutPaint); canvas.drawBitmap(reflectionImage, 0, height + reflectionGap, null); Paint paint = new Paint(); LinearGradient shader = new LinearGradient(0, bitmap.getHeight(), 0, bitmapWithReflection.getHeight() + reflectionGap, 0x70ffffff, 0x00ffffff, TileMode.CLAMP); paint.setShader(shader); // Set the Transfer mode to be porter duff and destination in paint.setXfermode(new PorterDuffXfermode(Mode.DST_IN)); // Draw a rectangle using the paint with our linear gradient canvas.drawRect(0, height, width, bitmapWithReflection.getHeight() + reflectionGap, paint); return bitmapWithReflection; }试下这个看看吧 代码实现的话是可以定义shapehttp://blog.csdn.net/wawxf2008/article/details/41821265 如何在eclipse6.0上安装ADT插件 androidpn客户端连接服务端出现异常 开发扫描条形码 新浪微博接口 使用getContentResolver().query()获得联系人信息,程序出错 EditText Fragment的问题 HttpURLConnection 连接网络出现 EOFException 新人求助 环境搭建缺少build-tool view隐藏问题 Android滑动菜单 请问关于listview上 选中后 显示的问题
复杂的 看这个吧
http://blog.csdn.net/wdwlbsm1/article/details/7704166
final int reflectionGap = 4;
int width = bitmap.getWidth();
int height = bitmap.getHeight(); Matrix matrix = new Matrix();
matrix.preScale(1, -1); Bitmap reflectionImage = Bitmap.createBitmap(bitmap, 0, height / 2,
width, height / 2, matrix, false); Bitmap bitmapWithReflection = Bitmap.createBitmap(width,
(height + height / 2), Config.ARGB_8888); Canvas canvas = new Canvas(bitmapWithReflection);
canvas.drawBitmap(bitmap, 0, 0, null);
Paint deafalutPaint = new Paint();
canvas.drawRect(0, height, width, height + reflectionGap, deafalutPaint); canvas.drawBitmap(reflectionImage, 0, height + reflectionGap, null); Paint paint = new Paint();
LinearGradient shader = new LinearGradient(0, bitmap.getHeight(), 0,
bitmapWithReflection.getHeight() + reflectionGap, 0x70ffffff,
0x00ffffff, TileMode.CLAMP);
paint.setShader(shader);
// Set the Transfer mode to be porter duff and destination in
paint.setXfermode(new PorterDuffXfermode(Mode.DST_IN));
// Draw a rectangle using the paint with our linear gradient
canvas.drawRect(0, height, width, bitmapWithReflection.getHeight()
+ reflectionGap, paint); return bitmapWithReflection;
}试下这个看看吧
http://blog.csdn.net/wawxf2008/article/details/41821265