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

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -