Fixes an issue with menu + prepares release 1.1.9
This commit is contained in:
parent
578abfd44a
commit
2957cc6c61
|
@ -7,8 +7,8 @@ android {
|
||||||
applicationId "fr.gouv.etalab.mastodon"
|
applicationId "fr.gouv.etalab.mastodon"
|
||||||
minSdkVersion 15
|
minSdkVersion 15
|
||||||
targetSdkVersion 25
|
targetSdkVersion 25
|
||||||
versionCode 15
|
versionCode 16
|
||||||
versionName "1.1.8"
|
versionName "1.1.9"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
|
Binary file not shown.
|
@ -425,14 +425,14 @@ public class MainActivity extends AppCompatActivity
|
||||||
fragmentTag = "HOME_TIMELINE";
|
fragmentTag = "HOME_TIMELINE";
|
||||||
currentScreen = 1;
|
currentScreen = 1;
|
||||||
if(! first) {
|
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)
|
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();
|
.replace(R.id.main_app_container, statusFragment, fragmentTag).addToBackStack(fragmentTag).commit();
|
||||||
else
|
else
|
||||||
fragmentManager.beginTransaction().setCustomAnimations(R.anim.enter_from_left, R.anim.exit_to_right, R.anim.enter_from_right, R.anim.exit_to_left)
|
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();
|
.replace(R.id.main_app_container, statusFragment, fragmentTag).addToBackStack(fragmentTag).commit();
|
||||||
}else{
|
}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)
|
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();
|
.replace(R.id.main_app_container, statusFragment, fragmentTag).commit();
|
||||||
else
|
else
|
||||||
|
@ -447,7 +447,7 @@ public class MainActivity extends AppCompatActivity
|
||||||
statusFragment.setArguments(bundle);
|
statusFragment.setArguments(bundle);
|
||||||
fragmentTag = "LOCAL_TIMELINE";
|
fragmentTag = "LOCAL_TIMELINE";
|
||||||
currentScreen = 2;
|
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)
|
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();
|
.replace(R.id.main_app_container, statusFragment, fragmentTag).addToBackStack(fragmentTag).commit();
|
||||||
else
|
else
|
||||||
|
@ -461,7 +461,7 @@ public class MainActivity extends AppCompatActivity
|
||||||
statusFragment.setArguments(bundle);
|
statusFragment.setArguments(bundle);
|
||||||
fragmentTag = "PUBLIC_TIMELINE";
|
fragmentTag = "PUBLIC_TIMELINE";
|
||||||
currentScreen = 3;
|
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)
|
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();
|
.replace(R.id.main_app_container, statusFragment, fragmentTag).addToBackStack(fragmentTag).commit();
|
||||||
else
|
else
|
||||||
|
@ -553,7 +553,7 @@ public class MainActivity extends AppCompatActivity
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean dispatchTouchEvent(MotionEvent event) {
|
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)
|
if( currentScreen >3 || currentScreen < 1)
|
||||||
return super.dispatchTouchEvent(event);
|
return super.dispatchTouchEvent(event);
|
||||||
switch(event.getAction()){
|
switch(event.getAction()){
|
||||||
|
@ -568,9 +568,12 @@ public class MainActivity extends AppCompatActivity
|
||||||
float deltaX = downX - upX;
|
float deltaX = downX - upX;
|
||||||
float deltaY = downY - upY;
|
float deltaY = downY - upY;
|
||||||
// swipe horizontal
|
// swipe horizontal
|
||||||
|
|
||||||
if(Math.abs(deltaX) > MIN_DISTANCE && Math.abs(deltaY) < MIN_DISTANCE){
|
if(Math.abs(deltaX) > MIN_DISTANCE && Math.abs(deltaY) < MIN_DISTANCE){
|
||||||
if(deltaX < 0) { switchOnSwipe(actionSwipe.LEFT_TO_RIGHT); return true; }
|
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
|
||||||
if(deltaX > 0) { switchOnSwipe(actionSwipe.RIGHT_TO_LEFT); return true; }
|
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; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -279,7 +279,7 @@
|
||||||
L\'utilisation de bibliothèques est réduite au strict minimum :\n
|
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>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>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
|
- <b>Emoji-java</b> : Pour l\'affichage des emoji
|
||||||
</string>
|
</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue