0

我的秒表应用程序内部不断重叠,我在线性布局和 Chronomemeter 的背景中添加了 XML 的背景,但它继续存在

    <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:padding="4dip"
android:gravity="center_horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ff000000">

<Chronometer
    android:id="@+id/chronometer"
    android:layout_width="wrap_content"
    android:layout_height="0dip"
    android:layout_weight="0"
    android:background="#ff000000"
    android:format="@string/chronometer_initial_format"
    android:freezesText="false"
    android:paddingBottom="30dip"
    android:paddingTop="30dip" />

<Button android:id="@+id/start"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Start">
    <requestFocus />
</Button>

<Button android:id="@+id/stop"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Stop">
</Button>

<Button android:id="@+id/reset"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Reset">
</Button>

</LinearLayout>

有任何想法吗?

4

1 回答 1

0

原来我必须把<string name="chronometer_initial_format">Initial format:</string>样式 xml 而不是字符串 xml

于 2013-11-10T22:30:13.170 回答