计算进度修改
This commit is contained in:
parent
d639fe4a5b
commit
e4e005e3ac
@ -74,21 +74,11 @@ public class TimeUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String precess(int current_episode, int episode_total) {
|
public static String precess(int current_episode, int episode_total) {
|
||||||
try {
|
|
||||||
DecimalFormat df = new DecimalFormat("###.00");
|
|
||||||
double current = Double.parseDouble(df.format(String.valueOf(current_episode)));
|
|
||||||
double total = Double.parseDouble(df.format(String.valueOf(episode_total)));
|
|
||||||
double result = Double.parseDouble(df.format(current / total)) * 100;
|
|
||||||
DecimalFormat df2 = new DecimalFormat("###");
|
|
||||||
return df2.format(result);
|
|
||||||
} catch (Exception e) {
|
|
||||||
//其他语言 .会变成,
|
|
||||||
double current = Double.parseDouble(String.valueOf(current_episode));
|
|
||||||
double total = Double.parseDouble(String.valueOf(episode_total));
|
|
||||||
DecimalFormat df = new DecimalFormat("###.00");
|
|
||||||
return df.format((current / total) * 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
double current = Double.parseDouble(String.valueOf(current_episode));
|
||||||
|
double total = Double.parseDouble(String.valueOf(episode_total));
|
||||||
|
DecimalFormat df = new DecimalFormat("###");
|
||||||
|
return df.format((current / total) * 100);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user