Я хотел бы иметь активность (2) с полупрозрачным аспектом над другой деятельностью (1), выровненную в верхней части экрана (4).
Я попытался присвоить эти темы активности номеру 2:
<style name="Theme.CustomDialog" parent="android:style/Theme.Dialog">
<item name="android:windowBackground">@android:color/black</item>
</style>
<style name="CustomTheme">
<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:windowNoTitle">true</item>
</style>
Но результат всегда равен 3.
Если я устанавливаю <item name="android:windowIsFloating">false</item>
в CustomTheme
, результат равен 2.
Может ли кто-нибудь сказать мне, как я могу получить 4? Спасибо!
ОБНОВЛЕНИЕ: Это макет моей активности 2:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" android:background="#0000">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:background="#FFFFFF">
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Menu" android:layout_centerHorizontal="true"/>
</RelativeLayout>
</RelativeLayout>