0

enter image description here

Codes:

<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">


    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/appBar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@android:color/transparent"
        android:backgroundTint="@android:color/transparent"
        android:fitsSystemWindows="true"
        app:layout_scrollFlags="scroll|enterAlwaysCollapsed">

        <com.google.android.material.appbar.CollapsingToolbarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@android:color/transparent"
            android:backgroundTint="@android:color/transparent"
            app:contentScrim="?attr/colorPrimary"
            app:layout_scrollFlags="scroll|enterAlwaysCollapsed"
            app:titleEnabled="false">


            <androidx.appcompat.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                android:background="@color/colorPrimary"
                app:popupTheme="@style/AppTheme.PopupOverlay" />


        </com.google.android.material.appbar.CollapsingToolbarLayout>


        <com.github.florent37.arclayout.ArcLayout
            android:layout_width="match_parent"
            android:layout_height="90dp"
            android:background="@android:color/transparent"
            app:arc_cropDirection="cropOutside"
            app:arc_height="30dp"
            app:layout_behavior="@string/appbar_scrolling_view_behavior">


            <View
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/colorPrimary" />
        </com.github.florent37.arclayout.ArcLayout>


    </com.google.android.material.appbar.AppBarLayout>


    <androidx.core.widget.NestedScrollView
        android:id="@+id/vkiscrollview"
        android:layout_width="match_parent"
        android:layout_height="604dp"
        android:background="@color/darkblue"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/transparent"
            android:visibility="gone"
            android:backgroundTint="@color/transparent">

                    CONTENT....



        </RelativeLayout>

    </androidx.core.widget.NestedScrollView>



</androidx.coordinatorlayout.widget.CoordinatorLayout>

I want to delete the background seen in the image (under arc layout gray backgroundcolor).. The background color of every place did not transparently. I want to use arc layout in my project or arc shape ETC. I wrote all the codes above.. Also, How to draw a xml shape like arc layout?

It doesn't try everything. Please help me

Thanks in advance..

Kdon Patel
  • 107
  • 1
  • 15

3 Answers3

0

Are you sure that the background color you're setting to the arclayout is transparent ? These are the codes for color transparency. Put value in front of color value. Example :

FFFF2D00

100% — FF 95% — F2 90% — E6 85% — D9 80% — CC 75% — BF 70% — B3 65% — A6 60% — 99 55% — 8C 50% — 80 45% — 73 40% — 66 35% — 59 30% — 4D 25% — 40 20% — 33 15% — 26 10% — 1A 5% — 0D 0% — 00

Denis95
  • 136
  • 3
0
 android:background="#00000000"

try this it work for me.

Ak23
  • 342
  • 1
  • 5
  • 17
0

Try to move your ArcLayout outside AppBarLayout like below:

<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">


    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/appBar"
        app:elevation="0dp"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@android:color/transparent"
        android:backgroundTint="@android:color/transparent"
        android:fitsSystemWindows="true"
        app:layout_scrollFlags="scroll|enterAlwaysCollapsed">

        <com.google.android.material.appbar.CollapsingToolbarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@android:color/transparent"
            android:backgroundTint="@android:color/transparent"
            app:contentScrim="?attr/colorPrimary"
            app:layout_scrollFlags="scroll|enterAlwaysCollapsed"
            app:titleEnabled="false">


            <androidx.appcompat.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                android:background="@color/colorPrimary"
                app:popupTheme="@style/AppTheme.PopupOverlay" />


        </com.google.android.material.appbar.CollapsingToolbarLayout>

    </com.google.android.material.appbar.AppBarLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        app:layout_behavior="@string/appbar_scrolling_view_behavior" >

        <com.github.florent37.arclayout.ArcLayout
            android:layout_width="match_parent"
            android:layout_height="90dp"
            android:background="@android:color/transparent"
            app:arc_cropDirection="cropOutside"
            app:arc_height="30dp">


            <View
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/colorPrimary" />
        </com.github.florent37.arclayout.ArcLayout>

        <androidx.core.widget.NestedScrollView
            android:id="@+id/vkiscrollview"
            android:layout_width="match_parent"
            android:layout_height="604dp"
            android:background="@color/darkblue">

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/transparent"
                android:visibility="gone"
                android:backgroundTint="@color/transparent">

            </RelativeLayout>

        </androidx.core.widget.NestedScrollView>
    </LinearLayout>

</androidx.coordinatorlayout.widget.CoordinatorLayout>
Md. Asaduzzaman
  • 14,963
  • 2
  • 34
  • 46