java - Android Dash Lines Not Showing -


just note, did reference creating dash line issues here on , various searches via google... anyway, issue that. not able draw dash lines via xml (can dashpatheffect don't want keep doing this). here dash drawable use (dash_line.xml):

<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"    android:shape="line">  <stroke         android:color="@color/whitecolor"         android:dashwidth="10dp"         android:width="10dp"         android:dashgap="4dp"/> </shape> 

now, implementation in xml imageview:

<imageview      android:id="@+id/dash_test"      android:layout_width="200dp"      android:layout_height="10dp"      android:background="@drawable/dash_line"/> 

i working android api 18. disable hardware acceleration in manifest , on view setting layer type (both tried in xml , programmatically). verified taking view, dashview.ishardwareaccelerated() , false. thoughts missing?

edit: can draw solid lines way know not layering issue.

edit: 1 work around use pathdasheffect. although issue of not being able draw on top of images (which need do). so... still xml solution.

try setting software layertype in imageview:

<imageview     android:layertype="software"     ... /> 

Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -