Util.java :  » Music-Sound » simplemusicplayer » com » app » liviu » simpleMusicPlayer » Util » Android Open Source

Android Open Source » Music Sound » simplemusicplayer 
simplemusicplayer » com » app » liviu » simpleMusicPlayer » Util » Util.java
package com.app.liviu.simpleMusicPlayer.Util;

public class Util 
{
  public static String intToStringTimeFormat(int time)
  {
    String strTemp = new String();    
    int minutes    = time / 60;
    int seconds    = time % 60;
    
    if(minutes < 10)
      strTemp = "0" + Integer.toString(minutes) + ":";
    else
      strTemp = Integer.toString(minutes) + ":";
    
    if(seconds < 10)
      strTemp = strTemp + "0" + Integer.toString(seconds);
    else
      strTemp = strTemp + Integer.toString(seconds);
    
    return strTemp;
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.