[Android] Make android button transparent.

You can make android button transparent by inserting following code in layout xml file.

android:background="@android:color/transparent"

For example, I used it in one of my button as following.

<Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true"
        android:text="Who is computer Geek?"
        android:background="@android:color/transparent" />

Comments

Popular posts from this blog

Fatal: LoadModule: error loading module 'mod_sql_mysql.c'

Regular Expression Route Constraints And Route Names in Laravel 5.4