Fixes an issue with menu + prepares release 1.1.9

This commit is contained in:
tom79 2017-06-10 16:18:58 +02:00
parent 578abfd44a
commit 2957cc6c61
4 changed files with 13 additions and 10 deletions

View File

@ -7,8 +7,8 @@ android {
applicationId "fr.gouv.etalab.mastodon"
minSdkVersion 15
targetSdkVersion 25
versionCode 15
versionName "1.1.8"
versionCode 16
versionName "1.1.9"
}
buildTypes {
release {

Binary file not shown.

View File

@ -425,14 +425,14 @@ public class MainActivity extends AppCompatActivity
fragmentTag = "HOME_TIMELINE";
currentScreen = 1;
if(! first) {
if( currentAction == actionSwipe.LEFT_TO_RIGHT)
if( currentAction == actionSwipe.RIGHT_TO_LEFT)
fragmentManager.beginTransaction().setCustomAnimations(R.anim.enter_from_right, R.anim.exit_to_left, R.anim.enter_from_left, R.anim.exit_to_right)
.replace(R.id.main_app_container, statusFragment, fragmentTag).addToBackStack(fragmentTag).commit();
else
fragmentManager.beginTransaction().setCustomAnimations(R.anim.enter_from_left, R.anim.exit_to_right, R.anim.enter_from_right, R.anim.exit_to_left)
.replace(R.id.main_app_container, statusFragment, fragmentTag).addToBackStack(fragmentTag).commit();
}else{
if( currentAction == actionSwipe.LEFT_TO_RIGHT)
if( currentAction == actionSwipe.RIGHT_TO_LEFT)
fragmentManager.beginTransaction().setCustomAnimations(R.anim.enter_from_right, R.anim.exit_to_left, R.anim.enter_from_left, R.anim.exit_to_right)
.replace(R.id.main_app_container, statusFragment, fragmentTag).commit();
else
@ -447,7 +447,7 @@ public class MainActivity extends AppCompatActivity
statusFragment.setArguments(bundle);
fragmentTag = "LOCAL_TIMELINE";
currentScreen = 2;
if( currentAction == actionSwipe.LEFT_TO_RIGHT)
if( currentAction == actionSwipe.RIGHT_TO_LEFT)
fragmentManager.beginTransaction().setCustomAnimations(R.anim.enter_from_right, R.anim.exit_to_left, R.anim.enter_from_left, R.anim.exit_to_right)
.replace(R.id.main_app_container, statusFragment, fragmentTag).addToBackStack(fragmentTag).commit();
else
@ -461,7 +461,7 @@ public class MainActivity extends AppCompatActivity
statusFragment.setArguments(bundle);
fragmentTag = "PUBLIC_TIMELINE";
currentScreen = 3;
if( currentAction == actionSwipe.LEFT_TO_RIGHT)
if( currentAction == actionSwipe.RIGHT_TO_LEFT)
fragmentManager.beginTransaction().setCustomAnimations(R.anim.enter_from_right, R.anim.exit_to_left, R.anim.enter_from_left, R.anim.exit_to_right)
.replace(R.id.main_app_container, statusFragment, fragmentTag).addToBackStack(fragmentTag).commit();
else
@ -553,7 +553,7 @@ public class MainActivity extends AppCompatActivity
@Override
public boolean dispatchTouchEvent(MotionEvent event) {
//Default dispatchTouchEvent is returned when not in communication page
//Default dispatchTouchEvent is returned when not in timeline page
if( currentScreen >3 || currentScreen < 1)
return super.dispatchTouchEvent(event);
switch(event.getAction()){
@ -568,9 +568,12 @@ public class MainActivity extends AppCompatActivity
float deltaX = downX - upX;
float deltaY = downY - upY;
// swipe horizontal
if(Math.abs(deltaX) > MIN_DISTANCE && Math.abs(deltaY) < MIN_DISTANCE){
if(deltaX < 0) { switchOnSwipe(actionSwipe.LEFT_TO_RIGHT); return true; }
if(deltaX > 0) { switchOnSwipe(actionSwipe.RIGHT_TO_LEFT); return true; }
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
if(deltaX < 0) { switchOnSwipe(actionSwipe.LEFT_TO_RIGHT); drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);return true; }
if(deltaX > 0) { switchOnSwipe(actionSwipe.RIGHT_TO_LEFT); drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);return true; }
}
}
}

View File

@ -279,7 +279,7 @@
L\'utilisation de bibliothèques est réduite au strict minimum :\n
- <b>Android Asynchronous Http Client</b> : Pour la gestion des requêtes\n
- <b>Universal Image Loader</b> : Pour la gestion des médias\n
- <b>Android-Job</b> : Pour la gestion des services
- <b>Android-Job</b> : Pour la gestion des services\n
- <b>Emoji-java</b> : Pour l\'affichage des emoji
</string>
</resources>