Android Open Source - SSPIA Fill 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;
/*w w  w  .j a va  2s . c  o m*/
import java.util.ArrayList;
import java.util.List;

import android.content.Context;

import com.fiec.sspia.buff.PlanetClass;
import com.fiec.sspia.db.Planets;

public class FillMenuAdapter {
  private Context context;
  private CustomMenuAdapter adapter;
  private List<PlanetClass> listmenu;
  private int cont, i;
  private Planets[] planets;
  public FillMenuAdapter(Context context, Planets[] planets){
    this.context = context;
    this.planets = planets;
    this.listmenu = new ArrayList<PlanetClass>();
  public CustomMenuAdapter getItemAdapter(){
    int length = this.planets.length;
    if(length >= 1){
      cont = 0;
      for(i=0; i<length; i++){
        listmenu.add(new PlanetClass(){
            _p0 = planets[cont].getName();
            _img0 = planets[cont].getImgres();
    adapter = new CustomMenuAdapter(context, listmenu);
    return adapter;

Java Source Code List