Last active
February 25, 2020 10:42
-
-
Save yunusemredilber/7184e872ade103db6e5af35da164c112 to your computer and use it in GitHub Desktop.
A container with dashed border and rounded corners in android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > | |
<item> | |
<shape> | |
<corners android:radius="10dp" /> | |
<solid android:color="#ffffff" /> | |
<stroke | |
android:dashGap="5dp" | |
android:dashWidth="5dp" | |
android:width="3dp" | |
android:color="#0000FF" /> | |
<padding | |
android:bottom="5dp" | |
android:left="5dp" | |
android:right="5dp" | |
android:top="5dp" /> | |
</shape> | |
</item> | |
</layer-list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<LinearLayout | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:backgroundTint="@color/black" | |
android:background="@drawable/dashed_border_out"> | |
<LinearLayout | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:padding="5dp" | |
android:background="@drawable/dashed_border_in" | |
android:orientation="vertical"> | |
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="This Is Dashed Button" | |
android:textSize="16sp" /> | |
</LinearLayout> | |
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > | |
<item> | |
<shape> | |
<corners android:radius="12dp" /> | |
</shape> | |
</item> | |
</layer-list> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment