From 6604be94ebd82a3b2cdcf4f78001e36946cec622 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Mon, 14 Aug 2017 18:40:46 -0500 Subject: [PATCH] ListFragment: Don't assume the ListView is the root It may share the layout with a FAB, and that requires a parent ViewGroup. Signed-off-by: Jason A. Donenfeld --- app/src/main/java/com/wireguard/android/ConfigListFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/wireguard/android/ConfigListFragment.java b/app/src/main/java/com/wireguard/android/ConfigListFragment.java index 870453d7..9dbf77d9 100644 --- a/app/src/main/java/com/wireguard/android/ConfigListFragment.java +++ b/app/src/main/java/com/wireguard/android/ConfigListFragment.java @@ -23,7 +23,7 @@ public class ConfigListFragment extends BaseConfigFragment { final ConfigListFragmentBinding binding = ConfigListFragmentBinding.inflate(inflater, parent, false); binding.setConfigs(VpnService.getInstance().getConfigs()); - final ListView listView = (ListView) binding.getRoot(); + final ListView listView = binding.getRoot().findViewById(R.id.config_list); listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(final AdapterView parent, final View view,