пятница, 29 апреля 2011 г.

воскресенье, 3 апреля 2011 г.

Simon Sinek: How great leaders inspire action | Video on TED.com

Simon Sinek: How great leaders inspire action | Video on TED.com
Замечательная лекция с не менее замечательными примерами, в которой показано, что нужно все начинать с вопроса Зачем?, а уже потом подходить к вопросам Как? и Что?

пятница, 1 апреля 2011 г.

How to show/hide the Android Soft Keyboard

If You need to show or to hide a virtual (soft) keyboard in Android app:
To hide:
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);
This will force the keyboard to be hidden in all situations. In some cases you will want to pass in InputMethodManager.HIDE_IMPLICIT_ONLY as the second parameter to ensure you only hide the keyboard when the user didn't explicitly force it to appear (by holding down menu).

To show:
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(myEditText, 0);