1. Are you ready for the Galaxy S20? Here is everything we know so far!

how to do button with transparent background

Discussion in 'Android Development' started by mikewax, Dec 1, 2021.

  1. mikewax

    mikewax Lurker
    Thread Starter

    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.
     



    1. Download the Forums for Android™ app!


      Download

       
Loading...

Share This Page

Loading...