Advertisement
asgargg

Untitled

Sep 9th, 2019
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. package com.example.ulangansatu;
  2.  
  3. import androidx.appcompat.app.AppCompatActivity;
  4.  
  5. import android.os.Bundle;
  6. import android.widget.TextView;
  7.  
  8. public class ResultActivity extends AppCompatActivity {
  9. private TextView typeTextView;
  10. private TextView resultTextView;
  11.  
  12. @Override
  13. protected void onCreate(Bundle savedInstanceState) {
  14. super.onCreate(savedInstanceState);
  15. setContentView(R.layout.activity_result);
  16. typeTextView = findViewById(R.id.tvType);
  17. resultTextView = findViewById(R.id.tvResult);
  18. RetrieveValues();
  19. }
  20.  
  21. private void RetrieveValues() {
  22. Bundle extras = getIntent().getExtras();
  23. String type = extras.getString("calcType");
  24. String result = extras.getString("hasil");
  25. typeTextView.setText(type);
  26. resultTextView.setText(result);
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement