问题
I am using aChartEngine
Library 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