1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-05 10:49:24 +02:00

System settings are now used to format time in footer

This commit is contained in:
Nikolay Pultsin 2010-10-28 21:13:12 +01:00
parent 13b67775ab
commit e0ff782ec8
4 changed files with 11 additions and 4 deletions

View file

@ -1,3 +1,6 @@
===== 0.7.14 (??? ??, 2010) =====
* System settings are now used to format time in footer
===== 0.7.13 (Oct 28, 2010) =====
* NoSuchFieldException has been fixed
* Czech resources have been updated

View file

@ -19,8 +19,6 @@
package org.geometerplus.fbreader.fbreader;
import java.util.Date;
import org.geometerplus.zlibrary.core.application.ZLApplication;
import org.geometerplus.zlibrary.core.util.ZLColor;
import org.geometerplus.zlibrary.core.library.ZLibrary;
@ -332,8 +330,7 @@ public final class FBView extends ZLTextView {
if (info.length() > 0) {
info.append(" ");
}
Date date = new Date();
info.append(String.format("%02d:%02d", date.getHours(), date.getMinutes()));
info.append(ZLibrary.Instance().getCurrentTimeString());
}
final String infoString = info.toString();

View file

@ -36,5 +36,6 @@ public abstract class ZLibrary {
abstract public ZLResourceFile createResourceFile(String path);
abstract public String getVersionName();
abstract public String getCurrentTimeString();
abstract public void openInBrowser(String reference);
}

View file

@ -20,12 +20,14 @@
package org.geometerplus.zlibrary.ui.android.library;
import java.io.*;
import java.util.Date;
import android.app.Application;
import android.content.res.Resources;
import android.content.res.AssetFileDescriptor;
import android.content.Intent;
import android.net.Uri;
import android.text.format.DateFormat;
import org.geometerplus.zlibrary.core.library.ZLibrary;
import org.geometerplus.zlibrary.core.filesystem.ZLResourceFile;
@ -108,6 +110,10 @@ public final class ZLAndroidLibrary extends ZLibrary {
}
}
public String getCurrentTimeString() {
return DateFormat.getTimeFormat(myApplication.getApplicationContext()).format(new Date());
}
private final class AndroidResourceFile extends ZLResourceFile {
private boolean myExists;
private int myResourceId;