mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-17 03:16:27 -04:00
set action bar title to article title if available
This commit is contained in:
parent
7d4abceacc
commit
aa93e08d20
@ -189,6 +189,15 @@ public class KiwixMobileActivity extends Activity {
|
||||
String errorString = String.format(getResources().getString(R.string.error_articleurlnotfound), failingUrl);
|
||||
//TODO apparently screws up back/forward
|
||||
webView.loadDataWithBaseURL("file://error","<html><body>"+errorString+"</body></html>", "text/html", "utf-8", failingUrl);
|
||||
String title = getResources().getString(R.string.app_name);
|
||||
getActionBar().setTitle(title);
|
||||
}
|
||||
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
String title = getResources().getString(R.string.app_name);
|
||||
if (webView.getTitle()!=null && !webView.getTitle().isEmpty())
|
||||
title = webView.getTitle();
|
||||
getActionBar().setTitle(title);
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user