summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryvesf <yvesf-git@xapek.org>2016-11-22 20:23:09 +0100
committerGitHub <noreply@github.com>2016-11-22 20:23:09 +0100
commit2dc04e8753d3ce060ef32275c6982657e5d59a02 (patch)
tree7145556a942bafb78798a9efdd82d5f25fd81a2a /src
parent899ec173be1151ac603744d5b39cd2746f66be38 (diff)
parente7181a750733cca12c674762a092da82e0958514 (diff)
downloadandiodine-2dc04e8753d3ce060ef32275c6982657e5d59a02.tar.gz
andiodine-2dc04e8753d3ce060ef32275c6982657e5d59a02.zip
Merge pull request #29 from jovial/np_fix
make findViewById more robust
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/xapek/andiodine/FragmentList.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/xapek/andiodine/FragmentList.java b/src/main/java/org/xapek/andiodine/FragmentList.java
index 10a0875..9d2bad3 100644
--- a/src/main/java/org/xapek/andiodine/FragmentList.java
+++ b/src/main/java/org/xapek/andiodine/FragmentList.java
@@ -123,7 +123,7 @@ public class FragmentList extends Fragment {
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mConfigDatabase = new ConfigDatabase(getActivity());
- mListView = (ListView) getActivity().findViewById(R.id.list_view);
+ mListView = (ListView) getView().findViewById(R.id.list_view);
mAdapter = new IodineConfigurationAdapter();
mListView.setAdapter(mAdapter);
@@ -134,6 +134,7 @@ public class FragmentList extends Fragment {
setHasOptionsMenu(true); //activate onCreateOptionsMenu
}
+
@Override
public void onDestroy() {
getActivity().unregisterReceiver(broadcastReceiverConfigurationChanged);