diff --git a/src/org/kiwix/kiwixmobile/KiwixMobileActivity.java b/src/org/kiwix/kiwixmobile/KiwixMobileActivity.java index 6cecfb7e6..5d87b7d9b 100644 --- a/src/org/kiwix/kiwixmobile/KiwixMobileActivity.java +++ b/src/org/kiwix/kiwixmobile/KiwixMobileActivity.java @@ -378,6 +378,9 @@ public class KiwixMobileActivity extends Activity { private boolean openZimFile(File file, boolean clearHistory) { if (file.exists()) { if (ZimContentProvider.setZimFile(file.getAbsolutePath())!=null) { + + + getActionBar().setSubtitle(ZimContentProvider.getZimFileTitle()); //Apparently with webView.clearHistory() only // history before currently (fully) loaded page is cleared // -> request clear, actual clear done after load. diff --git a/src/org/kiwix/kiwixmobile/ZimContentProvider.java b/src/org/kiwix/kiwixmobile/ZimContentProvider.java index 4cc9c4555..0df77ec17 100644 --- a/src/org/kiwix/kiwixmobile/ZimContentProvider.java +++ b/src/org/kiwix/kiwixmobile/ZimContentProvider.java @@ -58,7 +58,20 @@ public class ZimContentProvider extends ContentProvider { public static String getZimFile() { return zimFileName; } + public static String getZimFileTitle() { + if (jniKiwix==null) + return null; + else { + JNIKiwixString title = new JNIKiwixString(); + if (jniKiwix.getTitle(title)) { + return title.value; + } + else return null; + } + } + public native boolean getTitle(JNIKiwixString title); + public static String getMainPage() { if (jniKiwix==null) return null;