jjzjj

getPaint

全部标签

android - 圆角 View 不平滑

看看下面我的代码。ShapeDrawableshapeDrawable=newShapeDrawable(newRectShape());shapeDrawable.getPaint().setColor(Color.parseColor("#5a2705"));shapeDrawable.getPaint().setStyle(Style.STROKE);shapeDrawable.getPaint().setAntiAlias(true);shapeDrawable.getPaint().setStrokeWidth(2);shapeDrawable.getPaint().setP

android - 如何在 Android 中以编程方式设置按钮边框颜色?

我想在Android中有一个按钮边框颜色不同的按钮。ButtonBt=newButton(this);Bt.setId(i+1);Bt.setBackgroundColor(getResources().getColor(R.color.white));Bt.setText(restList.get(i));Bt.setLayoutParams(params3);Bt.setTextColor(Color.parseColor("gray"));layout.addView(Bt);我如何以编程方式执行此操作? 最佳答案 yourB