Answer the question
In order to leave comments, you need to log in
How to add View components to ScrollView?
There is a screen with .xml markup.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/www2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:id="@+id/www1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
</LinearLayout>
</ScrollView>
</LinearLayout>
public class Ticket extends View
{
public Ticket(Context context)
{
super(context);
}
@Override
public void onDraw(Canvas canvas)
{
Bitmap image = BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher);
canvas.drawBitmap(image, 40, 80, null);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question