【转】android 有效解决achartengine在scrollview中伸缩的问题

1、 在achartengine的renderer中加入一行:

renderer.setInScroll(true);

2、ScrollView的布局中加入:

android:fillViewport="true"

3、ScrollView的height要设置成:

android:layout_height="match_parent"


原因分析:It must be set to ScrollView and has the following effect : when set to true, this attribute causes the scroll view’s child to expand to the height of the ScrollView if needed. When the child is taller than the ScrollView, the attribute has no effect.

你可能感兴趣的:(android,achartengine)