在布局的图形视图中,当我从下图所示的按钮中选择 API 15 或更低版本时,圆圈按钮中的文本看起来不错。
当我选择 API 17 时,即使 xml 代码相同,文本也会被替换。更改按钮填充没有帮助。
这只是 Eclipse 的问题还是 Android 的新版本可能会看到这种被替换的文本?
解决这个问题的解决方法是什么?
XML代码:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".HomeActivity" >
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_margin="3dp" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="100dp"
android:src="@drawable/label" />
</LinearLayout>
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/linearLayout1"
android:layout_below="@+id/linearLayout1"
android:layout_marginTop="20dp"
android:text="@string/about_title"
android:textSize="20sp" />
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView1"
android:layout_alignRight="@+id/linearLayout1"
android:layout_below="@+id/textView1"
android:layout_marginTop="5dp"
android:text="@string/temp" />
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView2"
android:layout_alignRight="@+id/textView2"
android:layout_below="@+id/textView2"
android:layout_marginTop="20dp"
android:baselineAligned="false" >
<Button
android:id="@+id/button1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/news" />
<Button
android:id="@+id/button2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/tournaments" />
<Button
android:id="@+id/button3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/results" />
</LinearLayout>
android:gravity="center"
没有帮助
我重新启动了eclipse两次。奇怪的是,它在第一次重新启动时没有帮助,但在第二次重新启动后看起来很好。此外,它在设备上运行良好。
对这个问题表示歉意,我一定是在发布问题之前等待的。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)