Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Transparent Button with Border

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 3.94k
    Comment on it

    Here I am writing code to create transparent button with border.

    First create xml file transparent_button.xml for selector where I am describing the properties of button like border width, color etc

    <!--?xml version="1.0" encoding="utf-8"?-->
    
    <selector xmlns:android="http://schemas.android.com/apk/res/android">
        <item>
            <shape android:shape="rectangle">

    <solid android:color="#00ffffff"/> <stroke android:color="@android:color/white" android:width="1dp"/> <corners android:radius="4dp"/> </shape> </item>

    Then use Button like this

    <button android:id="@+id/button"
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:background="@mipmap/transparent_button" />
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: