Android Open Source - SSPIA Main Fragment






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.mclass;
//ww w .  j a  v a  2  s  .  c  o  m
import com.fiec.ssapp.R;
import com.fiec.sspia.buff.Tag;
import com.fiec.sspia.db.Planets;
import com.fiec.sspia.main.TabsPlanets;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

public class MainFragment extends Fragment{
  
  private ImageView planetimage;
  private FragmentActivity act;
  public String pname;
  public int position;
    
  private TabsPlanets tp;
  private Planets planet;
  private String[] tags;
  
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
  }
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
      Bundle saved) {
    View view = inflater.inflate(R.layout.activity_planets, null);
    this.planetimage = (ImageView)view.findViewById(R.id.main_planetimage);  
    
    /*if(saved != null){
      Log.i(Tag._TAG, "saved no nulo");
      this.planet=saved.getParcelable("planetkey");
      this.tags = saved.getStringArray("tagskey");
      this.position = saved.getInt("poskey");
      
      Log.w(Tag._TAG,"pname no nulo "+planet.getName());
      Log.w(Tag._TAG,"pos "+position);
      Log.w(Tag._TAG,"inf "+planet.getinf()[0]);
    }*/
    
    this.planetimage.setImageResource(this.planet.getImgres());
    tp = new TabsPlanets(act, this, view, planet, position, tags);
    tp.addTabs();    
    return view;
  }
  
  /*@Override
  public void onSaveInstanceState(Bundle out) {
    out.putParcelable("planetkey", planet);
    out.putStringArray("tagskey", this.tags);
    out.putInt("poskey", position);
    super.onSaveInstanceState(out);
    tp=null;
  }*/
  
  public void setact(FragmentActivity act){
    this.act = act;
  }
  
  public void setPosition(int pos){
    this.position = pos;
  }
  
  public void setPlanet(Planets planet, String[] tags){
    this.planet = planet;
    this.tags = tags;
  }
  
  @Override
  public void onDestroyView() {
    super.onDestroyView();
    tp = null;
  }
}




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