1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2025-09-10 02:39:43 +02:00

Re add metadata module

This commit is contained in:
Gregor Santner 2017-09-23 20:33:28 +02:00
parent fe4d646c47
commit bf6bdbd821
4 changed files with 36 additions and 13 deletions

View file

@ -22,6 +22,7 @@ import android.text.Html;
import android.text.SpannableString;
import android.text.method.LinkMovementMethod;
import android.util.TypedValue;
import android.view.View;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
@ -76,11 +77,18 @@ public class ActivityUtils extends net.gsantner.opoc.util.ContextUtils {
}
public void showSnackBar(@StringRes int stringId, boolean showLong) {
Snackbar.make(_activity.findViewById(android.R.id.content), stringId,
public void showSnackBar(@StringRes int stringResId, boolean showLong) {
Snackbar.make(_activity.findViewById(android.R.id.content), stringResId,
showLong ? Snackbar.LENGTH_LONG : Snackbar.LENGTH_SHORT).show();
}
public void showSnackBar(@StringRes int stringResId, boolean showLong, @StringRes int actionResId, View.OnClickListener listener) {
Snackbar.make(_activity.findViewById(android.R.id.content), stringResId,
showLong ? Snackbar.LENGTH_LONG : Snackbar.LENGTH_SHORT)
.setAction(actionResId, listener)
.show();
}
public void hideSoftKeyboard() {
InputMethodManager inputMethodManager = (InputMethodManager) _activity.getSystemService(Activity.INPUT_METHOD_SERVICE);
if (_activity.getCurrentFocus() != null && _activity.getCurrentFocus().getWindowToken() != null) {