gradientdrawable

GradientDrawable with OVAL shape not working inside programatically added Text View

房东的猫 提交于 2020-01-07 09:44:31
问题 I have programmatically added Text View and Button . Code final TextView test = new TextView(getApplicationContext()); test.setText(String.valueOf(counterQuantity)); test.setTextColor(getResources().getColor(R.color.black)); test.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 10); GradientDrawable border = new GradientDrawable(); border.setShape(GradientDrawable.OVAL); border.setStroke(1, getResources().getColor(R.color.black)); border.setCornerRadius(2); border.setColor(getResources().getColor(R

GradientDrawable with OVAL shape not working inside programatically added Text View

别说谁变了你拦得住时间么 提交于 2020-01-07 09:43:05
问题 I have programmatically added Text View and Button . Code final TextView test = new TextView(getApplicationContext()); test.setText(String.valueOf(counterQuantity)); test.setTextColor(getResources().getColor(R.color.black)); test.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 10); GradientDrawable border = new GradientDrawable(); border.setShape(GradientDrawable.OVAL); border.setStroke(1, getResources().getColor(R.color.black)); border.setCornerRadius(2); border.setColor(getResources().getColor(R