Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/227.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 为什么XML文本不';即使我';你改变了吗?_Android_Layout - Fatal编程技术网

Android 为什么XML文本不';即使我';你改变了吗?

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

正如标题所说,我在一个名为“发布”的按钮上将大小改为24。然而,它坚持它的默认大小,我不知道。我将发布整个XML代码,以防有未知的东西我不知道。谢谢

如果有什么不同,我也会使用相对布局。这是一张gyazo的照片,因为我自己也喜欢人们在他们的问题中加入图片:


您使用了错误的属性。 使用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" />