Make Image Drop Shadow - android

I was wondering if anyone know how to make a dropped image shadow on the fly. When I get an input image I would like to have it displayed as the preview shows. Any tips or examples to get started in the right direction would be very appreciated.

It's the Reflection Effect, not Drop-Shadow, which is different.
You might want to refer to my article: http://xjaphx.wordpress.com/2011/11/01/image-processing-image-reflection-effect/

Related

How to create button with blurred drop shadow in Android Studio

I know this question is a duplicate, but I have not found the answer. So, is it possible to create a barely visible blurred shadow from a button in Android Studio? I found an example of a button with the shadow I need. How to make such a shadow so that it is adaptable to each size of the button? Thx.
you have few ways to achieve this. easiest would be to create 9-patch from an image, read carefully how to in official DOC. most pro would be to write own blurring code with probably most efficient for this purpose RenderScript. IN HERE you can find useful article how to blur images with this tool
you can always implement common material-design-styled Button using elevation/translationZ for increasing size of rendered-by-default shadow, but afaik there is no option for changing its color...

How to make a shadow look in bottom of a listview or girdview cell like flipboard in android

am new to android i need to display some data which i have done, but what i need is the look of each cells in the list-view. my requirement is that to add a light shadow in the bottom of each cell in the list view which is similar as the cells in the flip board .
The image looks like in the url Image Required
(i dont have enough rep to post an image so please check the image in the given lik)
see the black circle,exactly a shadow look in each cell, i have goggled and had some research in github repo but i get result like adding blur or something ,but its not gives this effect, i have tryed BlurTestAndroid
and other blur effects but its not giving the result i need. can anyone help me to achieve this effect or any ideas to make my listview cell like this, is blurring is the right way to achieve this or have any other solution to do this.
Thank you

Android - creating a simplified spotify-like layout

I am developing an Android app and am a bit stuck on how I go about creating the layout I'm after. I said spotify-like (website not app) as I dont want the parallax effect. It's actually closer to http://www.poormet.com/.
What I have tested so far is a RelativeLayout with an ImageView and Listview (with transparent dividers) within it. This layout shows the image in the background between rows which is a step in the right direction. The issue is I'm at a loss as to how to get the images to change smoothly depending on what listrows are on screen.
Also, if I want to replicate the text over the images like poormet example mentioned above, then it seems to me I am going to have to have alternating transparent and not transparent rows.
Am I on the right track or am I approaching this problem the wrong way?
Any guidance will be greatly appreciated!!!
(also, please let me know if what I have described doesn't make sense - more than happy to clarify)

Android 9-patch image usage

OK, I've read a lot of tutorials and even downloaded some examples, but for the love of Stackoverflow, I can't get my image to stretch like I want it to and I'm hoping that someone can help me out here.
I create an image that is to be the background of a button object in Android. Here is the image:
Now, I'd like for it to stretch to the desire size of the button, whether the button is 50x50dp or 200x100dp. One thing I don't want is the border to stretch as it will look distorted, so I want to specify not to include the border, but stretch everything else to the desired size of the button.
Can someone please show me where the black lines need to go in order to achieve my goal? Do I have to change my original image in order to achieve my goal?
Thank you in advanced.
David
It's very simple using this tool Android Asset Studio: Simple 9-Path Generator. Although no matter how you do it you will have stretching and distortion due to the textured (non-patterned) background. I would stay away from that style both personally and for usability.

How to paint colours over a background image?

I've been asked to create an app that allows the user to fill in areas of an image with different colours, very similar to a childs "colour by numbers" game.
I'm not sure how to delineate the areas of the image and make them selectable. Please could someone give me an idea of a good way to go about doing this in Android.
Thanks
It's a kind of a tricky task... There's probably a better way to implement it, but here's my first thought:
You could pre-break the image into separate segments before the app runs.
As far as I know the only type of View you can create is a rectangle. But you can create many small rectangles to fill in parts of your image. Then you can get the clicks on those little areas and make a corresponding segment of your image:
int color= res.getColor(R.color.my_color);
image.setColorFilter(color, Mode.SRC_ATOP);
Hope this helps!
If you don't mind writing some NDK code, you could try OpenCV's cvFloodFill method. Otherwise you have to implement one of the image segmentation methods.

Categories

Resources