1

Consider a LinearLayout with some UI items and a TChart. If I put this layout inside a ScrollViewer I would expect scrolling behavior. However, it seems that the chart auto-sizes itself to fit in the available space.

How can I make my layout scrollable when adding a chart to it?

l33t
  • 18,692
  • 16
  • 103
  • 180
  • You need to include your layout file to know for sure. I suspect you may have your layout width and height attributes set to "fill_parent", which would fill the available space. – Booger Dec 20 '12 at 12:51

1 Answers1

0

You should have you root tag as scrollview like this:

<?xml version="1.0" encoding="utf-8"?>
<ScrollView>
<LinearLayout 
android:orientation="vertical">
here will come your all UI items
</LinearLayout>
TChart
</ScrollView>

or

<?xml version="1.0" encoding="utf-8"?>
<ScrollView>
<LinearLayout 
android:orientation="vertical">
here will come your all UI items
TChart
</LinearLayout>
</ScrollView>

You can also download and embbeded chart widget which is available as an external widget. and is not available as an inbuilt widget in android project.

Ankit Dhadse
  • 1,566
  • 1
  • 15
  • 19