How can I get the context in a fragment?
I need to use my database whose constructor takes in the context, but getApplicationContext() and Fragmen
getApplicationContext()
Fragmen
You can call getActivity() or,
getActivity()
public void onAttach(Context context) { super.onAttach(context); this.activity = (CashActivity) context; this.money = this.activity.money; }