Tip : view video in 2x to save time :-)
So here's a quick tutorial in which beginner can learn how they can implement their first text view and Button and add activity to the button . SO, when the user click on button it show a message in response to your OnClick.
in this video you will learn how to implement a button and text view within 5 min.
java Code:
package com.example.buttonapp;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
TextView textView;
Button button;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
textView.setText("Button app");
}
});
}
}
На этой странице сайта вы можете посмотреть видео онлайн Creating a Button and Text view : Android Cafe | Android Studio длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Android Cafe 23 Ноябрь 2019, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 120 раз и оно понравилось 8 зрителям. Приятного просмотра!