AppCompat Dialog application graphical areas and circular background

I'm having some difficulties. I want to emulate a floating search widget, as seen from the Google I / O 2015 app - see below.

enter image description here

So far I have managed to include the second (search) activity in the dialogue with the theme Theme.AppCompat.Light.Dialog. I have followed the steps shown here https://stackoverflow.com/a/3129441/212 to work with circular expansion.

The second type of activity is defined in Theme.Transparent

<style name="Theme.Transparent" parent="Theme.AppCompat.Light.Dialog">
    <item name="android:windowIsTranslucent">false</item>
    <item name="android:statusBarColor">@android:color/transparent</item>
    <item name="android:windowBackground">@android:color/transparent</item>

    <item name="windowNoTitle">true</item>
</style>

Note. Green - green with alpha and is the background of the root layout of the second action.

The problem is the transparency of the dialog background. If I comment

<item name="android:windowBackground">@android:color/transparent</item>

from the topic, then the background of the dialogue is whitish - as seen below. enter image description here

, "" - - . . enter image description here

- ?

PS. xml /

<?xml version="1.0" encoding="utf-8"?>

<android.support.v4.widget.DrawerLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <FrameLayout
        android:id="@+id/root_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#8800FF00">

    </FrameLayout>

</android.support.v4.widget.DrawerLayout>
+4

Source: https://habr.com/ru/post/1611412/


All Articles