android - Border around transparent button -


i trying create border round corners on transparent button this:

enter image description here

here transparent.xml

<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@color/blue" android:state_pressed="true"/> <item android:drawable="@android:color/transparent"/>   </selector> 

try this

<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android">      <item><shape>             <stroke android:width="1dp" android:color="#000000" />              <solid android:color="@android:color/transparent" />              <corners                  android:bottomleftradius="4dp"                  android:bottomrightradius="4dp"                  android:topleftradius="4dp"                  android:toprightradius="4dp" />         </shape></item>  </selector> 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -