Correct context to use in RecyclerView adapter
问题 Which context should I be using when I use a SharedPreference within a RecyclerView adapter? This is confusing as when during the default one, context in val mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(context) appears as an unresolved reference. class MyRVAdapter(private val myString: ArrayList<String>): RecyclerView.Adapter<MyRVAdapter.MyViewHolder>() { private val typeA = 1 private val typeB = 2 override fun onCreateViewHolder(parent: ViewGroup, type: Int):