diff --git a/app/build.gradle b/app/build.gradle index 01ba6f9..99299a0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -36,6 +36,9 @@ dependencies { compile('com.mikepenz:materialdrawer:3.1.0@aar') { transitive = true } + compile('com.mikepenz:aboutlibraries:5.3.4@aar') { + transitive = true + } compile 'com.mikepenz:iconics:1.6.2@aar' compile 'com.mikepenz:community-material-typeface:1.1.71@aar' } diff --git a/app/src/main/java/ch/dissem/apps/abit/SettingsFragment.java b/app/src/main/java/ch/dissem/apps/abit/SettingsFragment.java index 75bd0bc..d92ac68 100644 --- a/app/src/main/java/ch/dissem/apps/abit/SettingsFragment.java +++ b/app/src/main/java/ch/dissem/apps/abit/SettingsFragment.java @@ -3,9 +3,13 @@ package ch.dissem.apps.abit; import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; +import android.preference.Preference; import android.preference.PreferenceFragment; import android.preference.PreferenceManager; +import com.mikepenz.aboutlibraries.Libs; +import com.mikepenz.aboutlibraries.LibsBuilder; + import ch.dissem.apps.abit.synchronization.SyncAdapter; import static ch.dissem.apps.abit.util.Constants.PREFERENCE_SERVER_POW; @@ -23,6 +27,20 @@ public class SettingsFragment // Load the preferences from an XML resource addPreferencesFromResource(R.xml.preferences); + + Preference about = findPreference("about"); + about.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { + @Override + public boolean onPreferenceClick(Preference preference) { + new LibsBuilder() + .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR) + .withAboutIconShown(true) + .withAboutVersionShown(true) + .withAboutDescription(getString(R.string.about_app)) + .start(getActivity()); + return true; + } + }); } @Override diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index eb1f6e8..2920668 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -10,4 +10,9 @@ #727272 #212121 #B6B6B6 + + + @color/primary + @color/primary_dark + @color/accent diff --git a/app/src/main/res/values/library_jabit_strings.xml b/app/src/main/res/values/library_jabit_strings.xml new file mode 100644 index 0000000..bd4220c --- /dev/null +++ b/app/src/main/res/values/library_jabit_strings.xml @@ -0,0 +1,20 @@ + + + + + Christian Basler + dissem.ch + + Jabit + Jabit strives to be an easy to use Bitmessage library for Java developers to quickly implement their own Bitmessage clients. + https://github.com/Dissem/Jabit/wiki + 1.0.0 + + true + https://github.com/Dissem/Jabit + + ch.dissem.bitmessage.BitmessageContext + + apache_2_0 + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9ad6b9f..5746bbd 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,5 +1,6 @@ Abit + A Bitmessage client for Android Message Detail Subscription Detail Bitmessage Node @@ -52,4 +53,6 @@ Server POW Trusted node does proof of work Running a full Bitmessage uses a lot of traffic, which could be expensive on a mobile network. Are you sure you want to start a full node? + About Abit + Open source dependencies. diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index 50fea51..696d443 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -31,4 +31,9 @@ android:title="@string/server_pow" android:summary="@string/server_pow_summary" /> + \ No newline at end of file