Monthly Archives: May 2013

Install Team-viewer in Ubuntu

open Terminal. When it opens, run the command below to download Team Viewer deb package.

If you have 32-bit version of Ubuntu, run the commands below to download that version:


After downloading, run the commands below to install it.

sudo dpkg -i teamviewer_linux.deb

If you have 64-bit version of Ubuntu,run the commands below to download that version:


Then run the commands below to install:

sudo dpkg -i teamviewer_linux_x64.deb

if u Want to Run Team Viewer than type below command on terminal



Show or Hide soft keyboard on opening a dialog or activity in android

For showing the soft keyboard on entering into the activity or to the dialog we can use this coding

Add the following code just before

InputMethodManager input = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);

for hiding keyboard
InputMethodManager input = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);

Show soft keyboard automatically when Edit Text receives focus in Android

   editText.setOnFocusChangeListener(new OnFocusChangeListener() {

            public void onFocusChange(View v, boolean hasFocus) {
       Runnable() {
                    public void run() {
                        InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
                        imm.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT);

Restore ListView Previous State in Android

// save index and top position
int index = mylistview.getFirstVisiblePosition();
View v = mylistview.getChildAt(0);
int top = (v == null) ? 0 : v.getTop();
// restore
mylistview.setSelectionFromTop(index, top);


// Save ListView state
Parcelable state = listView.onSaveInstanceState();

// Set new items

// Restore previous state (including selected item index and scroll position)
%d bloggers like this: