diff --git a/src/main/res/layout/layout_apps.xml b/src/main/res/layout/layout_apps.xml
index 5d41fd7e..25a98750 100644
--- a/src/main/res/layout/layout_apps.xml
+++ b/src/main/res/layout/layout_apps.xml
@@ -9,8 +9,8 @@
@@ -41,7 +41,7 @@
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
- android:padding="3dp"
+ android:padding="4dp"
android:gravity="center_vertical"
android:textSize="18sp"
android:text="@string/bypass_apps"/>
diff --git a/src/main/res/layout/layout_apps_item.xml b/src/main/res/layout/layout_apps_item.xml
index 5a97f2cc..69f14991 100644
--- a/src/main/res/layout/layout_apps_item.xml
+++ b/src/main/res/layout/layout_apps_item.xml
@@ -1,34 +1,34 @@
-
-
-
+ android:background="?android:attr/selectableItemBackground">
+ android:paddingLeft="8dp"
+ android:paddingRight="8dp"
+ android:paddingTop="2dp"
+ android:paddingBottom="2dp"/>
+ android:ellipsize="end"
+ android:textSize="18sp"/>
-
-
+
diff --git a/src/main/scala/com/github/shadowsocks/AppManager.scala b/src/main/scala/com/github/shadowsocks/AppManager.scala
index af617847..3d5da43d 100644
--- a/src/main/scala/com/github/shadowsocks/AppManager.scala
+++ b/src/main/scala/com/github/shadowsocks/AppManager.scala
@@ -156,8 +156,7 @@ class AppManager extends AppCompatActivity with OnCheckedChangeListener with OnC
val switch = convertView.findViewById(R.id.itemcheck).asInstanceOf[Switch]
val text = convertView.findViewById(R.id.itemtext).asInstanceOf[TextView]
entry = new ListEntry(switch, text, icon)
- entry.text.setOnClickListener(AppManager.this)
- entry.text.setOnClickListener(AppManager.this)
+ convertView.setOnClickListener(AppManager.this)
convertView.setTag(entry)
entry.switch.setOnCheckedChangeListener(AppManager.this)
} else {
@@ -187,7 +186,7 @@ class AppManager extends AppCompatActivity with OnCheckedChangeListener with OnC
}
def onClick(v: View) {
- val switch = v.getTag.asInstanceOf[Switch]
+ val switch = v.getTag.asInstanceOf[ListEntry].switch
val app: ProxiedApp = switch.getTag.asInstanceOf[ProxiedApp]
if (app != null) {
app.proxied = !app.proxied