android中的两个对话活动重叠内容
我必须要求实现上一个屏幕可见。所以我使用了android中的两个对话活动重叠内容,android,android-dialog,Android,Android Dialog,我必须要求实现上一个屏幕可见。所以我使用了DialogActivity,它的主题类似于 android:theme=“@android:style/theme.Dialog” 简而言之,我有三个屏幕 Screen1- MainHomeScreen -> Activity Screen2- ContentListScreen -> DialogActivity Screen3- ContentDetailScreen -> DialogActivity Screen2
DialogActivity
,它的主题类似于
android:theme=“@android:style/theme.Dialog”
简而言之,我有三个屏幕
Screen1- MainHomeScreen -> Activity
Screen2- ContentListScreen -> DialogActivity
Screen3- ContentDetailScreen -> DialogActivity
Screen2.png
我在第三屏的第二屏发现了这个错误的东西
Screen3.png
问题:应用程序午餐main主屏幕
然后我启动ContentListScreen
这没问题,但我的问题是当我启动ContentDetailScreen
(Screen3)而没有完成ContentListScreen
(Screen2)时,我发现Screen3在Screen2上重叠意味着Screen2的内容在Screen3中可见。我只想展示一下
屏幕3的内容就像活动一样
屏幕1是常规活动,所以我不在这里对该屏幕进行任何描述
屏幕2说明
<activity
android:name=".ContentListDialogActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Dialog"
android:windowSoftInputMode="adjustResize|stateHidden">
</activity>
<activity
android:name=".ContentDetailsDialogActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Dialog"
android:windowSoftInputMode="adjustResize|stateHidden">
</activity>
屏幕3说明
<activity
android:name=".ContentListDialogActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Dialog"
android:windowSoftInputMode="adjustResize|stateHidden">
</activity>
<activity
android:name=".ContentDetailsDialogActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Dialog"
android:windowSoftInputMode="adjustResize|stateHidden">
</activity>
你能添加一些你所说的“Screen2内容在Screen3中可见”的屏幕截图吗@AshishRanjan我已经附上了屏幕截图。你应该在打开Screen3时,通过调用
ContentListDialogActivity.this.finish()
关闭Screen2,点击按钮,我想。是的,我们是这样做的,但我需要screen2当它回来,并保留所有的东西,我放在screen2所以。你知道有什么属性可以管理这些东西吗?那么你应该使用yourMainLayout.setVisibility(View.INVISIBLE)
隐藏screen2布局。点击按钮,然后在需要时将其设置回View.VISIBLE。你能添加一些你所说的“screen2内容在Screen3中可见”的屏幕截图吗@AshishRanjan我附上了ScreenShot你应该通过调用ContentListDialogActivity来关闭你的screen2。当你打开screen3时,这个.finish()。您知道任何管理这些内容的属性吗?然后您应该使用按钮上的yourMainLayout.setVisibility(View.INVISIBLE)
隐藏screen2布局,并在需要时再次将其设置为View.VISIBLE。