在Android中,你可以使用TextView来显示文本。以下是一个例子:
1. 在XML布局文件中添加一个TextView:
```xml
android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World!" /> ``` 2. 在Java代码中找到并使用TextView: ```java TextView textView = findViewById(R.id.textView); textView.setText("Hello Android!"); ``` 这样就可以将文本显示在TextView上了。你可以在setText()方法中传入要显示的文本。