import android.widget.TextView
import com.stoutner.privacybrowser.R
-import com.stoutner.privacybrowser.helpers.BlocklistHelper
+import com.stoutner.privacybrowser.helpers.REQUEST_ALLOWED
+import com.stoutner.privacybrowser.helpers.REQUEST_BLOCKED
+import com.stoutner.privacybrowser.helpers.REQUEST_DEFAULT
+import com.stoutner.privacybrowser.helpers.REQUEST_THIRD_PARTY
// `0` is the `textViewResourceId`, which is unused in this implementation.
class RequestsArrayAdapter(context: Context, resourceRequestsList: List<Array<String>>) : ArrayAdapter<Array<String>>(context, 0, resourceRequestsList) {
// Set the action text and the background color.
when (entryStringArray[0]) {
- BlocklistHelper.REQUEST_DEFAULT -> {
+ REQUEST_DEFAULT -> {
// Set the disposition text.
dispositionTextView.text = context.resources.getString(R.string.request_allowed, id)
linearLayout.setBackgroundColor(context.getColor(R.color.transparent))
}
- BlocklistHelper.REQUEST_ALLOWED -> {
+ REQUEST_ALLOWED -> {
// Set the disposition text.
dispositionTextView.text = context.resources.getString(R.string.request_allowed, id)
// Set the background color.
- linearLayout.setBackgroundColor(context.getColor(R.color.blue_background))
+ linearLayout.setBackgroundColor(context.getColor(R.color.requests_blue_background))
}
- BlocklistHelper.REQUEST_THIRD_PARTY -> {
+ REQUEST_THIRD_PARTY -> {
// Set the disposition text.
dispositionTextView.text = context.resources.getString(R.string.request_blocked, id)
linearLayout.setBackgroundColor(context.getColor(R.color.yellow_background))
}
- BlocklistHelper.REQUEST_BLOCKED -> {
+ REQUEST_BLOCKED -> {
// Set the disposition text.
dispositionTextView.text = context.resources.getString(R.string.request_blocked, id)