Example usage for android.view View setFocusableInTouchMode

List of usage examples for android.view View setFocusableInTouchMode

Introduction

In this page you can find the example usage for android.view View setFocusableInTouchMode.

Prototype

public void setFocusableInTouchMode(boolean focusableInTouchMode) 

Source Link

Document

Set whether this view can receive focus while in touch mode.

Usage

From source file:Main.java

private static void focusNothing(View rootView) {
    rootView.setFocusableInTouchMode(true);
    rootView.requestFocus();
}

From source file:Main.java

public static void loseFocus(View v) {
    v.setFocusable(false);
    v.setFocusableInTouchMode(false);
}

From source file:Main.java

public static void obtainFocus(View v) {
    v.setFocusable(true);//ww  w .  ja  va 2 s .  c o m
    v.setFocusableInTouchMode(true);
    v.requestFocus();
    v.requestFocusFromTouch();
}

From source file:Main.java

public static void getFocus(View v) {
    v.setFocusable(true);/*from   ww w.j a  v  a  2s .  c  om*/
    v.setFocusableInTouchMode(true);
    v.requestFocus();
    v.requestFocusFromTouch();
}

From source file:Main.java

public static void requestFocus(View view) {
    view.setFocusable(true);
    view.setFocusableInTouchMode(true);
    view.requestFocus();
}

From source file:Main.java

public static void Focus(View view) {
    view.setFocusable(true);/* www .  ja v a  2  s  .c  o m*/
    view.setFocusableInTouchMode(true);
    view.requestFocus();
    view.requestFocusFromTouch();
}

From source file:Main.java

public static void setFocus(View view) {
    view.setFocusable(true);// w w w  .j  ava 2  s.  c o  m
    view.setFocusableInTouchMode(true);
    view.requestFocus();
    view.requestFocusFromTouch();
}

From source file:Main.java

public static void getFocus(View view) {
    view.requestFocus();
    view.setFocusable(true);
    view.setFocusableInTouchMode(true);
}

From source file:Main.java

public static void showSoftKeyboard(View view) {
    if (view == null)
        return;/*from  w w w. ja v  a  2  s.c  o  m*/
    view.setFocusable(true);
    view.setFocusableInTouchMode(true);
    if (!view.isFocused())
        view.requestFocus();

    InputMethodManager inputMethodManager = (InputMethodManager) view.getContext()
            .getSystemService(Context.INPUT_METHOD_SERVICE);
    inputMethodManager.showSoftInput(view, 0);
}

From source file:com.desmond.ripple.view.RippleCompat.java

public static void apply(View v, RippleConfig config, RippleCompatDrawable.OnFinishListener onFinishListener) {
    v.setFocusableInTouchMode(true);
    final RippleCompatDrawable drawable = new RippleCompatDrawable(config);
    if (onFinishListener != null) {
        drawable.addOnFinishListener(onFinishListener);
    }//from  ww  w  . j av a 2s  .  co m
    handleAttach(v, drawable);
    measure(drawable, v);
    adaptBackground(drawable, v, config);
}