Android Studio 小部件、文本字段、大文本、中文本和小文本都丢失了,我只有普通文本,它提供了一个名称。我怎样才能得到它和其他人?

Android Studio Widget, Text Field, Large, Medium and Small Text is missing all I have is Plain which gives a Name. How can I get it and others?

我正在查看 Youtube 示例,我看到讲师有我没有的小部件,例如不同大小的文本字段和模拟时钟。

有什么地方可以获取更多的Widgets吗?

AndroidStudio 似乎发生了一些变化。最好的选择是进入 "Text" 模式并自己输入样式。对于前。如果您需要等效的 LargeText 视图,则添加一个 TextView 并移至文本模式并添加此行:

android:textAppearance="@style/?android:attr/textAppearanceLarge"

或者您也可以编辑 TextView 的属性。

单击位于“设计”选项卡左侧中间的“文本”选项卡,找到 TextView 元素并在其中输入以下代码行:

style="/?android:attr/textAppearanceLarge"

请记住,这行代码必须位于元素内才能正常工作。

转到属性,然后 select 文本外观和 select 应用程序。

combat.large

我使用以下方法获得了与 "tutorial" 相同的文本大小:

android:textAppearance="@style/TextAppearance.AppCompat.Large"

你应该添加这一行 android:textAppearance="@android:style/TextAppearance.Large" 单击位于设计选项卡中间左侧到右侧的设计选项卡附近的文本选项卡后,在 TextView 中。 但是您必须考虑首先需要将 TextView 从 Widgets 拖放到用户界面或设计部分。

使用这个:

android:text="Large Text"

android:textAppearance="?android:attr/textAppearanceLarge"

将它添加到您的 Textview 标签中。