Issue
Below is an example of a rectangular border that is blue. What I want to do is create my own shape value<shape android:shape="rectangle" >
where the shape is not rectangle, but rather just a frame with corners similar to this photo here https://banner2.kisspng.com/20180205/ecq/kisspng-video-camera-film-frame-video-camera-viewfinder-frame-for-digital-camera-5a7860497defb6.1781782515178384095158.jpg.
So far I tried playing around with the dashWidth and dashGap to try and make it fit the corners, but I've had issues. I've looked online(youtube/google) and I see shapes for lines, oval, and ring. Nothing for corner so I want to create my own
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape android:shape="rectangle" >
<solid android:color="@android:color/transparent" />
<stroke
android:width="4dp"
android:color="#263ADD"
android:dashWidth="80dp"
android:dashGap="80dp"/>
</shape>
</item>
</layer-list>
Solution
Android now imports SVG to XML. Convert your image to SVG and simple import using Android Studio.
Answered By - Jcov
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.