Code example for EditText

Methods: getTextsetSelection

0
		return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
				val, ctx.getResources().getDisplayMetrics());
	} 
 
	public static void putCursorAfterLastSymbol(EditText editText) {
		editText.setSelection(editText.getText().length());
	} 
 
	public static void showKeyboard(final View view) {
		new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
 
			@Override 
			public void run() { 
				setKeyboardVisible(view, true);
			} 
		}, 200); 
	} 
 
	public static void setKeyboardVisible(View view, boolean visible) {
		InputMethodManager imm = (InputMethodManager) view.getContext()
				.getSystemService(INPUT_METHOD_SERVICE);