From 8bcd81b844ba49b33cc41e3f093266f755cca26f Mon Sep 17 00:00:00 2001 From: Benoît Verhaeghe Date: Sat, 4 Feb 2017 12:48:12 +0100 Subject: [PATCH] some staff --- app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/CreateEvent.java | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/DeleteEvent.java | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/EventFragment.java | 38 +++++++++++++++++++++++--------------- app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/ModifyEvent.java | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/MyEventRecyclerViewAdapter.java | 34 +++++++++++++++++++++++++++++++++- app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/PaiementEvent.java | 3 +-- app/src/main/java/net/plil/clubinfo/etunicorn/app/LoginActivity.java | 13 +++++++------ app/src/main/java/net/plil/clubinfo/etunicorn/app/MainActivity.java | 8 ++------ app/src/main/java/net/plil/clubinfo/etunicorn/app/consommation/ModifyConsommation.java | 15 ++++++++++----- app/src/main/java/net/plil/clubinfo/etunicorn/utils/VolleyUtils.java | 4 ++-- app/src/main/res/layout/fragment_create_event.xml | 39 +++++++++++++++++++++++++++++++++++++++ app/src/main/res/layout/fragment_delete_event.xml | 17 +++++++++++++++++ app/src/main/res/layout/fragment_event_list.xml | 36 ++++++++++++++++++++++++++++++------ app/src/main/res/layout/fragment_modify_consommation.xml | 7 ++++--- app/src/main/res/layout/fragment_modify_event.xml | 35 +++++++++++++++++++++++++++++++++++ app/src/main/res/values-fr/strings.xml | 5 +++++ app/src/main/res/values/strings.xml | 4 ++++ 17 files changed, 506 insertions(+), 46 deletions(-) create mode 100644 app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/CreateEvent.java create mode 100644 app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/DeleteEvent.java create mode 100644 app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/ModifyEvent.java create mode 100644 app/src/main/res/layout/fragment_create_event.xml create mode 100644 app/src/main/res/layout/fragment_delete_event.xml create mode 100644 app/src/main/res/layout/fragment_modify_event.xml diff --git a/app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/CreateEvent.java b/app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/CreateEvent.java new file mode 100644 index 0000000..728480c --- /dev/null +++ b/app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/CreateEvent.java @@ -0,0 +1,86 @@ +package net.plil.clubinfo.etunicorn.app.event; + +import android.app.Dialog; +import android.content.DialogInterface; +import android.os.Bundle; +import android.support.v4.app.DialogFragment; +import android.support.v7.app.AlertDialog; +import android.view.LayoutInflater; +import android.view.View; +import android.widget.EditText; +import android.widget.ProgressBar; + +import com.android.volley.Request; +import com.android.volley.Response; +import com.android.volley.VolleyError; +import com.android.volley.toolbox.JsonObjectRequest; + +import net.plil.clubinfo.etunicorn.R; +import net.plil.clubinfo.etunicorn.utils.VolleyUtils; + +import org.json.JSONException; +import org.json.JSONObject; + + +public class CreateEvent extends DialogFragment { + + EditText mName; + EditText mPrice; + EditText mDate; + ProgressBar mProgressBar; + + + @Override + public Dialog onCreateDialog(Bundle savedInstanceState) { + // Use the Builder class for convenient dialog construction + LayoutInflater inflater = getActivity().getLayoutInflater(); + View view = inflater.inflate(R.layout.fragment_create_event, null); + mName = (EditText) view.findViewById(R.id.create_event_name); + mPrice = (EditText) view.findViewById(R.id.create_event_price); + mDate = (EditText) view.findViewById(R.id.create_event_date); + mProgressBar = (ProgressBar) view.findViewById(R.id.create_event_progress_bar); + AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); + builder + .setTitle(R.string.create_event) + .setView(view) + .setPositiveButton(R.string.valid, new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + + mProgressBar.setVisibility(View.VISIBLE); + mPrice.setVisibility(View.GONE); + mName.setVisibility(View.GONE); + JSONObject jsonObject = new JSONObject(); + try { + jsonObject.put("nomEvenement", mName.getText().toString()); + jsonObject.put("prix", Double.parseDouble(mPrice.getText().toString())); + jsonObject.put("date", mDate.getText().toString()); + } catch (JSONException e){ + e.printStackTrace(); + } + JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, VolleyUtils.baseUri + "/evenement" ,jsonObject , new Response.Listener() { + @Override + public void onResponse(JSONObject response) { + mProgressBar.setVisibility(View.GONE); + } + }, new Response.ErrorListener() { + @Override + public void onErrorResponse(VolleyError error) { + mProgressBar.setVisibility(View.GONE); + } + } + ); + + VolleyUtils.getInstance(getContext()).addToRequestQueue(jsonObjectRequest); + } + }) + .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + // User cancelled the dialog + } + }); + // Create the AlertDialog object and return it + return builder.create(); + } + + +} diff --git a/app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/DeleteEvent.java b/app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/DeleteEvent.java new file mode 100644 index 0000000..c80bb06 --- /dev/null +++ b/app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/DeleteEvent.java @@ -0,0 +1,96 @@ +package net.plil.clubinfo.etunicorn.app.event; + +import android.app.Dialog; +import android.content.DialogInterface; +import android.os.Bundle; +import android.support.v4.app.DialogFragment; +import android.support.v7.app.AlertDialog; +import android.view.LayoutInflater; +import android.view.View; +import android.widget.ProgressBar; +import android.widget.Toast; + +import com.android.volley.Request; +import com.android.volley.Response; +import com.android.volley.VolleyError; +import com.android.volley.toolbox.JsonObjectRequest; + +import net.plil.clubinfo.etunicorn.R; +import net.plil.clubinfo.etunicorn.data.Consommation; +import net.plil.clubinfo.etunicorn.data.Event; +import net.plil.clubinfo.etunicorn.utils.VolleyUtils; + +import org.json.JSONObject; + + +public class DeleteEvent extends DialogFragment { + + ProgressBar mProgressBar; + + public DeleteEvent(){} + + /** + * Create a new instance of MyDialogFragment, providing "num" + * as an argument. + */ + public static DeleteEvent newInstance(Event event) { + DeleteEvent f = new DeleteEvent(); + + // Supply num input as an argument. + Bundle args = new Bundle(); + args.putSerializable("evenement", event); + f.setArguments(args); + + return f; + } + + + @Override + public Dialog onCreateDialog(Bundle savedInstanceState) { + // Use the Builder class for convenient dialog construction + LayoutInflater inflater = getActivity().getLayoutInflater(); + View view = inflater.inflate(R.layout.fragment_delete_event, null); + + mProgressBar = (ProgressBar) view.findViewById(R.id.delete_consommation_progress_bar); + final Event event = (Event) getArguments().getSerializable("event"); + + + AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); + builder + .setTitle(R.string.verif_delete_event) + .setView(view) + .setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + mProgressBar.setVisibility(View.VISIBLE); + + JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.DELETE, VolleyUtils.baseUri + "/evenement/" + event.getIdEvent(), null, new Response.Listener() { + @Override + public void onResponse(JSONObject response) { + mProgressBar.setVisibility(View.GONE); + Toast.makeText(getContext(), R.string.delete_done, Toast.LENGTH_LONG).show(); + dismiss(); + } + }, new Response.ErrorListener() { + @Override + public void onErrorResponse(VolleyError error) { + mProgressBar.setVisibility(View.GONE); + Toast.makeText(getContext(), R.string.delete_refused, Toast.LENGTH_LONG).show(); + dismiss(); + } + } + ); + + VolleyUtils.getInstance(getContext()).addToRequestQueue(jsonObjectRequest); + } + }) + .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + + } + }); + return builder.create(); + } + + +} diff --git a/app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/EventFragment.java b/app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/EventFragment.java index 7eab0c5..e8454f5 100644 --- a/app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/EventFragment.java +++ b/app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/EventFragment.java @@ -1,7 +1,8 @@ -package net.plil.clubinfo.etunicorn.app.Event; +package net.plil.clubinfo.etunicorn.app.event; import android.content.Context; import android.os.Bundle; +import android.support.design.widget.FloatingActionButton; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; @@ -46,22 +47,29 @@ public class EventFragment extends FragmentNFC { View view = inflater.inflate(R.layout.fragment_event_list, container, false); // Set the adapter - if (view instanceof RecyclerView) { - Context context = view.getContext(); - RecyclerView recyclerView = (RecyclerView) view; - recyclerView.setLayoutManager(new LinearLayoutManager(context)); - - List events = new ArrayList<>(); - for (int i = 0; i< 150; ++i){ - Event ev = new Event(); - ev.setNomEvent("Hello " + i); - ev.setPrice(15.52); - ev.setDate(new Date(Calendar.getInstance().getTimeInMillis())); - events.add(ev); + Context context = view.getContext(); + RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.event_list); + recyclerView.setLayoutManager(new LinearLayoutManager(context)); + + List events = new ArrayList<>(); + for (int i = 0; i< 150; ++i) { + Event ev = new Event(); + ev.setNomEvent("Hello " + i); + ev.setPrice(15.52); + ev.setDate(new Date(Calendar.getInstance().getTimeInMillis())); + events.add(ev); + } + + FloatingActionButton fAB = (FloatingActionButton) view.findViewById(R.id.event_add); + fAB.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + CreateEvent newFragment = new CreateEvent(); + newFragment.show(getFragmentManager(), "CreateEvent"); } + }); - recyclerView.setAdapter(new MyEventRecyclerViewAdapter(events, mListener, getActivity())); - } + recyclerView.setAdapter(new MyEventRecyclerViewAdapter(events, mListener, getActivity())); return view; } diff --git a/app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/ModifyEvent.java b/app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/ModifyEvent.java new file mode 100644 index 0000000..21ac801 --- /dev/null +++ b/app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/ModifyEvent.java @@ -0,0 +1,112 @@ +package net.plil.clubinfo.etunicorn.app.event; + +import android.app.Dialog; +import android.content.DialogInterface; +import android.os.Bundle; +import android.support.v4.app.DialogFragment; +import android.support.v7.app.AlertDialog; +import android.view.LayoutInflater; +import android.view.View; +import android.widget.EditText; +import android.widget.ProgressBar; +import android.widget.Toast; + +import com.android.volley.Request; +import com.android.volley.Response; +import com.android.volley.VolleyError; +import com.android.volley.toolbox.JsonObjectRequest; + +import net.plil.clubinfo.etunicorn.R; +import net.plil.clubinfo.etunicorn.data.Event; +import net.plil.clubinfo.etunicorn.utils.VolleyUtils; + +import org.json.JSONException; +import org.json.JSONObject; + +import java.util.Locale; + + +public class ModifyEvent extends DialogFragment { + + EditText mNom; + EditText mPrice; + EditText mDate; + ProgressBar mProgressBar; + + public static ModifyEvent newInstance(Event event) { + ModifyEvent f = new ModifyEvent(); + + // Supply num input as an argument. + Bundle args = new Bundle(); + args.putSerializable("event", event); + f.setArguments(args); + + return f; + } + + + @Override + public Dialog onCreateDialog(Bundle savedInstanceState) { + // Use the Builder class for convenient dialog construction + LayoutInflater inflater = getActivity().getLayoutInflater(); + View view = inflater.inflate(R.layout.fragment_modify_event, null); + mNom = (EditText) view.findViewById(R.id.modify_event_name); + mPrice = (EditText) view.findViewById(R.id.modify_event_price); + mDate = (EditText) view.findViewById(R.id.modify_event_date); + mProgressBar = (ProgressBar) view.findViewById(R.id.modify_event_progress_bar); + + final Event event = (Event) getArguments().getSerializable("event"); + + mNom.setText(event.getNomEvent()); + mPrice.setText(String.format(Locale.FRANCE, "%.2f", event.getPrice())); + mDate.setText(event.getDate().toString()); + + AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); + builder + .setTitle(R.string.modify) + .setView(view) + .setPositiveButton(R.string.modify, new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + + mProgressBar.setVisibility(View.VISIBLE); + mPrice.setVisibility(View.GONE); + mNom.setVisibility(View.GONE); + JSONObject jsonObject = new JSONObject(); + try { + jsonObject.put("nomEvenement", mNom.getText().toString()); + jsonObject.put("prix", Double.parseDouble(mPrice.getText().toString())); + jsonObject.put("date", mDate.getText().toString()); + } catch (JSONException e){ + e.printStackTrace(); + } + JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, VolleyUtils.baseUri + "/evenement/" + event.getIdEvent() ,jsonObject , new Response.Listener() { + @Override + public void onResponse(JSONObject response) { + mProgressBar.setVisibility(View.GONE); + Toast.makeText(getContext(), R.string.modify_done, Toast.LENGTH_LONG).show(); + + } + }, new Response.ErrorListener() { + @Override + public void onErrorResponse(VolleyError error) { + mProgressBar.setVisibility(View.GONE); + Toast.makeText(getContext(), R.string.modify_refused, Toast.LENGTH_LONG).show(); + + } + } + ); + + VolleyUtils.getInstance(getContext()).addToRequestQueue(jsonObjectRequest); + } + }) + .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + // User cancelled the dialog + } + }); + // Create the AlertDialog object and return it + return builder.create(); + } + + +} diff --git a/app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/MyEventRecyclerViewAdapter.java b/app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/MyEventRecyclerViewAdapter.java index e5e90d9..e39106b 100644 --- a/app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/MyEventRecyclerViewAdapter.java +++ b/app/src/main/java/net/plil/clubinfo/etunicorn/app/Event/MyEventRecyclerViewAdapter.java @@ -1,8 +1,11 @@ -package net.plil.clubinfo.etunicorn.app.Event; +package net.plil.clubinfo.etunicorn.app.event; import android.content.Context; +import android.support.v7.app.AppCompatActivity; +import android.support.v7.widget.PopupMenu; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; +import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; @@ -56,6 +59,35 @@ public class MyEventRecyclerViewAdapter extends RecyclerView.Adapter() { + jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, VolleyUtils.baseUri + "/login" , new JSONObject(new Gson().toJson(user)), new Response.Listener() { @Override public void onResponse(JSONObject response) { showProgress(false); - Intent intent = new Intent(getApplicationContext(), MainActivity.class); - startActivity(intent); + + Toast.makeText(getApplicationContext(), response.toString(), Toast.LENGTH_LONG).show(); + //Intent intent = new Intent(getApplicationContext(), MainActivity.class); + //startActivity(intent); } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { showProgress(false); - Toast.makeText(getApplicationContext(), error.getMessage(), Toast.LENGTH_SHORT).show(); - - //TODO remove this line + Toast.makeText(getApplicationContext(), "error : " + error.getCause(), Toast.LENGTH_SHORT).show(); Intent intent = new Intent(getApplicationContext(), MainActivity.class); startActivity(intent); // END } } ); + Toast.makeText(getApplicationContext(), new Gson().toJson(user), Toast.LENGTH_LONG).show(); } catch (JSONException e) { e.printStackTrace(); } diff --git a/app/src/main/java/net/plil/clubinfo/etunicorn/app/MainActivity.java b/app/src/main/java/net/plil/clubinfo/etunicorn/app/MainActivity.java index 5df4fa1..a98e2c8 100644 --- a/app/src/main/java/net/plil/clubinfo/etunicorn/app/MainActivity.java +++ b/app/src/main/java/net/plil/clubinfo/etunicorn/app/MainActivity.java @@ -2,7 +2,6 @@ package net.plil.clubinfo.etunicorn.app; import android.app.PendingIntent; import android.content.Intent; -import android.net.Uri; import android.nfc.NfcAdapter; import android.nfc.Tag; import android.os.Bundle; @@ -16,13 +15,10 @@ import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; -import android.view.Window; -import android.view.WindowManager; -import android.widget.Toast; import net.plil.clubinfo.etunicorn.R; -import net.plil.clubinfo.etunicorn.app.Event.EventFragment; -import net.plil.clubinfo.etunicorn.app.Event.PaiementEvent; +import net.plil.clubinfo.etunicorn.app.event.EventFragment; +import net.plil.clubinfo.etunicorn.app.event.PaiementEvent; import net.plil.clubinfo.etunicorn.app.consommation.FragmentConsommation; import net.plil.clubinfo.etunicorn.app.consommation.PaiementConsommation; import net.plil.clubinfo.etunicorn.data.Consommation; diff --git a/app/src/main/java/net/plil/clubinfo/etunicorn/app/consommation/ModifyConsommation.java b/app/src/main/java/net/plil/clubinfo/etunicorn/app/consommation/ModifyConsommation.java index 04beaba..7682192 100644 --- a/app/src/main/java/net/plil/clubinfo/etunicorn/app/consommation/ModifyConsommation.java +++ b/app/src/main/java/net/plil/clubinfo/etunicorn/app/consommation/ModifyConsommation.java @@ -23,6 +23,8 @@ import net.plil.clubinfo.etunicorn.utils.VolleyUtils; import org.json.JSONException; import org.json.JSONObject; +import java.util.Locale; + public class ModifyConsommation extends DialogFragment { @@ -46,13 +48,16 @@ public class ModifyConsommation extends DialogFragment { public Dialog onCreateDialog(Bundle savedInstanceState) { // Use the Builder class for convenient dialog construction LayoutInflater inflater = getActivity().getLayoutInflater(); - View view = inflater.inflate(R.layout.fragment_create_consomation, null); - mNomConsomation = (EditText) view.findViewById(R.id.create_consomation_name); - mPrice = (EditText) view.findViewById(R.id.create_consomation_price); - mProgressBar = (ProgressBar) view.findViewById(R.id.create_consomation_progress_bar); + View view = inflater.inflate(R.layout.fragment_modify_consommation, null); + mNomConsomation = (EditText) view.findViewById(R.id.modify_consommation_name); + mPrice = (EditText) view.findViewById(R.id.modify_consommation_price); + mProgressBar = (ProgressBar) view.findViewById(R.id.modify_consommation_progress_bar); final Consommation consommation = (Consommation) getArguments().getSerializable("consommation"); + mNomConsomation.setText(consommation.getNomConsomation()); + mPrice.setText(String.format(Locale.FRANCE,"%.2f", consommation.getPrix())); + AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder .setTitle(R.string.modify) @@ -70,7 +75,7 @@ public class ModifyConsommation extends DialogFragment { } catch (JSONException e){ e.printStackTrace(); } - JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, VolleyUtils.baseUri + "/consomation/" + consommation.getIdConsomation() ,jsonObject , new Response.Listener() { + JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.PUT, VolleyUtils.baseUri + "/consomation/" + consommation.getIdConsomation() ,jsonObject , new Response.Listener() { @Override public void onResponse(JSONObject response) { mProgressBar.setVisibility(View.GONE); diff --git a/app/src/main/java/net/plil/clubinfo/etunicorn/utils/VolleyUtils.java b/app/src/main/java/net/plil/clubinfo/etunicorn/utils/VolleyUtils.java index 5318cc2..b5d1cf9 100644 --- a/app/src/main/java/net/plil/clubinfo/etunicorn/utils/VolleyUtils.java +++ b/app/src/main/java/net/plil/clubinfo/etunicorn/utils/VolleyUtils.java @@ -12,10 +12,10 @@ import com.android.volley.toolbox.Volley; public class VolleyUtils { - private static final String uri = "https://etunicorn.plil.net/"; + private static final String uri = "http://192.168.0.21:8080/"; private static final String version = "v1"; - public static final String baseUri = VolleyUtils.uri + VolleyUtils.version + "/"; + public static final String baseUri = VolleyUtils.uri + VolleyUtils.version ; private static VolleyUtils mInstance; private RequestQueue mRequestQueue; diff --git a/app/src/main/res/layout/fragment_create_event.xml b/app/src/main/res/layout/fragment_create_event.xml new file mode 100644 index 0000000..cf7b5bd --- /dev/null +++ b/app/src/main/res/layout/fragment_create_event.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + diff --git a/app/src/main/res/layout/fragment_delete_event.xml b/app/src/main/res/layout/fragment_delete_event.xml new file mode 100644 index 0000000..22b8892 --- /dev/null +++ b/app/src/main/res/layout/fragment_delete_event.xml @@ -0,0 +1,17 @@ + + + + + + diff --git a/app/src/main/res/layout/fragment_event_list.xml b/app/src/main/res/layout/fragment_event_list.xml index 8de1445..5b576e8 100644 --- a/app/src/main/res/layout/fragment_event_list.xml +++ b/app/src/main/res/layout/fragment_event_list.xml @@ -1,13 +1,37 @@ - + + + tools:context="net.plil.clubinfo.etunicorn.app.event.EventFragment" + tools:listitem="@layout/fragment_event" + /> + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_modify_consommation.xml b/app/src/main/res/layout/fragment_modify_consommation.xml index 1057b41..cfa47d6 100644 --- a/app/src/main/res/layout/fragment_modify_consommation.xml +++ b/app/src/main/res/layout/fragment_modify_consommation.xml @@ -6,12 +6,12 @@ android:orientation="vertical"> @@ -20,7 +20,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/modify_consommation_progress_bar" - android:layout_gravity="center"/> + android:layout_gravity="center" + android:visibility="gone"/> diff --git a/app/src/main/res/layout/fragment_modify_event.xml b/app/src/main/res/layout/fragment_modify_event.xml new file mode 100644 index 0000000..779daeb --- /dev/null +++ b/app/src/main/res/layout/fragment_modify_event.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 00724a2..ec14f5e 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -27,4 +27,9 @@ Modification effectué Modification refusé Etes-vous sûr ? + Créer un évenement + Date + Nom + Evenement + Paiement d\'un evenement \ 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 25a0076..d9f61bb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -24,10 +24,14 @@ Modify Delete Are you sure ? + Are you sure ? Delete done Delete refused Modify done Modify refused Event Event payment + Date + Name + Create event -- libgit2 0.21.2