Creating a Button and Text view : Android Cafe | Android Studio

Publicado em: 23 Novembro 2019
no canal de: Android Cafe
120
8

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");
}
});
}
}


Nesta página do site você pode assistir ao vídeo on-line Creating a Button and Text view : Android Cafe | Android Studio duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Android Cafe 23 Novembro 2019, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 120 vezes e gostou 8 espectadores. Boa visualização!