Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.ulangansatu;
- import androidx.appcompat.app.AppCompatActivity;
- import android.os.Bundle;
- import android.widget.TextView;
- public class ResultActivity extends AppCompatActivity {
- private TextView typeTextView;
- private TextView resultTextView;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_result);
- typeTextView = findViewById(R.id.tvType);
- resultTextView = findViewById(R.id.tvResult);
- RetrieveValues();
- }
- private void RetrieveValues() {
- Bundle extras = getIntent().getExtras();
- String type = extras.getString("calcType");
- String result = extras.getString("hasil");
- typeTextView.setText(type);
- resultTextView.setText(result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement