How to set Image inside of Donut-achartEngine Graph?

蹲街弑〆低调 提交于 2019-12-04 15:32:32

问题


I am using aChartEngineLibrary to make donut graph.But having problem to add image inside of donut Graph. I can set Background Color only , but not get able to set background image inside of donut. Please check image .


回答1:


This could help..

<RelativeLayout
   android:layout_width="match_parent"
   android:layout_height="170dp" >

   <LinearLayout
      android:id="@+id/left_graph_for_head_injury"   //here to draw donut
      android:layout_width="match_parent"
      android:layout_height="170dp" >
   </LinearLayout>

   <ImageView    //image to place
      android:layout_width="95dp"
      android:layout_height="95dp"
      android:layout_centerInParent="true"
      android:scaleType="fitXY"
      android:src="@drawable/inside_donut_head_injury_image" />
</RelativeLayout>


来源:https://stackoverflow.com/questions/17917972/how-to-set-image-inside-of-donut-achartengine-graph

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!