This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Do 1 heavy operation, when successful, fire 2 more heavy operations sequentially that use the first operation's data | |
*/ | |
private List<String> getHeavyList() { | |
List<String> list = new ArrayList<>(); | |
list.add("First string"); | |
list.add("Second string"); | |
list.add("Third string"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private List<String> getHeavyList() { | |
List<String> list = new ArrayList<>(); | |
list.add("First string"); | |
list.add("Second string"); | |
list.add("Third string"); | |
return list; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void hideKeyboard(Context context, View view) { | |
getInputMethodManager(context).hideSoftInputFromWindow(view.getWindowToken(), 0); | |
} | |
public static void showKeyboard(Context context, View view) { | |
getInputMethodManager(context).showSoftInput(view, 0); | |
} | |
public static InputMethodManager getInputMethodManager(Context context) { | |
return (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); |
NewerOlder