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++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -