Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.myapplication0710;
- import androidx.appcompat.app.AppCompatActivity;
- import android.content.Intent;
- import android.os.Bundle;
- import android.view.View;
- import android.widget.Button;
- import android.widget.Toast;
- public class MainActivity2 extends AppCompatActivity {
- Button btnBack;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main2);
- btnBack=findViewById(R.id.btnBack);
- Intent intent= this.getIntent();
- int c=intent.getIntExtra("COUNT_VALUE",-1);
- btnBack.setText(c+"");
- Toast.makeText(this, c+"", Toast.LENGTH_LONG).show();
- }
- public void clickMe(View view) {
- //Intent intent = new Intent(this, MainActivity.class);
- //startActivity(intent);
- finish();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement