From 40645dea238548d0a5eaaccb36a764382796c98a Mon Sep 17 00:00:00 2001 From: Schoumi Date: Wed, 13 Sep 2017 11:33:50 +0200 Subject: [PATCH] Fix Bug ("No Such Method") in older android version --- .../main/java/fr/mobdev/lpcprog/fragment/ServersFragment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/fr/mobdev/lpcprog/fragment/ServersFragment.java b/app/src/main/java/fr/mobdev/lpcprog/fragment/ServersFragment.java index 8a35e62..a61e04a 100644 --- a/app/src/main/java/fr/mobdev/lpcprog/fragment/ServersFragment.java +++ b/app/src/main/java/fr/mobdev/lpcprog/fragment/ServersFragment.java @@ -93,8 +93,8 @@ public class ServersFragment extends Fragment { if (v == null) v = getView(); if(v!=null) { - RecyclerView serverList = (RecyclerView) v.findViewById(R.id.servers_list); - serverList.setLayoutManager(new LinearLayoutManager(getContext())); + RecyclerView serverList = v.findViewById(R.id.servers_list); + serverList.setLayoutManager(new LinearLayoutManager(getActivity())); serverList.setAdapter(adapter); } }