Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Android] Make the AboutFragment extend the ListFragment, since this …
…is basically what this fragment acts as. Much more descriptive than simply extending Fragment.

Also made the list non-clickable, since it isn't supposed to be interacted with.
  • Loading branch information
lioncash committed Sep 17, 2013
1 parent 38c7d38 commit b4883e2
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -7,7 +7,7 @@
package org.dolphinemu.dolphinemu;

import android.app.Activity;
import android.app.Fragment;
import android.app.ListFragment;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
Expand All @@ -25,7 +25,7 @@
/**
* Represents the about screen.
*/
public final class AboutFragment extends Fragment
public final class AboutFragment extends ListFragment
{
private static Activity m_activity;

Expand All @@ -44,6 +44,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa

AboutFragmentAdapter adapter = new AboutFragmentAdapter(m_activity, R.layout.about_layout, Input);
mMainList.setAdapter(adapter);
mMainList.setEnabled(false); // Makes the list view non-clickable.

return mMainList;
}
Expand Down Expand Up @@ -108,7 +109,7 @@ public View getView(int position, View convertView, ViewGroup parent)
View v = convertView;
if (v == null)
{
LayoutInflater vi = (LayoutInflater)ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
LayoutInflater vi = (LayoutInflater) ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate(id, parent, false);
}

Expand Down

0 comments on commit b4883e2

Please sign in to comment.