2

What is default color of solid in drawable resource for shape??

#1

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <stroke
        android:width="1dp"
        android:color="@android:color/black" />
</shape>

#2

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <stroke
        android:width="1dp"
        android:color="@android:color/black" />
    <solid
        android:color="@android:color/transparent" />
</shape>

If I code like #1, what is default color of solid attribute??

I have thought default color is #00000000(which is transparent color).

Is there any difference between #1 and #2 ?

Kasım Özdemir
  • 5,414
  • 3
  • 18
  • 35
aguagu
  • 83
  • 5

0 Answers0