Example usage for android.app Fragment equals

List of usage examples for android.app Fragment equals

Introduction

In this page you can find the example usage for android.app Fragment equals.

Prototype

@Override
final public boolean equals(Object o) 

Source Link

Document

Subclasses can not override equals().

Usage

From source file:org.eyeseetea.malariacare.DashboardActivity.java

/**
 * Checks if a dashboardUnsentFragment is active
 *//*from  ww  w .  ja  v  a 2 s  .  c o  m*/
public boolean isFragmentActive(Fragment fragment, int layout) {
    Fragment currentFragment = this.getFragmentManager().findFragmentById(layout);
    if (currentFragment != null && currentFragment.equals(fragment)) {
        return true;
    }
    return false;
}