so I am trying to implement something like a ripple water effect on an Android app where I can click only on a button and the ripple would affect everything that is currently displayed except the clicked button.
I don't really know how to start, any suggestions?
Related
I currently require to design a camera function for android version 4 (Kitkat), but i notice that there is snap picture button and ok button in the camera as picture below:
How to make it disappear and user just touch on screen it can snap the picture without the button, and the picture will directly save without need of pressing ok button.
Anyone can share me the ideas, I very need you guys help because suffer this for long time already, thanks.
i have a project that is calculator, there is many button and layout above the main layout, i have a history frame that hidden at the right screen, i want that if i swipe the edge of the whole screen and ignore the button and other objects there, the history frame shown
i already read the question here
how to fire an event when someone clicks anywhere on the screen in an android app?
but it didnt work for me
thanks
I solved this problem using dispatchTouchEvent.
I have a simple soundboard which uses Buttons to represent the sounds. When a sound button is clicked. The background image is changed using the view.
Button butt = (Button)view;
butt.setBackgroundResource(buttons_on[media]);
buttons_on is a int[] representing the drawables of the buttons.
This all works perfect, but I also use a FragmentActivity to create a paged App. The App has 4 different pages which you can swipe through. When I change a button using the above code and swipe two pages to the right and than swipe back. The image of the button has changed back to it's default defined in the page.xml.
How can I prevent this behavior?
change the Buttons to ImageButtons and setting the src?
somehow prevent the page from reloading
Instead of doing that you should look at how to use a StateListDrawable. It will simplify your approach.
I have a button which when you click it, a scale animation occurs on the button (scaling until 0), and then another screen shows up. when i hit back the button that i scaled does not show. Help?
From what I understand, the "back" function programming is not appropriate. If you have used a back button, try programming the visibility of your scaled button in back button. Post your code for "back" function so that it will give a better idea of your need and your problem.
I'm having issues while coding for my Evo. While touching the screen, the Evo interprets me touching the buttons as another press on the screen instead of a onKeyDown, onBackPressed, etc. (It actually sets the MotionEvent pointer count to 2, and I can get the co-ords that I'm touching that are off the main screen, for example, 830*190 when touching the back button.)
Short of coding in the locations of the buttons (which would be different for every phone with capacitive buttons, if they all have the same issue), is there any way to get around this? Does anyone else have this issue with a different capacitive buttoned device?
On the Evo, the area where the buttons are uses the same capacitive touch sensor as the screen. You can test this by loading up a webpage and scrolling until your finger is in the buttons region. Instead of pressing those buttons, you just continue to scroll around on the webpage, because as far as the phone is concerned you're still touching the "screen".