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:
parent
13b67775ab
commit
e0ff782ec8
4 changed files with 11 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue