Android 为什么XML文本不';即使我';你改变了吗?
正如标题所说,我在一个名为“发布”的按钮上将大小改为24。然而,它坚持它的默认大小,我不知道。我将发布整个XML代码,以防有未知的东西我不知道。谢谢 如果有什么不同,我也会使用相对布局。这是一张gyazo的照片,因为我自己也喜欢人们在他们的问题中加入图片:Android 为什么XML文本不';即使我';你改变了吗?,android,layout,Android,Layout,正如标题所说,我在一个名为“发布”的按钮上将大小改为24。然而,它坚持它的默认大小,我不知道。我将发布整个XML代码,以防有未知的东西我不知道。谢谢 如果有什么不同,我也会使用相对布局。这是一张gyazo的照片,因为我自己也喜欢人们在他们的问题中加入图片: 您使用了错误的属性。 使用android:textSize=“24sp”,您的按钮应该会更改 <Button android:id="@+id/publishButton"
您使用了错误的属性。 使用android:textSize=“24sp”,您的按钮应该会更改
<Button
android:id="@+id/publishButton"
android:layout_width="297dp"
android:layout_height="66dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="128dp"
android:text="Publish"
android:textSize="24sp" />
检查java类,是否有可能以编程方式重写文本外观?
<Button
android:id="@+id/publishButton"
android:layout_width="297dp"
android:layout_height="66dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="128dp"
android:text="Publish"
android:textSize="24sp" />