Android Open Source - opscal Team






From Project

Back to project page opscal.

License

The source code is released under:

Copyright (c) 2013 by Philip Nelson Some rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are me...

If you think the Android project opscal 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 ca.pnelson.opscal;
/*  w ww . j  a v a2s.  c om*/
import android.content.Context;
import android.content.res.Resources;

public class Team
{
  private final Resources mResources;

  private final int mTeam;
  private final byte mStatus;

  public Team(Context context, int team, byte status)
  {
    mResources = context.getResources();
    mTeam = team;
    mStatus = status;
  }

  public String getTitle()
  {
    // TODO: internationalize!
    return "Team " + mResources.getStringArray(R.array.teams)[mTeam];
  }

  public String getStatus()
  {
    return mResources.getStringArray(R.array.statuses)[mStatus];
  }

  public int getSymbol()
  {
    switch (mStatus)
    {
    case 0:
      return R.drawable.off_symbol;
    
    case 1:
      return R.drawable.day_symbol;
    
    case 2:
      return R.drawable.eve_symbol;
    
    default:
      return -1;
    }
  }
}




Java Source Code List

ca.pnelson.opscal.AboutActivity.java
ca.pnelson.opscal.DateActivity.java
ca.pnelson.opscal.Date.java
ca.pnelson.opscal.ScheduleActivity.java
ca.pnelson.opscal.ScheduleAdapter.java
ca.pnelson.opscal.SettingsActivity.java
ca.pnelson.opscal.TeamAdapter.java
ca.pnelson.opscal.Team.java