src/main/java/de/blau/android/propertyeditor/tagform/DialogRow.java
/**
     * Find the TagFormFragment
     * 
     * @param context the relevant Android Context
     * @return the fragment or null if not found
     */


@param context the relevant Android Context
@return the fragment or null if not found
@param context the relevant Android Context @return the fragment or null if not found
@Nullable
    private static TagFormFragment findFragment(@NonNull Context context) {
        context = unwrap(context);
        if (context instanceof FragmentActivity) {
            FragmentManager fm = ((FragmentActivity) context).getSupportFragmentManager();
            for (Fragment fragment : fm.getFragments()) {
                if (fragment instanceof TagFormFragment) {
                    return (TagFormFragment) fragment;
                }
            }
            Log.e(DEBUG_TAG, "TagFormFragment not found");
        } else {
            Log.e(DEBUG_TAG, "Context is not a FragmentActivity, instead it is " + context.getClass().getCanonicalName());
        }
        return null;
    }
@ Nullable private static TagFormFragment findFragment ( @ NonNull Context context ) { context = unwrap ( context ) ; if ( context instanceof FragmentActivity ) { FragmentManager fm = ( ( FragmentActivity ) context ) . getSupportFragmentManager ( ) ; for ( Fragment fragment : fm . getFragments ( ) ) { if ( fragment instanceof TagFormFragment ) { return ( TagFormFragment ) fragment ; } } Log . e ( DEBUG_TAG , "TagFormFragment not found" ) ; } else { Log . e ( DEBUG_TAG , "Context is not a FragmentActivity, instead it is " + context . getClass ( ) . getCanonicalName ( ) ) ; } return null ; }
Find the TagFormFragment
Find the TagFormFragment