achartengine自定义缩放按钮 [英] achartengine custom zoom buttons
问题描述
有一个简单的方法来使用自定义图像缩放按钮? 我想使用默认setZoomButtonsVisible功能来管理 显示/隐藏按钮。
Is there an easy way to use custom images for Zoom Buttons? I'd like to use default setZoomButtonsVisible functions to manage show/hide buttons.
我怎么能覆盖这些按钮?
How can I override those buttons?
我想使用的图标,从我的RES /绘制(绘制,华电国际,绘制,LDPI ..) 以确保图像会很好看在所有屏幕上。
I'd like to use icons from my res/drawable (drawable-hdpi, drawable-ldpi ..) to make sure images will be good looking on all screens.
推荐答案
我用几乎相同的方式,我认为。我有:
I'm using almost the same way I think. I've got:
renderer.setZoomEnabled(true);
renderer.setExternalZoomEnabled(true);
renderer.setApplyBackgroundColor(true);
和我使用.xml文件为我的按钮布局。我没有使用<的ImageButton>
在我的code。我使用<按钮>
背景。并以这种方式这些按钮图像。我的$ C $下按钮:
And I'm using .xml file for my buttons layout. I'm not using <ImageButton>
in my code. I'm using <Button>
with background. And in this way these buttons are images. My code for button:
<Button
android:id="@+id/zoomin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@drawable/action_zoomin"
android:hapticFeedbackEnabled="true"
android:layout_marginRight="15dp">
</Button>
这篇关于achartengine自定义缩放按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!