diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index f724c69..bc1ee4f 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -32,7 +32,7 @@
Comunic is an OpenSource social network built by Pierre HUBERT since 2014. The + purpose of this project is to offer a social network that respect the privacy of its + users.
+ +The OpenSource Android Application development started on 2017.
+ +This project is licensed under the MIT License. You can retrieve the source code + of this application and all the Comunic components on + GitHub
+ + \ No newline at end of file diff --git a/app/src/main/assets/open_source_licenses.html b/app/src/main/assets/open_source_licenses.html new file mode 100644 index 0000000..250f964 --- /dev/null +++ b/app/src/main/assets/open_source_licenses.html @@ -0,0 +1,58 @@ + + + + + + + +Comunic for Android has been built using the following projects :
+ ++ +FontAwesome 4.7.0 (MIT Licence) and FontAwesome 5.x : + +Font Awesome Free License +------------------------- + +Font Awesome Free is free, open source, and GPL friendly. You can use it for +commercial projects, open source projects, or really almost whatever you want. +Full Font Awesome Free license: https://fontawesome.com/license. + +# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/) +In the Font Awesome Free download, the CC BY 4.0 license applies to all icons +packaged as SVG and JS file types. + +# Fonts: SIL OFL 1.1 License (https://scripts.sil.org/OFL) +In the Font Awesome Free download, the SIL OLF license applies to all icons +packaged as web and desktop font files. + +# Code: MIT License (https://opensource.org/licenses/MIT) +In the Font Awesome Free download, the MIT license applies to all non-font and +non-icon files. + +# Attribution +Attribution is required by MIT, SIL OLF, and CC BY licenses. Downloaded Font +Awesome Free files already contain embedded comments with sufficient +attribution, so you shouldn't need to do anything additional when using these +files normally. + +We've kept attribution comments terse, so we ask that you do not actively work +to remove them from files, especially code. They're a great way for folks to +learn about Font Awesome. + +# Brand Icons +All brand icons are trademarks of their respective owners. The use of these +trademarks does not indicate endorsement of the trademark holder by Font +Awesome, nor vice versa. **Please do not use brand logos for any purpose except +to represent the company, product, or service to which they refer.** + + + ++ + + \ No newline at end of file diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/activities/AboutActivity.java b/app/src/main/java/org/communiquons/android/comunic/client/ui/activities/AboutActivity.java new file mode 100644 index 0000000..6c24903 --- /dev/null +++ b/app/src/main/java/org/communiquons/android/comunic/client/ui/activities/AboutActivity.java @@ -0,0 +1,58 @@ +package org.communiquons.android.comunic.client.ui.activities; + +import android.app.Dialog; +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.view.MenuItem; +import android.view.View; +import android.webkit.WebView; +import android.widget.Button; + +import org.communiquons.android.comunic.client.R; + +/** + * About activity + * + * @author Pierre HUBERT + */ +public class AboutActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_about); + + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + + WebView view = findViewById(R.id.webview); + view.loadUrl("file:///android_asset/about.html"); + + //Make ope + findViewById(R.id.opensource_btn).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + openOpenSourceLicenses(); + } + }); + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + + if(item.getItemId() == android.R.id.home) + finish(); + + return super.onOptionsItemSelected(item); + } + + public void openOpenSourceLicenses(){ + Dialog dialog = new Dialog(AboutActivity.this, + android.R.style.Theme_Holo_Light); + + WebView webView = new WebView(AboutActivity.this); + webView.loadUrl("file:///android_asset/open_source_licenses.html"); + dialog.setContentView(webView); + dialog.setTitle(R.string.dialog_open_source_licenses_title); + dialog.show(); + } +} diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/activities/MainActivity.java b/app/src/main/java/org/communiquons/android/comunic/client/ui/activities/MainActivity.java index 6c02288..678abff 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/ui/activities/MainActivity.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/ui/activities/MainActivity.java @@ -207,6 +207,11 @@ public class MainActivity extends AppCompatActivity implements return true; } + //To learn more about the application + if(id == R.id.action_about){ + startActivity(new Intent(this, AboutActivity.class)); + } + //Check for logout request if (id == R.id.action_logout) { confirmUserLogout(); diff --git a/app/src/main/res/drawable/activity_about_bg.xml b/app/src/main/res/drawable/activity_about_bg.xml new file mode 100644 index 0000000..e7a8088 --- /dev/null +++ b/app/src/main/res/drawable/activity_about_bg.xml @@ -0,0 +1,9 @@ +