summaryrefslogtreecommitdiff
path: root/Source/Android/src
diff options
context:
space:
mode:
authorlioncash <mathew1900@hotmail.com>2013-07-18 09:00:20 -0400
committerlioncash <mathew1900@hotmail.com>2013-07-18 09:00:20 -0400
commit2e92e3814e6590a3dc2a96fb37759b7eaa5df217 (patch)
treea534c14ea4d821e6d5d31fe850a7273c77e25a8b /Source/Android/src
parenta3e289e802be341cd69b3abf787e19d3e28ab5de (diff)
[Android] Tiny cleanup regarding method indentation in GameListAdapter.
getItem() and getView were a little off-kilter with the rest of the class. Keeps things more consistent, etc.
Diffstat (limited to 'Source/Android/src')
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/GameListAdapter.java80
1 files changed, 39 insertions, 41 deletions
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/GameListAdapter.java b/Source/Android/src/org/dolphinemu/dolphinemu/GameListAdapter.java
index a970db2f2a..986f33555b 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/GameListAdapter.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/GameListAdapter.java
@@ -12,46 +12,44 @@ import java.util.List;
public class GameListAdapter extends ArrayAdapter<GameListItem>{
- private Context c;
- private int id;
- private List<GameListItem>items;
-
- public GameListAdapter(Context context, int textViewResourceId,
- List<GameListItem> objects) {
- super(context, textViewResourceId, objects);
- c = context;
- id = textViewResourceId;
- items = objects;
- }
- public GameListItem getItem(int i)
- {
- return items.get(i);
- }
- @Override
- public View getView(int position, View convertView, ViewGroup parent) {
- View v = convertView;
- if (v == null) {
- LayoutInflater vi = (LayoutInflater)c.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- v = vi.inflate(id, null);
- }
- final GameListItem o = items.get(position);
- if (o != null) {
- TextView t1 = (TextView) v.findViewById(R.id.GameItemTitle);
- TextView t2 = (TextView) v.findViewById(R.id.GameItemSubText);
- ImageView v1 = (ImageView) v.findViewById(R.id.GameItemIcon);
-
- if(t1!=null)
- t1.setText(o.getName());
- if(t2!=null)
- t2.setText(o.getData());
- if(v1!=null)
- v1.setImageBitmap(o.getImage());
-
- }
- return v;
- }
-
-
-
+ private Context c;
+ private int id;
+ private List<GameListItem>items;
+
+ public GameListAdapter(Context context, int textViewResourceId, List<GameListItem> objects) {
+ super(context, textViewResourceId, objects);
+ c = context;
+ id = textViewResourceId;
+ items = objects;
+ }
+
+ public GameListItem getItem(int i)
+ {
+ return items.get(i);
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ View v = convertView;
+ if (v == null) {
+ LayoutInflater vi = (LayoutInflater)c.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+ v = vi.inflate(id, null);
+ }
+
+ final GameListItem o = items.get(position);
+ if (o != null) {
+ TextView t1 = (TextView) v.findViewById(R.id.GameItemTitle);
+ TextView t2 = (TextView) v.findViewById(R.id.GameItemSubText);
+ ImageView v1 = (ImageView) v.findViewById(R.id.GameItemIcon);
+
+ if(t1!=null)
+ t1.setText(o.getName());
+ if(t2!=null)
+ t2.setText(o.getData());
+ if(v1!=null)
+ v1.setImageBitmap(o.getImage());
+ }
+ return v;
+ }
}