Skip to content

Instantly share code, notes, and snippets.

View LucasFebatis's full-sized avatar
👽
Get Started

Lucas Febatis LucasFebatis

👽
Get Started
View GitHub Profile
@sc0rch
sc0rch / MainActivity.java
Created July 9, 2016 01:45
Clear focus on touch outside for all EditText inputs.
public class MainActivity extends Activity
// ... any code
/**
* Clear focus on touch outside for all EditText inputs.
*/
@Override
public boolean dispatchTouchEvent(MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
View v = getCurrentFocus();