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