Android Open Source - SSPIA Main Grid Adapter Class






From Project

Back to project page SSPIA.

License

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;
/*ww w  .  java2s .co  m*/
import com.fiec.ssapp.R;

import android.content.Context;
import android.support.v4.app.FragmentActivity;
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 MainGridAdapterClass extends BaseAdapter{
  private String[] satellites;
  private int[] images;
  private LayoutInflater inflater;
  
  public MainGridAdapterClass(FragmentActivity context, String[]sname, int[] simage){
    super();
    this.satellites = sname;
    this.images = simage;
    this.inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  }  
  
  @Override
  public int getCount() {
    return satellites.length;
  }

  @Override
  public Object getItem(int pos) {    
    return null;
  }

  @Override
  public long getItemId(int pos) {
    return 0;
  }

  @Override
  public View getView(int pos, View inflate, ViewGroup parent) {
    View vinflate = inflate;
    TextView satname;
    ImageView img;
    vinflate = inflater.inflate(R.layout.satellite_item, null);
    satname = (TextView) vinflate.findViewById(R.id.satellitename);
    satname.setText(satellites[pos]);
    img = (ImageView) vinflate.findViewById(R.id.satelliteimage);
    img.setImageResource(images[pos]);
    img.setScaleType(ImageView.ScaleType.CENTER_CROP);    
    return vinflate;
  }
}




Java Source Code List

com.fiec.sspia.buff.DefaultNoti.java
com.fiec.sspia.buff.PlanetClass.java
com.fiec.sspia.buff.PlanetSource.java
com.fiec.sspia.buff.Tag.java
com.fiec.sspia.db.Celestial.java
com.fiec.sspia.db.DBHelper.java
com.fiec.sspia.db.DbAuxClass.java
com.fiec.sspia.db.Planets.java
com.fiec.sspia.db.Satellites.java
com.fiec.sspia.db.SolarDb.java
com.fiec.sspia.main.InformationTab.java
com.fiec.sspia.main.SatellitesClass.java
com.fiec.sspia.main.SolarActivity.java
com.fiec.sspia.main.TabsPlanets.java
com.fiec.sspia.mclass.MainClass.java
com.fiec.sspia.mclass.MainFragment.java
com.fiec.sspia.mclass.SSNotific.java
com.fiec.sspia.mclass.SetttingsClass.java
com.fiec.sspia.mclass.SplashClass.java
com.fiec.sspia.system.BroadcastRec.java
com.fiec.sspia.system.SspiaService.java
com.fiec.sspia.system.StartingNotis.java
com.fiec.sspia.util.AbstrCd.java
com.fiec.sspia.util.CdClass.java
com.fiec.sspia.util.CustomInfoAdapter.java
com.fiec.sspia.util.CustomMenuAdapter.java
com.fiec.sspia.util.FillMenuAdapter.java
com.fiec.sspia.util.JSONParser.java
com.fiec.sspia.util.MainGridAdapterClass.java
com.fiec.sspia.util.MenuSettings.java
com.fiec.sspia.util.SSInterfaceNoti.java
com.fiec.sspia.util.SatelliteGridAdapterClass.java
com.fiec.sspia.util.TempClass.java
com.fiec.sspia.util.TransitionClass.java