<activity
android:name=".MainActivity"
android:theme="@style/AppTheme" />
+ <activity
+ android:name=".AboutActivity"
+ android:label="@string/About"
+ android:theme="@style/AppTheme.Settings.Base"
+ android:windowSoftInputMode="adjustResize" />
</application>
</manifest>
\ No newline at end of file
--- /dev/null
+/*
+ * <p>AMIES Android<br/>
+ * Copyright (C) 2016 Adullact.</p>
+ *
+ * <p>This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.</p>
+ *
+ * <p>This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.</p>
+ *
+ * <p>You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.</p>
+ */
+package org.adullact.amies;
+
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+
+
+public class AboutActivity extends AppCompatActivity {
+
+ @Override protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.licences_layout);
+ }
+
+}
import android.Manifest;
import android.app.FragmentTransaction;
import android.content.Context;
+import android.content.Intent;
import android.content.pm.PackageManager;
import android.location.Location;
import android.location.LocationListener;
import android.support.v4.app.ActivityCompat;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
import org.adullact.amies.models.Notule;
import org.adullact.amies.utils.LocationUtils;
// </editor-fold desc="LifeCycle">
+ @Override public boolean onCreateOptionsMenu(Menu menu) {
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.main_activity, menu);
+ return true;
+ }
+
+ @Override public boolean onOptionsItemSelected(MenuItem item) {
+
+ // Handle item selection
+ if (item.getItemId() == R.id.licences) {
+ startActivity(new Intent(this, AboutActivity.class));
+ return true;
+ }
+
+ return super.onOptionsItemSelected(item);
+ }
+
// <editor-fold desc="NotuleMenuFragmentListener">
@Override public void onFormSelected(@NonNull Notule notule, @NonNull String collectivityId) {
android:orientation="vertical"
android:padding="16dp">
- <!-- Spongy license -->
+ <!-- About -->
+
+ <TextView
+ android:id="@+id/about_version_number_textview"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/about_version_number"
+ android:textColor="@color/text_black"
+ android:textStyle="bold" />
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/card_margin_small"
+ android:text="@string/about_copyright"
+ android:textColor="@color/text_black_secondary" />
+
+ <!-- Legal -->
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/card_margin_medium"
+ android:text="@string/about_legal_title"
+ android:textColor="@color/text_black"
+ android:textStyle="bold" />
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/card_margin_small"
+ android:text="@string/about_legal_content_part1"
+ android:textColor="@color/text_black_secondary" />
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/card_margin_small"
+ android:text="@string/about_legal_content_part2"
+ android:textColor="@color/text_black_secondary" />
+
+ </LinearLayout>
+ </android.support.v7.widget.CardView>
+
+ <android.support.v7.widget.CardView
+ android:layout_width="360dp"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:layout_margin="8dp"
+ android:elevation="2dp"
+ card_view:cardCornerRadius="4dp"
+ tools:ignore="UnusedAttribute">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:padding="16dp">
+
+ <!-- Picasso -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/about_library_license_picasso_title"
android:textColor="@color/text_black"
- android:textSize="14sp" />
+ android:textSize="14sp"
+ android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/about_library_license_android_support_title"
android:textColor="@color/text_black"
- android:textSize="14sp" />
+ android:textSize="14sp"
+ android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_marginTop="@dimen/card_margin_medium"
android:text="@string/about_library_license_volley_title"
android:textColor="@color/text_black"
- android:textSize="14sp" />
+ android:textSize="14sp"
+ android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/about_library_license_gson_title"
android:textColor="@color/text_black"
- android:textSize="14sp" />
+ android:textSize="14sp"
+ android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:id="@+id/licences"
+ android:title="@string/About" />
+</menu>
\ No newline at end of file
<color name="colorPrimary">@color/indigo_500</color>
<color name="colorPrimaryDark">@color/indigo_700</color>
<color name="colorAccent">@color/teal_500</color>
+
+ <!-- Settings -->
+ <color name="settings_primary">@color/blue_grey_900</color>
+ <color name="settings_primaryDark">@color/blue_grey_950</color>
+
</resources>
<resources>
<string name="app_name">AMIES</string>
- <string name="Licences">Licences</string>
+ <string name="About">À propos</string>
<!-- NotuleMenuFragment -->
<string name="Offered_by_a_single_collectivity">Proposé par une collectivité</string>
<?xml version="1.0" encoding="utf-8"?>
<resources>
+ <string name="about_version_number">AMIES Android</string>
+ <string name="about_copyright">Copyright © 2016, ADULLACT</string>
+ <string name="about_legal_title">Informations légales</string>
+ <string name="about_legal_content_part1">AMIES Android est un logiciel libre ; vous pouvez le redistribuer ou le modifier suivant les termes de la GNU Affero General Public License telle que publiée par la Free Software Foundation : soit la version 3 de cette licence, soit (à votre gré) toute version ultérieure.</string>
+ <string name="about_legal_content_part2">AMIES Android est distribué dans l\'espoir qu\'il vous sera utile, mais SANS AUCUNE GARANTIE : sans même la garantie implicite de COMMERCIALISABILITÉ ni d\'ADÉQUATION À UN OBJECTIF PARTICULIER. Consultez la Licence Générale Publique GNU Affero pour plus de détails.</string>
+ <string name="about_library_licenses_title">Licences Open Sources</string>
+
<string name="about_library_license_picasso_title">Picasso</string>
<string name="about_library_license_picasso_copyright">Copyright 2013 Square, Inc.</string>
<string name="about_library_license_picasso_license">Licensed under the Apache License, Version 2.0 (the "License")</string>
<item name="colorAccent">@color/colorAccent</item>
</style>
+ <style name="AppTheme.Settings.Base" parent="Theme.AppCompat.Light.DarkActionBar">
+ <item name="colorPrimary">@color/settings_primary</item>
+ <item name="colorPrimaryDark">@color/settings_primaryDark</item>
+ <item name="windowActionModeOverlay">true</item>
+ </style>
+
</resources>