Skip to content

Instantly share code, notes, and snippets.

@David-Hackro
Created July 1, 2017 01:53
Show Gist options
  • Save David-Hackro/57c1cbcf5fdd1591d8c9d1348317363c to your computer and use it in GitHub Desktop.
Save David-Hackro/57c1cbcf5fdd1591d8c9d1348317363c to your computer and use it in GitHub Desktop.
//class java
private void initDialogPassengers() {
dialog = new Dialog(this, android.R.style.ThemeOverlay_Material_Light);
dialog.setContentView(R.layout.example);
dialog.getWindow().getAttributes().windowAnimations = R.style.DialogTheme;
}
----------------------------------------------------------------------------------------------------------------
//styles
<style name="DialogTheme">
<item name="android:windowEnterAnimation">@anim/slide_in_up</item>
<item name="android:windowExitAnimation">@anim/slide_in_botton</item>
</style>
----------------------------------------------------------------------------------------------------------------
//Anim Folder
//down
<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromYDelta="100%p" android:toYDelta="0"
android:duration="500" />
//down
<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromYDelta="0" android:toYDelta="100%p"
android:duration="500" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment