summaryrefslogtreecommitdiff
path: root/Source/Android
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2013-11-16 04:09:30 -0500
committerLioncash <mathew1800@gmail.com>2013-11-16 04:09:30 -0500
commitc8ddc70c973a86053c663efb3b63092ea3aeb8b0 (patch)
tree9b02de50e926835988e7588fc6008a34d4bac2d2 /Source/Android
parent94f8c68a35b6b29e6670092ebc78e0dcd206463e (diff)
[Android] Simplify the AboutFragment view inflating. Considering the backing layout is a direct ListView, the original rootView can just be casted to a ListView, no need for an intermediate.
Diffstat (limited to 'Source/Android')
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/AboutFragment.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/AboutFragment.java b/Source/Android/src/org/dolphinemu/dolphinemu/AboutFragment.java
index c2adb2a702..defefcc0d4 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/AboutFragment.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/AboutFragment.java
@@ -29,8 +29,7 @@ public final class AboutFragment extends ListFragment
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
- View rootView = inflater.inflate(R.layout.gamelist_listview, container, false);
- ListView mMainList = (ListView) rootView.findViewById(R.id.gamelist);
+ ListView rootView = (ListView) inflater.inflate(R.layout.gamelist_listview, container, false);
final String yes = getString(R.string.yes);
final String no = getString(R.string.no);
@@ -41,10 +40,10 @@ public final class AboutFragment extends ListFragment
Input.add(new AboutFragmentItem(getString(R.string.supports_neon), NativeLibrary.SupportsNEON() ? yes : no));
AboutFragmentAdapter adapter = new AboutFragmentAdapter(getActivity(), R.layout.about_layout, Input);
- mMainList.setAdapter(adapter);
- mMainList.setEnabled(false); // Makes the list view non-clickable.
+ rootView.setAdapter(adapter);
+ rootView.setEnabled(false); // Makes the list view non-clickable.
- return mMainList;
+ return rootView;
}
// Represents an item in the AboutFragment.