Added enter and exit sendtransactionfragment animation

This commit is contained in:
Severiano Jaramillo 2017-12-03 23:18:53 -06:00
parent 534e41db00
commit 252b8a84a6
4 changed files with 55 additions and 1 deletions

View file

@ -93,7 +93,7 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat
@NonNull @NonNull
@Override @Override
public Dialog onCreateDialog(Bundle savedInstanceState) { public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(), R.style.SendTransactionTheme);
builder.setTitle("Send"); builder.setTitle("Send");
LayoutInflater inflater = getActivity().getLayoutInflater(); LayoutInflater inflater = getActivity().getLayoutInflater();

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/overshoot_interpolator" >
<translate
android:fromXDelta="150%"
android:fromYDelta="150%"
android:toXDelta="0%"
android:toYDelta="0%"
android:startOffset="0"
android:duration="300" />
</set>

View file

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false" >
<translate
android:interpolator="@android:anim/decelerate_interpolator"
android:fromYDelta="0%"
android:toYDelta="50%"
android:duration="200" />
<translate
android:interpolator="@android:anim/linear_interpolator"
android:fromXDelta="0%"
android:toXDelta="50%"
android:duration="300" />
<set
android:shareInterpolator="true"
android:interpolator="@android:anim/linear_interpolator" >
<scale
android:pivotX="100%"
android:pivotY="100%"
android:fromXScale="100%"
android:fromYScale="100%"
android:toXScale="50%"
android:toYScale="50%"
android:duration="300" />
<alpha
android:fromAlpha="1.0"
android:toAlpha="0.5"
android:duration="300"/>
</set>
</set>

View file

@ -54,4 +54,13 @@
<style name="CustomDialog" parent="@style/Theme.AppCompat.Light.Dialog"> <style name="CustomDialog" parent="@style/Theme.AppCompat.Light.Dialog">
<item name="android:windowNoTitle">true</item> <item name="android:windowNoTitle">true</item>
</style> </style>
<style name="SendTransactionTheme" parent="Theme.AppCompat.Light.Dialog">
<item name="android:windowAnimationStyle">@style/SendTransactionAnimation.Window</item>
</style>
<style name="SendTransactionAnimation.Window" parent="@android:style/Animation.Activity">
<item name="android:windowEnterAnimation">@anim/send_transaction_in</item>
--<item name="android:windowExitAnimation">@anim/send_transaction_out</item>
</style>
</resources> </resources>