EditText using android studio 2021

Published: 30 September 2021
on channel: Fast Programming
879
37

EditText using android studio 2021 #android #app #development #short #how #coding #python #fast :


package com.example.tuto;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {
Button button ;
Toast toast ;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
button = findViewById(R.id.'put your button id here');
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(toast!=null)
toast.cancel();

toast = Toast.makeText(getApplicationContext(),"put your text here",Toast.LENGTH_SHORT);
toast.setGravity(Gravity.BOTTOM,0,50);
toast.show();
}
});
}
}


On this page of the site you can watch the video online EditText using android studio 2021 with a duration of hours minute second in good quality, which was uploaded by the user Fast Programming 30 September 2021, share the link with friends and acquaintances, this video has already been watched 879 times on youtube and it was liked by 37 viewers. Enjoy your viewing!