fix: focusable

This commit is contained in:
arrase 2016-12-06 00:52:24 +01:00
parent 4f7271b76e
commit f3af9daa55
2 changed files with 4 additions and 1 deletions

View File

@ -38,6 +38,7 @@ public class OnionListAdapter extends CursorAdapter {
name.setText(cursor.getString(cursor.getColumnIndex(HSContentProvider.HiddenService.NAME))); name.setText(cursor.getString(cursor.getColumnIndex(HSContentProvider.HiddenService.NAME)));
TextView domain = (TextView) view.findViewById(R.id.hs_onion); TextView domain = (TextView) view.findViewById(R.id.hs_onion);
domain.setText(cursor.getString(cursor.getColumnIndex(HSContentProvider.HiddenService.DOMAIN))); domain.setText(cursor.getString(cursor.getColumnIndex(HSContentProvider.HiddenService.DOMAIN)));
Switch enabled = (Switch) view.findViewById(R.id.hs_switch); Switch enabled = (Switch) view.findViewById(R.id.hs_switch);
enabled.setChecked( enabled.setChecked(
cursor.getInt(cursor.getColumnIndex(HSContentProvider.HiddenService.ENABLED)) == 1 cursor.getInt(cursor.getColumnIndex(HSContentProvider.HiddenService.ENABLED)) == 1

View File

@ -49,7 +49,9 @@
<Switch <Switch
android:id="@+id/hs_switch" android:id="@+id/hs_switch"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" /> android:layout_height="wrap_content"
android:focusable="false"
android:focusableInTouchMode="false" />
</LinearLayout> </LinearLayout>