[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.
This commit is contained in:
lioncash 2013-07-18 09:00:20 -04:00
parent a3e289e802
commit 2e92e3814e
1 changed files with 36 additions and 38 deletions

View File

@ -16,17 +16,18 @@ public class GameListAdapter extends ArrayAdapter<GameListItem>{
private int id;
private List<GameListItem>items;
public GameListAdapter(Context context, int textViewResourceId,
List<GameListItem> objects) {
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;
@ -34,6 +35,7 @@ public class GameListAdapter extends ArrayAdapter<GameListItem>{
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);
@ -46,12 +48,8 @@ public class GameListAdapter extends ArrayAdapter<GameListItem>{
t2.setText(o.getData());
if(v1!=null)
v1.setImageBitmap(o.getImage());
}
return v;
}
}