問題描述
我想使用 activity 作為對話框
,并且我將 Activity 的主題設置為 dialog &我成功.但我的問題是當我在活動之外單擊時它會自動關閉&上一個活動開始..
I want to use an activity as dialog
and i made the theme of the activity as dialog & i succeed.
but
i have the problem here is when i click outside of the activity
its automatically get closed & the previous activity get started..
我嘗試了一種方法來制作透明的父布局,它看起來不像一個對話框..
i tried a thing to make transparent parent layout it does not look like a dialog..
我想使用此活動在我的應用程序中創建新帳戶,因為它只有 3 個字段,因此在平板電腦中它看起來很大空間未使用...所以我想將活動用作對話框.....
i want to use this activity to create new account in my application as it has only 3 fields so in tablet it looks large space unused... so i want to use activity as dialog.....
請提前...!!!示例將不勝感激..!!!!!
thenx in advance...!!! examples will be appreciated..!!!!!
推薦答案
試試下面的屬性
this.setFinishOnTouchOutside(false);
這篇關于活動作為android中的對話框的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!