How to set text to a Text View.
Today you are going to set a text to a text view.
Step 1:
- Open Android Studio.
- Create new project.
Step 2:
Let do some code.
- Below this line " setContentView(R.layout.activity_main); "
- Start typing.
TextView textView = (TextView) findViewById(R.id.text);
textView.setText("My New Text");
Step 6 :
- Click on Save button from Toolbar.
- Click on Run.
- Select Android Virtual Device(AVD).
- Click Ok.
Step 7 :







No comments:
Post a Comment