Example usage for android.app Activity toString

List of usage examples for android.app Activity toString

Introduction

In this page you can find the example usage for android.app Activity toString.

Prototype

@Override
    public String toString() 

Source Link

Usage

From source file:com.google.android.apps.mytracks.fragments.ConfirmDeleteDialogFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {//from ww w .  jav  a  2 s.  c o m
        caller = (ConfirmDeleteCaller) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(
                activity.toString() + " must implement " + ConfirmDeleteCaller.class.getSimpleName());
    }
}

From source file:com.google.android.apps.mytracks.fragments.FileTypeDialogFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {//from   w  w  w.  jav a  2s.  c o  m
        caller = (FileTypeCaller) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(
                activity.toString() + " must implement " + FileTypeCaller.class.getSimpleName());
    }
}

From source file:org.jorge.lolin1.ui.frags.ChatOverviewSupportFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);

    try {/*from  ww  w.  j  a  va2  s.  com*/
        mCallback = (ChatRoomSelectionListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement ChatRoomSelectionListener");
    }

    listAdapter = new ChatFilterableListAdapter(activity);

    ((ChatOverviewActivity) activity).onSectionAttached(new ArrayList<>(Arrays
            .asList(LoLin1Utils.getStringArray(getActivity(), "navigation_drawer_items", new String[] { "" })))
                    .indexOf(LoLin1Utils.getString(getActivity(), "title_section5", null)));
}

From source file:com.secretparty.app.BuzzDialog.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {/*  w  ww .  j  av a2 s  .c o  m*/
        mCallback = (FragmentEvent.BuzzListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement ThematicManager");
    }
}

From source file:com.cuddlesoft.nori.fragment.AddTagFilterDialogFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {//from   w w w .j a  va 2  s .  co m
        listener = (AddTagListener) getActivity();
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + "must implement OnFragmentInteractionListener");
    }
}

From source file:com.deliciousdroid.fragment.MainFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {//from w  ww . j av  a  2  s.c  o m
        mainActionListener = (OnMainActionListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnMainActionListener");
    }
}

From source file:com.christophergs.mbientbasic.ModuleFragmentBase.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    Activity owner = getActivity();
    if (!(owner instanceof FragmentBus)) {
        throw new ClassCastException(String.format(Locale.US, "%s %s", owner.toString(),
                owner.getString(R.string.error_fragment_bus)));
    }//  www. j  av  a 2  s .  c  om

    fragBus = (FragmentBus) owner;
    owner.getApplicationContext().bindService(new Intent(owner, MetaWearBleService.class), this,
            Context.BIND_AUTO_CREATE);
}

From source file:com.secretparty.app.PartyDetailsDialog.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {/*from www.  ja va 2 s .  c o  m*/
        mCallback = (FragmentEvent.PartySelectedListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement ThematicManager");
    }
}

From source file:br.com.bioscada.apps.biotracks.fragments.DeleteMarkerDialogFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {/*from  w w  w.  j  a v a2 s .co  m*/
        caller = (DeleteMarkerCaller) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(
                activity.toString() + " must implement " + DeleteMarkerCaller.class.getSimpleName());
    }
}

From source file:com.morlunk.mumbleclient.channel.ChannelEditFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);

    try {/*ww w .j av a2  s  .  co  m*/
        mServiceProvider = (JumbleServiceProvider) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement JumbleServiceProvider");
    }
}