Search in sources :

Example 51 with FragmentActivity

use of androidx.fragment.app.FragmentActivity in project FirebaseUI-Android by firebase.

the class EmailLinkFragment method onAttach.

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    FragmentActivity activity = getActivity();
    if (!(activity instanceof TroubleSigningInListener)) {
        throw new IllegalStateException("Activity must implement TroubleSigningInListener");
    }
    mListener = (TroubleSigningInListener) activity;
}
Also used : FragmentActivity(androidx.fragment.app.FragmentActivity)

Example 52 with FragmentActivity

use of androidx.fragment.app.FragmentActivity in project FirebaseUI-Android by firebase.

the class TroubleSigningInFragment method onAttach.

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    FragmentActivity activity = getActivity();
    if (!(activity instanceof ResendEmailListener)) {
        throw new IllegalStateException("Activity must implement ResendEmailListener");
    }
    mListener = (ResendEmailListener) activity;
}
Also used : FragmentActivity(androidx.fragment.app.FragmentActivity)

Example 53 with FragmentActivity

use of androidx.fragment.app.FragmentActivity in project FirebaseUI-Android by firebase.

the class EmailLinkPromptEmailFragment method onActivityCreated.

@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    FragmentActivity activity = getActivity();
    if (!(activity instanceof EmailLinkPromptEmailListener)) {
        throw new IllegalStateException("Activity must implement EmailLinkPromptEmailListener");
    }
    mListener = (EmailLinkPromptEmailListener) activity;
    initHandler();
}
Also used : FragmentActivity(androidx.fragment.app.FragmentActivity)

Example 54 with FragmentActivity

use of androidx.fragment.app.FragmentActivity in project FirebaseUI-Android by firebase.

the class RegisterEmailFragment method onActivityCreated.

@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    FragmentActivity activity = requireActivity();
    activity.setTitle(R.string.fui_title_register_email);
    if (!(activity instanceof AnonymousUpgradeListener)) {
        throw new IllegalStateException("Activity must implement CheckEmailListener");
    }
    mListener = (AnonymousUpgradeListener) activity;
}
Also used : FragmentActivity(androidx.fragment.app.FragmentActivity)

Example 55 with FragmentActivity

use of androidx.fragment.app.FragmentActivity in project twicalico by moko256.

the class BaseListFragment method onActivityCreated.

@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    FragmentActivity activity = getActivity();
    if (activity instanceof GetViewForSnackBar) {
        viewForSnackBar = ((GetViewForSnackBar) activity).getViewForSnackBar();
    }
    if (activity instanceof HasRefreshLayoutInterface) {
        swipeRefreshLayout = ((HasRefreshLayoutInterface) activity).get();
    }
}
Also used : FragmentActivity(androidx.fragment.app.FragmentActivity)

Aggregations

FragmentActivity (androidx.fragment.app.FragmentActivity)185 Test (org.junit.Test)71 Intent (android.content.Intent)25 Bundle (android.os.Bundle)19 View (android.view.View)11 Config (org.robolectric.annotation.Config)11 TextView (android.widget.TextView)10 Before (org.junit.Before)10 BroadcastReceiver (android.content.BroadcastReceiver)8 Fragment (androidx.fragment.app.Fragment)8 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)8 Activity (android.app.Activity)7 Resources (android.content.res.Resources)7 FragmentManager (androidx.fragment.app.FragmentManager)7 IntentFilter (android.content.IntentFilter)6 UserHandle (android.os.UserHandle)6 Preference (androidx.preference.Preference)6 SwitchPreference (androidx.preference.SwitchPreference)6 RestrictedSwitchPreference (com.android.settingslib.RestrictedSwitchPreference)6 Tile (com.android.settingslib.drawer.Tile)6