From 2e92e3814e6590a3dc2a96fb37759b7eaa5df217 Mon Sep 17 00:00:00 2001 From: lioncash Date: Thu, 18 Jul 2013 09:00:20 -0400 Subject: [PATCH] [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. --- .../dolphinemu/GameListAdapter.java | 74 +++++++++---------- 1 file changed, 36 insertions(+), 38 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{ - private Context c; - private int id; - private Listitems; - - public GameListAdapter(Context context, int textViewResourceId, - List 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 Listitems; + public GameListAdapter(Context context, int textViewResourceId, List 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; + } }