-2

我正在使用这段代码,但我仍然处于非常早期的阶段,但我正在从新波士顿的视频中学习,自从他发布他的教程以来,编码方面似乎没有什么改变

我正在输入此代码

 <button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Love"
    android:textSize="50sp" />

但它没有在按钮内制作“爱”字,该字保持按钮不变告诉我出了什么问题

4

2 回答 2

2

不是button,是Button。XML 标记指向框架中的 java 类。Java 是区分大小写的。

<Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Love"
    android:textSize="50sp" />
于 2013-10-19T18:00:10.850 回答
1

将“按钮”更改为“按钮”,区分大小写

<Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Love"
    android:textSize="50sp" />
于 2013-10-19T17:58:13.247 回答