hi I have to make a view like the below image .
But when i make the parent view transperent , default background is showing like this:
a transperent view is showing behind the main view.
my xml starts like :
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/_8sdp"
android:background="@color/red"
android:clipChildren="false"
android:clipToPadding="false">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/_50sdp"
android:background="@drawable/rounded_corner_shadow"
android:clipChildren="false"
android:clipToPadding="false"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<FrameLayout
android:id="@+id/progressLayout_frame"
android:layout_width="@dimen/_90sdp"
android:layout_height="@dimen/_90sdp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:clickable="true"
android:visibility="visible"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<View
android:id="@+id/bgCircle"
android:layout_width="@dimen/_70sdp"
android:layout_height="@dimen/_70sdp"
android:layout_gravity="center"
android:alpha="0.7"
android:background="@color/white"
android:visibility="visible" />
<RelativeLayout
android:id="@+id/progressLayout"
android:layout_width="@dimen/_80sdp"
android:layout_height="@dimen/_80sdp"
android:layout_gravity="center"
android:background="@android:color/transparent"
android:clickable="true"
>
<ProgressBar
android:id="@+id/progressbar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="@dimen/_80sdp"
android:layout_height="@dimen/_80sdp"
android:layout_centerHorizontal="true"
android:background="@drawable/circle_shape"
android:progressDrawable="@drawable/circular_progress_bar" />
<TextView
android:id="@+id/tvTimeCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginTop="60dp"
android:text="00:00"
android:textColor="#FFFFFF"
android:textSize="29sp"
app:customTypeFace="roboto_light" />
how can I hide the view behind . why does this layout come ? any suggestions would be helpful . thanks in advance



