我有一个椭圆形的背景下按钮,它看起来并不像一个完美的圆,我可以在每circunfrence距离“休息”注意到,这是它的外观安卓:椭圆形不妙
背景:
<shape android:shape="oval"
xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="#7eadb6"/>
<size android:height="80dp"
android:width="80dp"/>
编辑:创建按钮
static Button theButton1;
final LinearLayout.LayoutParams params = new LinearLayout.LayoutParams
(80, 80);
theButton1 = new Button(getActivity());
theButton1.setBackgroundResource(R.drawable.subject_button);
theButton1.setLayoutParams(params);
theButton1.setTextColor(Color.parseColor("#ffffff"));
theButton1.setTextSize(23);
theButton1.setText(prefs.getString("text1", "").substring(0, 1));
theButton1.setOnClickListener(this);
这是正常的吗?如果不是我该如何解决它?
注:我有一个以上的按钮,这样
为什么选择Java?难道你只是将它设置为xml布局? –
这是什么原因造成的? –
您可以改用图片。 –