メモ:
・Button(あるいは一般にView)を角丸にするには一工夫必要
・Shapeを別途定義し、Backgroundに設定することで角丸にできる
//Buttonの宣言 val button = Button(this) //Shapeの定義 val shape = GradientDrawable() shape.shape = GradientDrawable.RECTANGLE shape.setColor(Color.parseColor("#FF0000")) //角丸の半径 shape.cornerRadius = 30f //ShapeをButtonのbackgroundに設定 button.setBackground(shape) layout.addView(button)