public class CommonUtilities
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TAG |
Constructor and Description |
---|
CommonUtilities() |
Modifier and Type | Method and Description |
---|---|
static int |
getActionBarHeight(android.content.Context context)
Get action bar height
|
static int |
getStatusBarHeight(android.app.Activity activity)
Returns status bar height in dps
|
static void |
hideShowSoftKeyboardFromFocusedView(android.app.Activity activity,
boolean shouldHide)
Used to hide/show keyboard by getting focused view.
|
static void |
hideShowSoftKeyboardFromView(android.content.Context context,
android.view.View view,
boolean shouldHide)
Use to hide soft keyboard from screen whenever its call.
|
static void |
toastLong(android.content.Context context,
java.lang.String msg)
Shows toast for long duration
|
static void |
toastShort(android.content.Context context,
java.lang.String msg)
Shows toast for short duration
|
public static final java.lang.String TAG
public static void toastShort(android.content.Context context, java.lang.String msg)
public static void toastLong(android.content.Context context, java.lang.String msg)
public static void hideShowSoftKeyboardFromView(android.content.Context context, android.view.View view, boolean shouldHide)
public static void hideShowSoftKeyboardFromFocusedView(android.app.Activity activity, boolean shouldHide)
public static int getStatusBarHeight(android.app.Activity activity)
public static int getActionBarHeight(android.content.Context context)
Integer
value > -1 if action bar height calculated otherwise will return -1