diff --git a/android/sdremote/res/drawable/libreoffice_logo.png b/android/sdremote/res/drawable/libreoffice_logo.png new file mode 100644 index 000000000000..7ad11473e0b8 Binary files /dev/null and b/android/sdremote/res/drawable/libreoffice_logo.png differ diff --git a/android/sdremote/res/layout/activity_licenses.xml b/android/sdremote/res/layout/activity_licenses.xml index 6319f3f6735c..a69118b49b73 100644 --- a/android/sdremote/res/layout/activity_licenses.xml +++ b/android/sdremote/res/layout/activity_licenses.xml @@ -16,7 +16,45 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . --> - \ No newline at end of file + + + + + + + + + + + \ No newline at end of file diff --git a/android/sdremote/src/org/libreoffice/impressremote/activity/LicensesActivity.java b/android/sdremote/src/org/libreoffice/impressremote/activity/LicensesActivity.java index 84d69819c37a..40b708b7a112 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/activity/LicensesActivity.java +++ b/android/sdremote/src/org/libreoffice/impressremote/activity/LicensesActivity.java @@ -9,41 +9,33 @@ package org.libreoffice.impressremote.activity; import android.content.ContentResolver; +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager.NameNotFoundException; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.view.MenuItem; -import android.webkit.WebView; +import android.widget.TextView; import org.libreoffice.impressremote.R; public class LicensesActivity extends ActionBarActivity { - private static final String SCHEME = ContentResolver.SCHEME_FILE; - private static final String AUTHORITY = "android_asset"; - private static final String PATH = "licenses.html"; @Override protected void onCreate(Bundle aSavedInstanceState) { super.onCreate(aSavedInstanceState); setContentView(R.layout.activity_licenses); - setUpHomeButton(); - setUpContent(); - } - - private void setUpHomeButton() { getSupportActionBar().setHomeButtonEnabled(true); - } - private void setUpContent() { - getLicensesView().loadUrl(buildLicensesUri()); - } - - private WebView getLicensesView() { - return (WebView) findViewById(R.id.view_licenses); - } - - private String buildLicensesUri() { - return String.format("%s:///%s/%s", SCHEME, AUTHORITY, PATH); + try { + PackageInfo info = getPackageManager().getPackageInfo( + getPackageName(), 0); + ((TextView) findViewById(R.id.version)).setText( + "Version: " + info.versionName + + " (Build ID: "+info.versionCode +")"); + } catch (NameNotFoundException e) { + // ignore + } } @Override