Android Open Source - APO-Theta-Upsilon-App Image Adapter

From Project

Back to project page APO-Theta-Upsilon-App.


The source code is released under:

GNU Lesser General Public License

If you think the Android project APO-Theta-Upsilon-App listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

 * Copyright 2011 Devin Schwab, Umang Banugaria
 *//from ww w .ja  v a 2s .  c  o m
 * This file is part of the APO Theta Upsilon App for Case Western Reserve University's Alpha Phi Omega Theta Upsilon Chapter.
 * The APO Theta Upsilon program is free software: you can redistribute it and/or modify
 * it under the terms of the Lesser GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * Lesser GNU General Public License for more details.
 * You should have received a copy of the Lesser GNU General Public License
 * along with this program.  If not, see <>.

package edu.cwru.apo;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.GridView;
import android.widget.ImageView;

public class ImageAdapter extends BaseAdapter {
  private Context mContext;
  public ImageAdapter(Context c) {
    mContext = c;

  public int getCount() {
    return mThumbIds.length;

  public Object getItem(int position) {
    // TODO Auto-generated method stub
    return null;

  public long getItemId(int position) {
    // TODO Auto-generated method stub
    return 0;

  public View getView(int position, View convertView, ViewGroup parent) {
    // TODO Auto-generated method stub
    ImageView imageView;
    if(convertView == null) {
      imageView = new ImageView(mContext);
      imageView.setLayoutParams(new GridView.LayoutParams(85,85));
    else {
      imageView = (ImageView) convertView;
    return imageView;
  // contains the images that will represent each button
  private Integer[] mThumbIds = {,


Java Source Code List