Android Open Source - SSPIA Abstr Cd






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;
//from  www.j a v a2  s  .  c o  m
import com.fiec.ssapp.R;

import android.R.color;
import android.app.Dialog;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.util.DisplayMetrics;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

public abstract class AbstrCd{
  protected FragmentActivity context;
  protected int _WIDTH;
  protected int _HEIGHT;
  protected final static String[] _KEYS = {"titles","images","details"}; 
  private final String[] _TAG = {"Max. Temperature","Min. Temperature", "Ice Cover","Surface"}; 
  
  protected Dialog dialog; 
  
  protected DisplayMetrics metr;
  protected WindowManager.LayoutParams params;
  
  protected ImageView close;
  protected TextView sattitle;
  protected ListView listinfo;
  protected TextView satinfo;
  protected ImageView satimage;
  private View content;

  public AbstrCd(FragmentActivity context, View content) {
    this.context = context;
    this.content = content;    
    
    this.metr =  new DisplayMetrics();
    context.getWindowManager().getDefaultDisplay().getMetrics(metr);
    this.params = context.getWindow().getAttributes();
    
    this.dialog = new Dialog(context);
  }
  
  public void setDialogContent(boolean cancel, boolean cancelout){
    this.close = (ImageView)content.findViewById(R.id.cmoon_close);
    this.sattitle = (TextView)content.findViewById(R.id.cmoon_title);
    this.satinfo =  (TextView)content.findViewById(R.id.cmoon_discovered);
    this.satimage = (ImageView)content.findViewById(R.id.cmoon_image);
    this.listinfo = (ListView)content.findViewById(R.id.cmon_listinfo);
    dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
    dialog.getWindow().setBackgroundDrawable(new ColorDrawable(color.transparent));
    dialog.setCancelable(cancel);
    dialog.setCanceledOnTouchOutside(cancelout);
    dialog.setContentView(content);
  }
  
  public void setDefaultDialog(Bundle bundle, String[] info, int pos, int realpos){  
    String[] res ={bundle.getStringArray(_KEYS[2])[0], bundle.getStringArray(_KEYS[2])[2],
        bundle.getStringArray(_KEYS[2])[3], bundle.getStringArray(_KEYS[2])[4]};
    sattitle.setText(bundle.getStringArray(_KEYS[0])[pos]);    
    satimage.setImageResource(bundle.getIntArray(_KEYS[1])[pos]);
    listinfo.setAdapter(new CustomInfoAdapter(context, res, _TAG, 1));
    satinfo.setText(info[realpos]);
  }
  
  public abstract void showdialog();

}




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