From e4e005e3acd3aff7f3e7e11bb6747338f319b124 Mon Sep 17 00:00:00 2001 From: guozhen Date: Sat, 10 May 2025 09:03:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E7=AE=97=E8=BF=9B=E5=BA=A6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jelly/zyreotv/beginning/TimeUtils.java | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/com/shortdrama/jelly/zyreotv/beginning/TimeUtils.java b/app/src/main/java/com/shortdrama/jelly/zyreotv/beginning/TimeUtils.java index 92269b6..f243721 100644 --- a/app/src/main/java/com/shortdrama/jelly/zyreotv/beginning/TimeUtils.java +++ b/app/src/main/java/com/shortdrama/jelly/zyreotv/beginning/TimeUtils.java @@ -74,21 +74,11 @@ public class TimeUtils { } 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); } }