首页 > 解决方案 > android布局中的设计问题

问题描述

我对 android studio 有问题。我根据需要在android studio中制作了我的textview的大小和颜色。其中的预览很好,但是当我在我的设备上运行它时,大小和颜色发生了变化。我该怎么办?

xml 部分在下面给出我的实际输出是具有默认大小和颜色的 textview

<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="cursive"
android:text="City Scanner"
android:layout_marginTop="50dp"
tools:textAlignment="center"
tools:textColor="@color/colorText"
tools:textSize="50sp"/>

查看文本视图的大小和颜色

标签: androidandroid-layout

解决方案


您应该做的第一件事是在您的物理设备上加载应用程序之前检查您在不同屏幕尺寸上的布局。您可以按照此处的说明更改屏幕尺寸。

有关支持不同屏幕尺寸的更多详细信息,请阅读此处

在此处输入图像描述


推荐阅读