Commit ecd8a26727d53c3d15cc90823cbb4c8738a82253

Authored by JLo'w
1 parent de609a9d

Petites corrections et suppression mdp après log

PremiereActivite/app/src/main/java/com/example/app_10p5/MainActivite.java
... ... @@ -2,7 +2,6 @@ package com.example.app_10p5;
2 2  
3 3 import android.content.Intent;
4 4 import android.os.Bundle;
5   -import android.os.SystemClock;
6 5 import android.support.design.widget.TabLayout;
7 6 import android.support.v4.app.FragmentActivity;
8 7 import android.support.v4.view.ViewPager;
... ... @@ -54,8 +53,7 @@ public class MainActivite extends FragmentActivity implements ASyncResponse {
54 53 tabLayout.setTabGravity(TabLayout.GRAVITY_FILL);
55 54  
56 55 final ViewPager viewPager = (ViewPager) findViewById(R.id.pager);
57   - final PagerAdapter adapter = new PagerAdapter
58   - (getSupportFragmentManager(), tabLayout.getTabCount());
  56 + final PagerAdapter adapter = new PagerAdapter(getSupportFragmentManager(), tabLayout.getTabCount());
59 57 viewPager.setAdapter(adapter);
60 58 viewPager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tabLayout));
61 59 tabLayout.setOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
... ... @@ -67,7 +65,7 @@ public class MainActivite extends FragmentActivity implements ASyncResponse {
67 65 else{
68 66 viewPager.setCurrentItem(tab.getPosition()); //Empeche un bug graphique
69 67 viewPager.setCurrentItem(0);
70   - Toast.makeText(MainActivite.this, "Veuillez vous connecter biatche.", Toast.LENGTH_LONG).show();
  68 + Toast.makeText(MainActivite.this, "Veuillez vous connecter.", Toast.LENGTH_LONG).show();
71 69 }
72 70 }
73 71  
... ... @@ -266,6 +264,8 @@ public class MainActivite extends FragmentActivity implements ASyncResponse {
266 264 mDroit = output.getInt("droit");
267 265 mUser = output.get("login").toString();
268 266 Toast.makeText(this, "Bonjour " + mUser + " vous êtes bien connecté pour " + EXPIRATION / (1000 * 60) + " minutes.", Toast.LENGTH_LONG).show();
  267 + EditText coUser = (EditText) findViewById(R.id.connection_password);
  268 + coUser.setText("");
269 269 final ViewPager viewPager = (ViewPager) findViewById(R.id.pager);
270 270 viewPager.setCurrentItem(1);
271 271 }
... ...