TextView myTextView = new TextView(context); myTextView.setText("Hello, World!");
In this example, the text color is set to red (hex value #FF0000). The android.widget.TextView class is part of the android.widget package library, which provides a collection of UI components for building Android apps.