List of usage examples for android.support.v4.app Fragment getActivity
public Activity getActivity()
From source file:org.alfresco.mobile.android.ui.person.PeopleAdapter.java
public PeopleAdapter(Fragment fr, int textViewResourceId, List<Person> listItems) { super(fr.getActivity(), textViewResourceId, listItems); this.activityRef = new WeakReference<FragmentActivity>(fr.getActivity()); this.vhClassName = TwoLinesViewHolder.class.getCanonicalName(); }
From source file:com.xargsgrep.portknocker.adapter.HostArrayAdapter.java
public HostArrayAdapter(Fragment fragment, List<Host> hosts) { super(fragment.getActivity(), -1, hosts); databaseManager = new DatabaseManager(fragment.getActivity()); this.fragment = fragment; this.hosts = hosts; }
From source file:com.normalexception.app.rx8club.view.category.CategoryViewArrayAdapter.java
/** * A custom adapter that handles Category View objects * @param context The source context * @param textViewResourceId The resource ID * @param objects The objects in the list *//*from w ww .j av a2 s . c o m*/ public CategoryViewArrayAdapter(Fragment context, int textViewResourceId, List<CategoryModel> objects) { super(context.getActivity(), textViewResourceId, objects); data = objects; }
From source file:com.blandware.android.atleap.loader.LoaderManagerCreator.java
/** * Init Loader Manager for fragment//w w w.j a v a 2 s . c o m * @param fragment fragment * @param callbacks callbacks * @param args arguments for loader construction * @param <T> */ public <T> LoaderManagerCreator(Fragment fragment, LoaderManager.LoaderCallbacks<T> callbacks, Bundle args) { this(fragment.getActivity().getApplicationContext(), fragment.getLoaderManager(), (int) HashUtil.longHash(((Object) fragment).getClass(), fragment.getArguments(), callbacks), callbacks, args); }
From source file:com.normalexception.app.rx8club.view.thread.ThreadViewArrayAdapter.java
public ThreadViewArrayAdapter(Fragment context, int textViewResourceId, List<ThreadModel> objects) { super(context.getActivity(), textViewResourceId, objects); data = objects;// w w w . j av a 2 s .c o m }
From source file:com.normalexception.app.rx8club.view.pmpost.PMPostViewArrayAdapter.java
/** * Custom adapter to handle PMItemView's * @param context The source context * @param textViewResourceId The resource id * @param objects The list of objects *///from ww w . j a v a 2 s. c om public PMPostViewArrayAdapter(Fragment context, int textViewResourceId, List<PMPostModel> objects) { super(context.getActivity(), textViewResourceId, objects); data = objects; }
From source file:info.rynkowski.hamsterclient.ui.view.Navigator.java
/** * Goes to a {@link FactFormActivity} to allow modification an existing fact. * * @param fragment A {@link Fragment} that opens the {@link FactFormActivity}. */// ww w. j av a 2 s .co m public void navigateToFactEditionForm(@NonNull Fragment fragment, @NonNull UiFact fact) { Intent intentToLaunch = FactFormActivity.getCallingIntent(fragment.getActivity()); intentToLaunch.putExtra(FactFormActivity.INPUT_EXTRAS_KEY_FACT, fact); fragment.startActivityForResult(intentToLaunch, FactFormActivity.REQUEST_CODE_EDIT_FACT); }
From source file:com.ewintory.alexandria.ui.adapter.BooksAdapter.java
public BooksAdapter(Fragment fragment) { super(fragment.getActivity()); mFragment = fragment; setHasStableIds(true); }
From source file:com.albedinsky.android.ui.transition.NavigationalTransitionCompat.java
/** * Invoked whenever {@link #finish(Fragment)} is called. * <p>// w w w . ja v a 2s. co m * Default implementation invokes {@link #onFinish(Activity)} with a host activity of the given * caller fragment. * * @param caller The fragment that requested finish of its host activity via this navigational transition. * @see #onStart(Fragment) */ protected void onFinish(@NonNull Fragment caller) { onFinish(caller.getActivity()); }
From source file:com.github.pockethub.android.ui.FragmentStatePagerAdapter.java
/** * @param fragment/*from ww w. j av a 2 s . c o m*/ */ public FragmentStatePagerAdapter(final Fragment fragment) { super(fragment.getChildFragmentManager()); this.activity = (AppCompatActivity) fragment.getActivity(); }