I have main activity with background image and with some buttons,editext and textviews.
Now when I launch this activity I should have the background image with blur effect and all the controls visible.
I have done this way but result with no effect
getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
As it is already deprectaed. Can anyone suggest me the best way to do this?
You can try these implementations for one that suits you the most:
Fast Bitmap Blur For Android SDK
Advanced blurring techniques
Blur effect for Android design
Related
I am trying to achieve a transparent background with a blurry effect on it. I managed to made the activity transparent but no luck with the blur. Could you help me to figure this out? I attached an image with contains what I would like to achieve(that blurry background below settings app).Thank you.Example
You can use Blurry library to achieve blur effect. It works perfect, but has minor bugs with activity state recreation (please check out issues)
For my app, I plan to have a grid of images and when you select one the image increases in size and the rest of the images get grayed out. I read about Activity Transitions but have never implemented that before so I'm not sure if this is the appropriate way of achieving the correct affect. I was thinking of possibly using a fragment and an animation to display the image in a larger size but how do I display the activity in the background with a grey tint to it so that it looks out of focus? I'm looking here to see what you think the most appropriate method of making this work. Here is a gif of exactly what I'm trying to accomplish.
I want to make a layout like this. This app will be for my own use only i don't have much experience in graphics with android. I have draw these images and saved as PNG separately. I tried to put them in a layout, but i face to many difficulties with spacing and correct placing. But PNG is a rectangle and it clicks outside the image. So i think about preparing all possible situation and load all image as background. Touchable area rectangle(invisible) would be drawn inside button.
Is it a good practice to load image as a background when touch? I would have 16x4=64 backgrounds
What difficulties i can face in the future?
Should i stick to the black background and load separate buttons?
If above "Yes", then to draw background and image is better to resize image in pixels in a drawing SW like Corel? In my case 1280x720
1:
And the touch area would be something like this so i don't think it is possible to misclick it?
2:
With classic View, you won't be able to do non-rectangular view (you can draw want ever you want but your touch area is still rectangular).
The easiest way is to handle the onTouchEvent on a large View (fillin the screen with your image as background) with a View.OnTouchListener and calculate above which (fake) button you are.
For highlights you can use SurfaceView (could be the tricks #Frank.N.Stein talks about).
The hardest way is to use OpenGL graphics ... good luck for a someone who doesn't "have much experience [...]".
Is it possible to create a fog effect on the screen of an android phone. iFoggy was able to get this effect (see picture) for an iPhone.
Is it possible to achieve the same for an android app. I just want the foggy effect and don't want anything to happen when the user touches the screen.
I'm guessing this might be achieved using Bitmap but I've never used that before so any tips would be helpful.
you can have a look at this question here to have Blur Effect for your screen
Make a transparent activity. Refer this answer. click
And set the background for the layout of this activity, a transparent PNG file. Here is the PNG file.
click
I want to have a gradient on my app background. The picture is only ten pixels wide and I would like it to repeat horizontally. Then I have the background set to the color where the gradient ends vertically. In CSS I could easily do this by this code:
background: url("bg.png") repeat-x #0f0f0f;
But I have no idea how to do this on android. I tried setting a bitmap but everytime I put it in the XML the app force closes on me and there doesn't seem to be "repeat-x" like option on it.
So what would be the best way to handle this?
you can use bitmap shader to repeat a particular bitmap .
Refer to this link
Also check this Api Demo Example