X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fadapters%2FRequestsArrayAdapter.kt;h=965158d7d4dab41d09fc3d5d502981f6ef7abaa6;hb=0019f066a3b42f018e8042089b81f0f89e43e91e;hp=f79ab07ac5295c59815e6ab30035949af9bf9dac;hpb=5186b668274b09e37b371c0a134e53255c98ad98;p=PrivacyBrowserAndroid.git diff --git a/app/src/main/java/com/stoutner/privacybrowser/adapters/RequestsArrayAdapter.kt b/app/src/main/java/com/stoutner/privacybrowser/adapters/RequestsArrayAdapter.kt index f79ab07a..965158d7 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/adapters/RequestsArrayAdapter.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/adapters/RequestsArrayAdapter.kt @@ -28,7 +28,10 @@ import android.widget.LinearLayout 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>) : ArrayAdapter>(context, 0, resourceRequestsList) { @@ -54,7 +57,7 @@ class RequestsArrayAdapter(context: Context, resourceRequestsList: List { + REQUEST_DEFAULT -> { // Set the disposition text. dispositionTextView.text = context.resources.getString(R.string.request_allowed, id) @@ -62,15 +65,15 @@ class RequestsArrayAdapter(context: Context, resourceRequestsList: List { + 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) @@ -78,7 +81,7 @@ class RequestsArrayAdapter(context: Context, resourceRequestsList: List { + REQUEST_BLOCKED -> { // Set the disposition text. dispositionTextView.text = context.resources.getString(R.string.request_blocked, id)