Java Code Examples for com.gianlu.commonutils.CommonUtils#isVisible()

The following examples show how to use com.gianlu.commonutils.CommonUtils#isVisible() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OngoingGameFragment.java    From PretendYoureXyzzyAndroid with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean canShow(@NonNull BaseTutorial tutorial) {
    if (getActivity() == null || !CommonUtils.isVisible(this)) return false;

    if (tutorial instanceof CreateGameTutorial) {
        return manager != null && manager.amHost();
    } else if (tutorial instanceof HowToPlayTutorial) {
        return manager != null && manager.isPlayerStatus(GameInfo.PlayerStatus.PLAYING);
    } else {
        return false;
    }
}
 
Example 2
Source File: PeersServersTutorial.java    From Aria2App with GNU General Public License v3.0 4 votes vote down vote up
public final boolean canShow(Fragment fragment, RecyclerView.Adapter adapter) {
    return fragment != null && CommonUtils.isVisible(fragment) && adapter != null && adapter.getItemCount() >= 1;
}
 
Example 3
Source File: FilesTutorial.java    From Aria2App with GNU General Public License v3.0 4 votes vote down vote up
public final boolean canShow(Fragment fragment, FilesAdapter adapter) {
    return fragment != null && CommonUtils.isVisible(fragment) && adapter != null && adapter.getCurrentDir() != null && adapter.getCurrentDir().files.size() >= 1;
}
 
Example 4
Source File: FoldersTutorial.java    From Aria2App with GNU General Public License v3.0 4 votes vote down vote up
public final boolean canShow(Fragment fragment, FilesAdapter adapter) {
    return fragment != null && CommonUtils.isVisible(fragment) && adapter != null && adapter.getCurrentDir() != null && adapter.getCurrentDir().dirs.size() >= 1;
}
 
Example 5
Source File: GamesFragment.java    From PretendYoureXyzzyAndroid with GNU General Public License v3.0 4 votes vote down vote up
@Override
public boolean canShow(@NonNull BaseTutorial tutorial) {
    return tutorial instanceof GamesTutorial && getActivity() != null && CommonUtils.isVisible(this);
}