Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Android] Some various cleanups. Also make some class variables final.
Localize some variables as well, and clean up an import.
  • Loading branch information
lioncash committed Aug 30, 2013
1 parent 6428137 commit c633c2b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 11 deletions.
Expand Up @@ -28,14 +28,12 @@
public final class AboutFragment extends Fragment
{
private static Activity m_activity;
private ListView mMainList;
private AboutFragmentAdapter adapter;

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
View rootView = inflater.inflate(R.layout.gamelist_listview, container, false);
mMainList = (ListView) rootView.findViewById(R.id.gamelist);
ListView mMainList = (ListView) rootView.findViewById(R.id.gamelist);

String yes = getString(R.string.yes);
String no = getString(R.string.no);
Expand All @@ -44,7 +42,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
Input.add(new AboutFragmentItem(getString(R.string.build_revision), NativeLibrary.GetVersionString()));
Input.add(new AboutFragmentItem(getString(R.string.supports_gles3), VideoSettingsFragment.SupportsGLES3() ? yes : no));

adapter = new AboutFragmentAdapter(m_activity, R.layout.about_layout, Input);
AboutFragmentAdapter adapter = new AboutFragmentAdapter(m_activity, R.layout.about_layout, Input);
mMainList.setAdapter(adapter);

return mMainList;
Expand Down
Expand Up @@ -11,7 +11,6 @@
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.InputDevice;
import android.view.KeyEvent;
import android.view.Menu;
Expand Down
Expand Up @@ -112,7 +112,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
return mDrawerList;
}

private AdapterView.OnItemClickListener mMenuItemClickListener = new AdapterView.OnItemClickListener()
private final AdapterView.OnItemClickListener mMenuItemClickListener = new AdapterView.OnItemClickListener()
{
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
Expand Down Expand Up @@ -143,7 +143,6 @@ private void FolderSelected()
{
String Directories = NativeLibrary.GetConfig("Dolphin.ini", "General", "GCMPathes", "0");
int intDirectories = Integer.parseInt(Directories);
Directories = Integer.toString(intDirectories + 1);

// Check to see if a path set in the Dolphin config
// matches the one the user is trying to add. If it's
Expand Down
Expand Up @@ -178,7 +178,7 @@ public void SwitchPage(int toPage)
}
}

private AdapterView.OnItemClickListener mMenuItemClickListener = new AdapterView.OnItemClickListener()
private final AdapterView.OnItemClickListener mMenuItemClickListener = new AdapterView.OnItemClickListener()
{
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
Expand Down
Expand Up @@ -120,7 +120,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
return mMainList;
}

private AdapterView.OnItemClickListener mGameItemClickListener = new AdapterView.OnItemClickListener()
private final AdapterView.OnItemClickListener mGameItemClickListener = new AdapterView.OnItemClickListener()
{
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
Expand Down
Expand Up @@ -30,11 +30,10 @@
* within the input control mapping config.
*/
public final class InputConfigFragment extends PreferenceFragment
//implements PrefsActivity.OnGameConfigListener
{
private Activity m_activity;
private boolean firstEvent = true;
private static ArrayList<Float> m_values = new ArrayList<Float>();
private static final ArrayList<Float> m_values = new ArrayList<Float>();

/**
* Gets the descriptor for the given {@link InputDevice}.
Expand Down

0 comments on commit c633c2b

Please sign in to comment.