Android Open Source - SSPIA Custom Menu Adapter

From Project

Back to project page SSPIA.


The source code is released under:

MIT License

If you think the Android project SSPIA 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

package com.fiec.sspia.util;
//  www .  ja va2  s  .  co m
import java.util.List;

import com.fiec.ssapp.R;
import com.fiec.sspia.buff.PlanetClass;

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

public class CustomMenuAdapter extends BaseAdapter{

  private LayoutInflater inflater;
  private List<PlanetClass> list;
  public CustomMenuAdapter(Context context, List<PlanetClass> list) {
    this.list = list;
    inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

  public int getCount() {
    return list.size();

  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) {
    PlanetClass planet = list.get(position);
    View inflate = convertView;
    TextView text;
    ImageView image;
    inflate = inflater.inflate(R.layout.menu_lists, null);
    text = (TextView)inflate.findViewById(;
    image = (ImageView)inflate.findViewById(;
    return inflate;


Java Source Code List