Skip to content

Commit

Permalink
feat: add info tab about the app
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximeCrp committed Dec 1, 2018
1 parent 173ef8c commit 1c4fd73
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Samva/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ dependencies {
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
//implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'android.arch.lifecycle:extensions:1.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
Expand All @@ -47,4 +49,3 @@ dependencies {

apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package com.example.utilisateur.samva;

import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;


public class InfoFragment extends Fragment {

TextView infoTitle, infoDescription, infoDataOrigin, infoDataShown, infoLibraries;

public InfoFragment() {
// Required empty public constructor
}

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View rootView = inflater.inflate(R.layout.fragment_info, container, false);
infoTitle = rootView.findViewById(R.id.infoTitle);
infoDescription = rootView.findViewById(R.id.infoDescription);
infoDataOrigin = rootView.findViewById(R.id.infoDataOrigin);
infoDataShown = rootView.findViewById(R.id.infoDataShown);
infoLibraries = rootView.findViewById(R.id.infoLibraries);
return rootView;

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ public Fragment getItem(int i) {
MapsFragment mapsFragment = new MapsFragment().newInstance(this.events);
return mapsFragment;
case 2 :
ListFragment listFragment2 = new ListFragment().newInstance(this.events);
return listFragment2;


InfoFragment infoFragment = new InfoFragment();
return infoFragment;
default :
return null;
}
Expand Down
74 changes: 74 additions & 0 deletions Samva/app/src/main/res/layout/fragment_info.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".InfoFragment">

<TextView
android:id="@+id/infoTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:text="@string/info_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/infoDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:text="@string/info_description"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/infoTitle" />
<TextView
android:id="@+id/infoDataOrigin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:text="@string/info_data_origin"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/infoDescription" />
<TextView
android:id="@+id/infoDataShown"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:text="@string/info_data_shown"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/infoDataOrigin" />
<TextView
android:id="@+id/infoLibraries"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:text="@string/info_libraries"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/infoDataShown" />


</android.support.constraint.ConstraintLayout>
14 changes: 13 additions & 1 deletion Samva/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
<resources>
<string name="app_name">Samva</string>
<string name="app_name">SamVa</string>
<string name="title_activity_maps">Map</string>
<string name="info_title">Bienvenue dans votre application SamVa !</string>
<string name="info_description">SamVa est la première app qui te permet de trouver tous les
évènement de PACA et un Sam pour ta soirée.</string>
<string name="info_data_origin">Données des événements extraites d\'une base openData importante :
https://public.opendatasoft.com/explore/dataset/evenements-publics-cibul/ </string>
<string name="info_data_shown">Les premières données affichées dans la liste sont les événements en PACA. Une fois un
événement sélectionné, on accède aux détails de celui-ci ainsi qu\'aux différents \"Sam\" s\'étant déjà désignées comme tel. Un bouton
permet de se rajouter comme Sam (conducteur allant à l\'événement). On peut également cliquer sur un Sam présent pour afficher ses détails
et se rajouter comme passager. Les passagers enregistrés ne sont pas affichés mais influent sur les places restantes à bord de la voiture.</string>
<string name="info_libraries">Cette alpha utilise des bibliothèques externes telles que : play-services-maps \nandroid-maps-utils
\nretrofit2 \ngson et converter-gson \ncardview \nfirebase</string>

</resources>

0 comments on commit 1c4fd73

Please sign in to comment.