Fix default rating text

This commit is contained in:
seven332 committed 2016-05-05 22:56:43 +08:00
1 parent e289e83983
commit 74e10178be
2 files changed
+5 -11

No files matched your search

@@ -913,12 +913,7 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
}
private static String getRatingText(float rating, Resources resources) {
String undefine = "(´_ゝ`)";
if (-1.0f == rating) {
return undefine;
}
int resId = 0;
int resId;
switch (Math.round(rating * 2)) {
case 0:
resId = R.string.rating0; break;
@@ -942,13 +937,11 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
resId = R.string.rating9; break;
case 10:
resId = R.string.rating10; break;
default:
resId = R.string.rating_none; break;
}
if (resId == 0) {
return undefine;
} else {
return resources.getString(resId);
}
return resources.getString(resId);
}
private String getAllRatingText(float rating, int ratingCount) {
+1
View File
@@ -263,6 +263,7 @@
<string name="rating2">PAINFUL</string>
<string name="rating1">UNBEARABLE</string>
<string name="rating0">DISASTER</string>
<string name="rating_none" translatable="false">(´_ゝ`)</string>
<!-- Gallery Info -->
<string name="gallery_info">Gallery Info</string>