CustomDialog 内に単純な View があります。
public class ColorPickerDialog extends Dialog
{
private static class ColorPickerView extends View
{
ColorPickerView(Context c, int color)
{
super(c);
//...
}
@Override
protected void onDraw(Canvas canvas) {
//...
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
setMeasuredDimension(CENTER_X*2, CENTER_Y*2);
}
}
public ColorPickerDialog(Context context,
int initialColor) {
super(context);
mInitialColor = initialColor;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(new ColorPickerView(getContext(), mInitialColor));
}
}
このビューに SeekBar を追加するには?