Search in sources :

Example 1 with FragmentActivity

use of androidx.fragment.app.FragmentActivity in project android by owncloud.

the class FileMenuFilter method anyFileVideoPreviewing.

private boolean anyFileVideoPreviewing() {
    final FragmentActivity activity = (FragmentActivity) mContext;
    Fragment secondFragment = activity.getSupportFragmentManager().findFragmentByTag(TAG_SECOND_FRAGMENT);
    boolean videoPreviewing = false;
    if (secondFragment instanceof PreviewVideoFragment) {
        for (int i = 0; !videoPreviewing && i < mFiles.size(); i++) {
            videoPreviewing = ((PreviewVideoFragment) secondFragment).getFile().equals(mFiles.get(i));
        }
    }
    return videoPreviewing;
}
Also used : FragmentActivity(androidx.fragment.app.FragmentActivity) PreviewVideoFragment(com.owncloud.android.ui.preview.PreviewVideoFragment) Fragment(androidx.fragment.app.Fragment) PreviewVideoFragment(com.owncloud.android.ui.preview.PreviewVideoFragment)

Example 2 with FragmentActivity

use of androidx.fragment.app.FragmentActivity in project Douya by DreaminginCodeZH.

the class TimelineBroadcastListResource method attachTo.

public static TimelineBroadcastListResource attachTo(String userIdOrUid, String topic, Fragment fragment, String tag, int requestCode) {
    FragmentActivity activity = fragment.getActivity();
    TimelineBroadcastListResource instance = FragmentUtils.findByTag(activity, tag);
    if (instance == null) {
        instance = newInstance(userIdOrUid, topic);
        FragmentUtils.add(instance, activity, tag);
    }
    instance.setTarget(fragment, requestCode);
    return instance;
}
Also used : FragmentActivity(androidx.fragment.app.FragmentActivity)

Example 3 with FragmentActivity

use of androidx.fragment.app.FragmentActivity in project Douya by DreaminginCodeZH.

the class BroadcastLikerListResource method attachTo.

public static BroadcastLikerListResource attachTo(long broadcastId, Fragment fragment, String tag, int requestCode) {
    FragmentActivity activity = fragment.getActivity();
    BroadcastLikerListResource instance = FragmentUtils.findByTag(activity, tag);
    if (instance == null) {
        instance = newInstance(broadcastId);
        FragmentUtils.add(instance, activity, tag);
    }
    instance.setTarget(fragment, requestCode);
    return instance;
}
Also used : FragmentActivity(androidx.fragment.app.FragmentActivity)

Example 4 with FragmentActivity

use of androidx.fragment.app.FragmentActivity in project Douya by DreaminginCodeZH.

the class BroadcastAndCommentListResource method attachTo.

public static BroadcastAndCommentListResource attachTo(long broadcastId, Broadcast broadcast, Fragment fragment, String tag, int requestCode) {
    FragmentActivity activity = fragment.getActivity();
    BroadcastAndCommentListResource instance = FragmentUtils.findByTag(activity, tag);
    if (instance == null) {
        instance = newInstance(broadcastId, broadcast);
        FragmentUtils.add(instance, activity, tag);
    }
    instance.setTarget(fragment, requestCode);
    return instance;
}
Also used : FragmentActivity(androidx.fragment.app.FragmentActivity)

Example 5 with FragmentActivity

use of androidx.fragment.app.FragmentActivity in project Douya by DreaminginCodeZH.

the class BroadcastCommentListResource method attachTo.

public static BroadcastCommentListResource attachTo(long broadcastId, Fragment fragment, String tag, int requestCode) {
    FragmentActivity activity = fragment.getActivity();
    BroadcastCommentListResource instance = FragmentUtils.findByTag(activity, tag);
    if (instance == null) {
        instance = newInstance(broadcastId);
        FragmentUtils.add(instance, activity, tag);
    }
    instance.setTarget(fragment, requestCode);
    return instance;
}
Also used : FragmentActivity(androidx.fragment.app.FragmentActivity)

Aggregations

FragmentActivity (androidx.fragment.app.FragmentActivity)135 Test (org.junit.Test)36 Intent (android.content.Intent)12 Bundle (android.os.Bundle)12 TextView (android.widget.TextView)7 FragmentManager (androidx.fragment.app.FragmentManager)7 View (android.view.View)6 NonNull (androidx.annotation.NonNull)5 Fragment (androidx.fragment.app.Fragment)5 Before (org.junit.Before)5 Activity (android.app.Activity)4 Rect (android.graphics.Rect)4 CallSuper (androidx.annotation.CallSuper)4 ViewModelProvider (androidx.lifecycle.ViewModelProvider)4 Config (org.robolectric.annotation.Config)4 ShadowActivity (org.robolectric.shadows.ShadowActivity)4 RegistrationViewModel (org.thoughtcrime.securesms.registration.viewmodel.RegistrationViewModel)4 IntentFilter (android.content.IntentFilter)3 UserHandle (android.os.UserHandle)3 Button (android.widget.Button)3