Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…roid into veranda
  • Loading branch information
ericrosenthal committed Mar 21, 2019
2 parents 1a738a4 + bc03b5b commit f28ef89
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
val newFragment = SettingsFragment()
val fragmentManager = fragmentManager
val fragmentTransaction = fragmentManager!!.beginTransaction()
fragmentTransaction?.setCustomAnimations(R.anim.enter_from_right, R.anim.exit_to_left, R.anim.enter_from_left, R.anim.exit_to_right);
fragmentTransaction.replace(R.id.fragment_container, newFragment)
fragmentTransaction.addToBackStack(null)
fragmentTransaction.commit()
Expand Down Expand Up @@ -506,6 +507,7 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
val newFragment = ProfileFragment()
val fragmentManager = fragmentManager
val fragmentTransaction = fragmentManager!!.beginTransaction()
fragmentTransaction?.setCustomAnimations(R.anim.enter_from_right, R.anim.exit_to_left, R.anim.enter_from_left, R.anim.exit_to_right);
fragmentTransaction.replace(R.id.fragment_container, newFragment)
fragmentTransaction.addToBackStack(null)
fragmentTransaction.commit()
Expand Down Expand Up @@ -544,10 +546,10 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
create_new_channel_fab.setOnClickListener { view ->
currentUserStatusIcon?.isGone = true
val contactsFragment = ContactsFragment()
val transaction = activity?.supportFragmentManager?.beginTransaction();
transaction?.setCustomAnimations(R.anim.enter_from_right, R.anim.exit_to_left, R.anim.enter_from_left, R.anim.exit_to_right);
transaction?.replace(this.id, contactsFragment, "contactsFragment");
transaction?.addToBackStack("contactsFragment")?.commit();
val transaction = activity?.supportFragmentManager?.beginTransaction()
transaction?.setCustomAnimations(R.anim.enter_from_right, R.anim.exit_to_left, R.anim.enter_from_left, R.anim.exit_to_right)
transaction?.replace(this.id, contactsFragment, "contactsFragment")
transaction?.addToBackStack("contactsFragment")?.commit()
}
}

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/anim/close_enter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
android:zAdjustment="top">

<alpha
android:duration="100"
android:duration="200"
android:fromAlpha="0.2"
android:interpolator="@anim/accelerate_cubic"
android:toAlpha="1.0" />

<scale
android:duration="100"
android:duration="200"
android:fromXScale="0.9"
android:fromYScale="0.9"
android:interpolator="@anim/accelerate_cubic"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/anim/close_exit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
android:zAdjustment="top">

<translate
android:duration="100"
android:duration="200"
android:fromXDelta="0.0%p"
android:interpolator="@anim/accelerate_cubic"
android:toXDelta="100.0%p" />
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/anim/enter_from_left.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="@android:integer/config_mediumAnimTime"
android:duration="200"
android:fromXDelta="-100%"
android:fromYDelta="0%"
android:toXDelta="0%"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/anim/enter_from_right.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="@android:integer/config_mediumAnimTime"
android:duration="200"
android:fromXDelta="100%"
android:fromYDelta="0%"
android:toXDelta="0%"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/anim/exit_to_left.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="@android:integer/config_mediumAnimTime"
android:duration="200"
android:fromXDelta="0%"
android:fromYDelta="0%"
android:toXDelta="-100%"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/anim/exit_to_right.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="@android:integer/config_mediumAnimTime"
android:duration="200"
android:fromXDelta="0%"
android:fromYDelta="0%"
android:toXDelta="100%"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/anim/open_enter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
android:zAdjustment="top">

<translate
android:duration="100"
android:duration="200"
android:fromXDelta="100.0%p"
android:interpolator="@anim/decelerate_cubic"
android:toXDelta="0.0%p" />
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/anim/open_exit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
android:zAdjustment="normal">

<alpha
android:duration="100"
android:duration="200"
android:fromAlpha="1.0"
android:interpolator="@anim/decelerate_cubic"
android:toAlpha="0.2" />

<scale
android:duration="100"
android:duration="200"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:interpolator="@anim/decelerate_cubic"
Expand Down

0 comments on commit f28ef89

Please sign in to comment.