androidplot:在图形上插入徽标

androidplot:在图形上插入徽标,android,bitmap,androidplot,Android,Bitmap,Androidplot,我想在androidplot图上添加一个徽标,或者通常是一个或多个位图。 我认为解决方案是将androidplot图转换为位图,然后在上面添加另一个位图。 但是这个解决方案并不好,因为将图形转换为位图会丢失图形的质量。 理想情况是不转换为位图。有人能帮我吗? 感谢您为此使用FrameLayout 在FrameLayout中添加图形xml代码,并在FrameLayout中添加另一个ImageView或按钮或任何您喜欢的内容 我将ImageView放置在图表的右下角。你可以改变它 XML代码: 快照

我想在androidplot图上添加一个徽标,或者通常是一个或多个位图。 我认为解决方案是将androidplot图转换为位图,然后在上面添加另一个位图。 但是这个解决方案并不好,因为将图形转换为位图会丢失图形的质量。 理想情况是不转换为位图。有人能帮我吗? 感谢您为此使用FrameLayout

在FrameLayout中添加图形xml代码,并在FrameLayout中添加另一个ImageView或按钮或任何您喜欢的内容

我将ImageView放置在图表的右下角。你可以改变它

XML代码:

快照:
你是这样用的吗???我的意思是在xml=>
<FrameLayout
        android:id="@+id/frame_for_graph"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" >

        <com.androidplot.xy.XYPlot
                android:id="@+id/mySimpleXYPlot"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                title="Stats" />

        <ImageView
                android:id="@+id/iv_Logo"
                android:layout_width="40dp"
                android:layout_height="40dp"
                android:layout_marginBottom="20dp"
                android:layout_gravity="right|bottom"
                android:src="@drawable/ic_launcher" />
</FrameLayout>
ImageView logo = (ImageView) findViewById(R.id.iv_Logo);

logo.setOnClickListener(new OnClickListener() {

    @Override
    public void onClick(View arg0) {
        // TODO Auto-generated method stub
        Toast.makeText(getApplicationContext(), "Logo Clicked",
                Toast.LENGTH_LONG).show();
        //Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("YOUR COMPANY URL"));
        //startActivity(browserIntent);
    }
});