简体   繁体   English

ViewPager具有对话框主题的活动

[英]ViewPager on activity with dialog theme

I have an activity with a dialog theme (Theme.AppCompat.Light.Dialog.Alert) Inside this activity i created a ViewPager because i want one image slider. 我有一个带有对话框主题的活动(Theme.AppCompat.Light.Dialog.Alert)在此活动中,我创建了一个ViewPager,因为我想要一个图像滑块。 But my ViewPager create something like an actionBar before the slider. 但是我的ViewPager在滑块之前创建了类似actionBar之类的东西。 How can i remove it? 我该如何删除?

If my activity had an normal theme (not like a dialog) i could hide it doing the following code: 如果我的活动具有正常主题(不像对话框),则可以通过以下代码将其隐藏:

getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN)

But it doesn't work in a dialog theme.... 但这在对话框主题中不起作用。

EDIT 编辑

My problem: 我的问题: 在此处输入图片说明

I want remove the "PageViewExample" =/ 我要删除“ PageViewExample” = /

i already tried the following string and nothing happens 我已经尝试了以下字符串,但没有任何反应

requestWindowFeature(Window.FEATURE_NO_TITLE);

I just added some style to my theme. 我只是在主题中添加了一些样式。

<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM