mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-21 21:41:09 +00:00
[Android] Some various cleanups. Also make some class variables final.
Localize some variables as well, and clean up an import.
This commit is contained in:
parent
6428137ca4
commit
c633c2bb13
@ -28,14 +28,12 @@ import org.dolphinemu.dolphinemu.settings.VideoSettingsFragment;
|
|||||||
public final class AboutFragment extends Fragment
|
public final class AboutFragment extends Fragment
|
||||||
{
|
{
|
||||||
private static Activity m_activity;
|
private static Activity m_activity;
|
||||||
private ListView mMainList;
|
|
||||||
private AboutFragmentAdapter adapter;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
|
||||||
{
|
{
|
||||||
View rootView = inflater.inflate(R.layout.gamelist_listview, container, false);
|
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 yes = getString(R.string.yes);
|
||||||
String no = getString(R.string.no);
|
String no = getString(R.string.no);
|
||||||
@ -44,7 +42,7 @@ public final class AboutFragment extends Fragment
|
|||||||
Input.add(new AboutFragmentItem(getString(R.string.build_revision), NativeLibrary.GetVersionString()));
|
Input.add(new AboutFragmentItem(getString(R.string.build_revision), NativeLibrary.GetVersionString()));
|
||||||
Input.add(new AboutFragmentItem(getString(R.string.supports_gles3), VideoSettingsFragment.SupportsGLES3() ? yes : no));
|
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);
|
mMainList.setAdapter(adapter);
|
||||||
|
|
||||||
return mMainList;
|
return mMainList;
|
||||||
|
@ -11,7 +11,6 @@ import android.graphics.Color;
|
|||||||
import android.graphics.drawable.ColorDrawable;
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.util.Log;
|
|
||||||
import android.view.InputDevice;
|
import android.view.InputDevice;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
|
@ -112,7 +112,7 @@ public final class FolderBrowser extends Fragment
|
|||||||
return mDrawerList;
|
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)
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
|
||||||
{
|
{
|
||||||
@ -143,7 +143,6 @@ public final class FolderBrowser extends Fragment
|
|||||||
{
|
{
|
||||||
String Directories = NativeLibrary.GetConfig("Dolphin.ini", "General", "GCMPathes", "0");
|
String Directories = NativeLibrary.GetConfig("Dolphin.ini", "General", "GCMPathes", "0");
|
||||||
int intDirectories = Integer.parseInt(Directories);
|
int intDirectories = Integer.parseInt(Directories);
|
||||||
Directories = Integer.toString(intDirectories + 1);
|
|
||||||
|
|
||||||
// Check to see if a path set in the Dolphin config
|
// Check to see if a path set in the Dolphin config
|
||||||
// matches the one the user is trying to add. If it's
|
// matches the one the user is trying to add. If it's
|
||||||
|
@ -178,7 +178,7 @@ public final class GameListActivity extends Activity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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)
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
|
||||||
{
|
{
|
||||||
|
@ -120,7 +120,7 @@ public final class GameListFragment extends Fragment
|
|||||||
return mMainList;
|
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)
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
|
||||||
{
|
{
|
||||||
|
@ -30,11 +30,10 @@ import org.dolphinemu.dolphinemu.R;
|
|||||||
* within the input control mapping config.
|
* within the input control mapping config.
|
||||||
*/
|
*/
|
||||||
public final class InputConfigFragment extends PreferenceFragment
|
public final class InputConfigFragment extends PreferenceFragment
|
||||||
//implements PrefsActivity.OnGameConfigListener
|
|
||||||
{
|
{
|
||||||
private Activity m_activity;
|
private Activity m_activity;
|
||||||
private boolean firstEvent = true;
|
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}.
|
* Gets the descriptor for the given {@link InputDevice}.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user