Tôi muốn có hoạt động (2) với khía cạnh mờ hơn hoạt động khác (1), căn chỉnh ở đầu màn hình (4).Hoạt động mờ làm đầy toàn bộ màn hình
Tôi đã thử gán các chủ đề này để hoạt động số 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>
Nhưng kết quả luôn 3.
là Nếu tôi đặt <item name="android:windowIsFloating">false</item>
trong CustomTheme
kết quả là 2.
Ai có thể cho tôi biết làm cách nào tôi có thể nhận được 4? Cảm ơn!
UPDATE: Đây là hoạt động của tôi 2 bố trí:
<?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>
http: // stackoverflow.com/questions/36305283/cách thực hiện-mờ-hoạt động – Mangesh