[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [orbot/master] enable focus highlighting for non touch screens
commit 1113f18c2f0bc274a60c122c3f824a52c10194a7
Author: n8fr8 <nathan@xxxxxxxxxxxxxxxxxxxx>
Date: Fri Jul 9 11:39:54 2021 -0400
enable focus highlighting for non touch screens
---
.../org/torproject/android/ui/AppManagerActivity.java | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/app/src/main/java/org/torproject/android/ui/AppManagerActivity.java b/app/src/main/java/org/torproject/android/ui/AppManagerActivity.java
index 9ad0a09f..6cb0e032 100644
--- a/app/src/main/java/org/torproject/android/ui/AppManagerActivity.java
+++ b/app/src/main/java/org/torproject/android/ui/AppManagerActivity.java
@@ -174,6 +174,22 @@ public class AppManagerActivity extends AppCompatActivity implements OnClickList
}
}
+ convertView.setFocusable(true);
+ convertView.setFocusableInTouchMode(true);
+
+ convertView.setOnFocusChangeListener(new View.OnFocusChangeListener() {
+ @Override
+ public void onFocusChange(View v, boolean hasFocus) {
+
+ if (hasFocus)
+ v.setBackgroundColor(getResources().getColor(R.color.dark_purple));
+ else
+ {
+ v.setBackgroundColor(getResources().getColor(android.R.color.transparent));
+ }
+ }
+ });
+
return convertView;
}
};
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits