Dotted line is actually not dotted when app is running on real Android device

后端 未结 3 1899
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-15 16:40

in my app I use XML defined vertical dotted line.




        
3条回答
  •  难免孤独
    2020-12-15 16:58

    This is most likely related to hardware acceleration: Dashed lines are not supported in GL mode.

    Its documented here: https://code.google.com/p/android/issues/detail?id=29944

    Turn off your HW-acceleration in your AndroidManifest.xml like this:

    android:hardwareAccelerated="false"
    

    or:

    myView.setLayerType(View.LAYER_TYPE_SOFTWARE, null) 
    

    For more information how to use first solution: http://developer.android.com/guide/topics/graphics/hardware-accel.html

提交回复
热议问题