• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps how to do button with transparent background

mikewax

Lurker
Dec 1, 2020
5
0
hello i have an app with a big button in the middle of the screen and it looks like this:
20211130_172134.jpg
and the (coordinator) fragment layout file looks like this:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
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="match_parent"
android:eek:rientation="vertical">

<View
android:layout_width="match_parent"
android:layout_height="276dp"
android:background="?android:attr/listDivider" />

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:eek:rientation="horizontal"
android:layout_gravity="center_horizontal">

<ImageButton
android:id="@+id/send_btn"
android:layout_width="186dp"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_circle"
android:contentDescription="send text to device" />
</LinearLayout>

<TextView
android:id="@+id/receive_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:freezesText="true"
android:gravity="bottom"
android:scrollbars="vertical"
android:textAppearance="@Style/TextAppearance.AppCompat.Medium" />

</LinearLayout>

i'm wondering how to get that background on the button to be transparent.
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones