diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index 95663a872..225091f9d 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -19,10 +19,10 @@ android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/ConversationsTheme" - tools:replace="android:label"> - + tools:replace="android:label" > + - + @@ -31,10 +31,10 @@ + android:windowSoftInputMode="stateHidden" > @@ -42,9 +42,9 @@ + android:label="@string/title_activity_start_conversation" > @@ -63,38 +63,40 @@ + + + android:name=".ui.SettingsActivity" + android:label="@string/title_activity_settings" /> + android:name=".ui.ChooseContactActivity" + android:label="@string/title_activity_choose_contact" /> + android:label="@string/title_activity_manage_accounts" /> + android:name=".ui.EditAccountActivity" + android:windowSoftInputMode="stateHidden|adjustResize" /> + android:windowSoftInputMode="stateHidden" /> + android:windowSoftInputMode="stateHidden" /> + android:windowSoftInputMode="stateHidden" /> + android:name=".ui.ShareWithActivity" + android:label="@string/title_activity_conversations" > @@ -111,6 +113,14 @@ + + + diff --git a/src/main/java/eu/siacs/conversations/ui/AboutActivity.java b/src/main/java/eu/siacs/conversations/ui/AboutActivity.java new file mode 100644 index 000000000..a61b872ae --- /dev/null +++ b/src/main/java/eu/siacs/conversations/ui/AboutActivity.java @@ -0,0 +1,15 @@ +package eu.siacs.conversations.ui; + +import android.app.Activity; +import android.os.Bundle; + +import eu.siacs.conversations.R; + +public class AboutActivity extends Activity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_about); + } +} diff --git a/src/main/java/eu/siacs/conversations/ui/AboutPreference.java b/src/main/java/eu/siacs/conversations/ui/AboutPreference.java new file mode 100644 index 000000000..804b4e230 --- /dev/null +++ b/src/main/java/eu/siacs/conversations/ui/AboutPreference.java @@ -0,0 +1,41 @@ +package eu.siacs.conversations.ui; + +import android.content.Context; +import android.content.Intent; +import android.content.pm.PackageManager; +import android.preference.Preference; +import android.util.AttributeSet; + +public class AboutPreference extends Preference { + public AboutPreference(final Context context, final AttributeSet attrs, final int defStyle) { + super(context, attrs, defStyle); + setSummary(); + } + + public AboutPreference(final Context context, final AttributeSet attrs) { + super(context, attrs); + setSummary(); + } + + @Override + protected void onClick() { + super.onClick(); + final Intent intent = new Intent(getContext(), AboutActivity.class); + getContext().startActivity(intent); + } + + private void setSummary() { + if (getContext() != null && getContext().getPackageManager() != null) { + final String packageName = getContext().getPackageName(); + final String versionName; + try { + versionName = getContext().getPackageManager().getPackageInfo(packageName, 0).versionName; + setSummary("Conversations " + versionName); + } catch (final PackageManager.NameNotFoundException e) { + // Using try/catch as part of the logic is sort of like this: + // https://xkcd.com/292/ + } + } + } +} + diff --git a/src/main/res/layout/activity_about.xml b/src/main/res/layout/activity_about.xml new file mode 100644 index 000000000..06a4992a1 --- /dev/null +++ b/src/main/res/layout/activity_about.xml @@ -0,0 +1,21 @@ + + + + + diff --git a/src/main/res/values-w820dp/dimens.xml b/src/main/res/values-w820dp/dimens.xml new file mode 100644 index 000000000..3aeac9e75 --- /dev/null +++ b/src/main/res/values-w820dp/dimens.xml @@ -0,0 +1,7 @@ + + + 64dp + diff --git a/src/main/res/values/dimens.xml b/src/main/res/values/dimens.xml new file mode 100644 index 000000000..47c822467 --- /dev/null +++ b/src/main/res/values/dimens.xml @@ -0,0 +1,5 @@ + + + 16dp + 16dp + diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 0dbb49adb..547659b4c 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -25,8 +25,8 @@ 1 min ago %d mins ago unread Conversations - sending… - Decrypting message. Please wait… + sending… + Decrypting message. Please wait… Nickname is already in use Admin Owner @@ -58,7 +58,7 @@ Add contact delivery failed rejected - Receiving image file. Please wait… + Receiving image file. Please wait… Preparing image for transmission Clear history Clear Conversation History @@ -78,8 +78,8 @@ Conversations utilizes a third party app called OpenKeychain to encrypt and decrypt messages and to manage your public keys.\n\nOpenKeychain is licensed under GPLv3 and available on F-Droid and Google Play.\n\n(Please restart Conversations afterwards.) Restart Install - offering… - waiting… + offering… + waiting… No OpenPGP Key found Conversations is unable to encrypt your messages because your contact is not announcing his or hers public key.\n\nPlease ask your contact to setup OpenPGP. No OpenPGP Keys found @@ -91,7 +91,7 @@ XMPP resource The name this client identifies itself with Accept files - Automatically accept files smaller than… + Automatically accept files smaller than… Notification Settings Notifications Notify when a new message arrives @@ -217,7 +217,7 @@ Publish Touch avatar to select picture from gallery Please note: Everyone subscribed to your presence updates will be allowed to see this picture. - Publishing… + Publishing… The server rejected your publication Something went wrong while converting your picture Could not save avatar to disk @@ -254,6 +254,29 @@ Enables SSLv3 support for legacy servers. Warning: SSLv3 is considered insecure. Expert options Please be careful with these + About Conversations + Build and licensing information + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as published + by the Free Software Foundation.\n + \n + https://www.gnu.org/licenses/gpl-3.0.html\n + \n + OpenPGP API is licensed under the Apache License, Version 2.0; You may + obtain a copy of the License at:\n + \n + https://www.apache.org/licenses/LICENSE-2.0\n + \n + Minidns © 2014 Rene Treffer and is provided under the WTFPL\n + \n + http://wtfpl.org\n + \n + MemorizingTrustManager © 2010 Georg Lukas under the terms of the MIT + License\n + \n + http://opensource.org/licenses/MIT\n + Increase font size Use larger font sizes across the entire app Send button indicates status @@ -285,4 +308,4 @@ Scan QR code Show QR code Account details - \ No newline at end of file + diff --git a/src/main/res/xml/preferences.xml b/src/main/res/xml/preferences.xml index 06ab7560e..15a61e879 100644 --- a/src/main/res/xml/preferences.xml +++ b/src/main/res/xml/preferences.xml @@ -110,5 +110,8 @@ android:summary="@string/pref_never_send_crash_summary" android:title="@string/pref_never_send_crash" /> +