diff options
3 files changed, 9 insertions, 28 deletions
diff --git a/android/experimental/LOAndroid3/res/layout/about.xml b/android/experimental/LOAndroid3/res/layout/about.xml index ec014a0e89f8..06c5bfe74ef7 100644 --- a/android/experimental/LOAndroid3/res/layout/about.xml +++ b/android/experimental/LOAndroid3/res/layout/about.xml @@ -25,24 +25,4 @@ android:textColor="@android:color/secondary_text_light" android:textSize="18dip"/> - <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal"> - - <Button - android:id="@+id/about_license_button" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginRight="12dp" - android:text="License"/> - - <Button - android:id="@+id/about_notice_button" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginRight="12dp" - android:text="Notice"/> - </LinearLayout> - -</LinearLayout>
\ No newline at end of file +</LinearLayout> diff --git a/android/experimental/LOAndroid3/res/values/strings.xml b/android/experimental/LOAndroid3/res/values/strings.xml index f913e5e030d3..c98c0cde5f22 100644 --- a/android/experimental/LOAndroid3/res/values/strings.xml +++ b/android/experimental/LOAndroid3/res/values/strings.xml @@ -4,9 +4,12 @@ <string name="app_name">LibreOffice Viewer</string> <string name="app_about_name"><b>LibreOffice Viewer \'Beta\'</b></string> - <string name="app_description">LibreOffice Viewer is a document viewer based on LibreOffice</string> + <string name="app_description">LibreOffice Viewer is a document viewer based on LibreOffice.</string> <string name="app_credits">http://www.libreoffice.org</string> + <string name="about_license">License</string> + <string name="about_notice">Notice</string> + <string name="browser_app_name">LibreOffice Browser</string> <string name="menu_search">Search</string> <string name="list_view">List</string> diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java index 1df149aba467..1778e3597f88 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -196,11 +196,8 @@ public class LibreOfficeMainActivity extends Activity { builder.setIcon(R.drawable.lo_icon); builder.setTitle(R.string.app_name); builder.setView(messageView); - builder.create(); - builder.show(); - Button licenseButton = (Button) messageView.findViewById(R.id.about_license_button); - licenseButton.setOnClickListener(new View.OnClickListener() { + builder.setNegativeButton(R.string.about_license, new DialogInterface.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(view.getContext(), LibreOfficeMainActivity.class); @@ -210,8 +207,7 @@ public class LibreOfficeMainActivity extends Activity { } }); - Button noticeButton = (Button) messageView.findViewById(R.id.about_notice_button); - noticeButton.setOnClickListener(new View.OnClickListener() { + builder.setPositiveButton(R.string.about_notice, new DialogInterface.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(view.getContext(), LibreOfficeMainActivity.class); @@ -221,6 +217,8 @@ public class LibreOfficeMainActivity extends Activity { } }); + AlertDialog dialog = builder.create(); + dialog.show(); } public void showProgressSpinner() { |