Vote count:
0
I have a Dialog Activity with selectable text.
when i tap outside the dialog it goes below the launcher before sliding away to the top.
code for my activity theme is
<style name="popup_theme" parent="@android:Theme.Dialog">
<item name="android:windowFrame">@null</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:background">@android:color/transparent</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowTitleStyle">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowAnimationStyle">@null</item>
<item name="android:backgroundDimEnabled">false</item>
</style>
And intent flags that i am using to start Activity are:
Intent intent = new Intent(this,DictionaryActivity.class);
intent.putExtra("word",message);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivity(intent);
For animating exit i am using
@Override
public void finish() {
super.finish();
overridePendingTransition(0,R.anim.dialog_exit);
}
dialog_exit.xml
<translate xmlns:android="http://ift.tt/nIICcg"
android:interpolator="@android:anim/anticipate_interpolator"
android:duration="400"
android:fromYDelta="0%p"
android:toYDelta="-100%p" />
What did I miss.How can I take focus back to the Dialog activity (Through it goes behind only at exit animation still its not looking cool)
asked 58 secs ago
Aucun commentaire:
Enregistrer un commentaire