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 SDK 请问怎样可以快速入门android游戏开发? 谁能提供一下完整版的可编译的Android2.2的源代码? Android 手机游戏 赛车类地图的设计与实现的问题 请问:Android如何获取并修改DM Tree节点上的信息? android向web提交数据,中文乱码 这种布局怎么弄 Android UI设计:一个文本框位置的设置 AS 3.0如何彻底解决aapt2错误 StrokeDescription的continueStroke这个方法根本就用不了啊,想用MyAccessibilityService模拟手势 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