java如何从其他类的编辑文本中使用自定义值在画布中绘制矩形
我需要画布自定义视图的帮助。 我需要使用用户提供的自定义值绘制建筑图
提供的信息类别:
et1 = findViewById(R.id.editTextNumberDecimalTest3);
et2 = findViewById(R.id.editTextNumberDecimal2);
帆布画
protected void onDraw (Canvas canvas)
{
mRectSquare.top = 100;
mRectSquare.left = 100;
mRectSquare.right = mRectSquare.left + 500;
mRectSquare.bottom = mRectSquare.top + 200;
setBackgroundColor(Color.TRANSPARENT);
canvas.drawRect(mRectSquare, mPaintSquare);
}
我需要将数据从“Et1”发送到“mRectSquare.right”,以创建化妆室大小 但是我不能使用intent,因为类扩展视图不能使用GetIntent。 有什么想法吗
共 (0) 个答案