1

I want to know if it is possible to create a progress bar that is created in a class that extends from the class View?

My intention is to add a progress bar in my animation, using the "On a View" structure for creating animations in android:

http://developer.android.com/guide/topics/graphics/index.html

I tried with the fallowing way, in the view class, but it didn't appear.

public class CustomDrawableView extends View {
    private ProgressBar mProgress;

    public CustomDrawableView(Context context) {
        super(context);
        mProgress = new ProgressBar(context, null, android.R.attr.progressBarStyleSmall);
    }

    protected void onDraw(Canvas canvas) {
        mProgress.draw(canvas);
    }
}

Any suggestion?

Greetings

andrestoga
  • 619
  • 3
  • 9
  • 19

1 Answers1

-3

try this Image in Canvas with touch events

Community
  • 1
  • 1