Example usage for android.widget RelativeLayout getWindowToken

List of usage examples for android.widget RelativeLayout getWindowToken

Introduction

In this page you can find the example usage for android.widget RelativeLayout getWindowToken.

Prototype

public IBinder getWindowToken() 

Source Link

Document

Retrieve a unique token identifying the window this view is attached to.

Usage

From source file:de.baumann.hhsmoodle.helper.helper_main.java

public static void hideFilter(Activity activity, RelativeLayout layout, ImageView imageView) {
    InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.hideSoftInputFromWindow(layout.getWindowToken(), 0);
    imageView.setVisibility(View.VISIBLE);
    layout.setVisibility(View.GONE);
}