I have a custom ViewGroup that lays out numerous children (TextView,
ListView, TableLayout etc.) to be used in a PDF report. Some children are
defined in XML and some are created programmatically, all are sized using
pixel units. All children are populated with data gathered by the app. The
generated PDF looks fine, see attachment pdfReport.png
Now I want to display the custom viewgroup in an activity. However, when
displayed on screen the scaling is off (as expected), see attachment
screenReport.png
I was able to scale by doing this
@Override
protected void onDraw(Canvas canvas) {
canvas.scale(2, 2);
super.onDraw(canvas);
}
However, now I cant seem to scroll my view. I tried adding to a
HorizontalScrollView but then the screen comes back blank. I am not doing
much in onMeasure other than calling super.onMeasure and
measureAllChildren.
Is there a different way to scale?
Once scaled, how do I get scrolling to work?
Any help is appreciated. Thank you.
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/130a8d1d-cc86-469a-b875-d7b1cce4ca45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.