Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.filip.ispit_android;
- import android.content.Intent;
- import android.support.v7.app.AppCompatActivity;
- import android.os.Bundle;
- import android.widget.TextView;
- public class Poslana_Poruka extends AppCompatActivity {
- private TextView tvBroj;
- private TextView tvPoruka;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_poslana__poruka);
- initWidgets();
- findIntent();
- }
- private void initWidgets() {
- tvBroj=findViewById(R.id.tvBroj);
- tvPoruka=findViewById(R.id.tvPoruka);
- }
- private void findIntent() {
- Intent broj = getIntent();
- if (broj !=null && broj.hasExtra(MainActivity.PHONE_NUMBER)){
- String brTelefona = broj.getStringExtra(MainActivity.PHONE_NUMBER);
- tvBroj.setText(brTelefona);
- }
- Intent poruka = getIntent();
- if (poruka !=null && poruka.hasExtra(MainActivity.TEXT_MESSAGE)){
- String textPoruke = poruka.getStringExtra(MainActivity.TEXT_MESSAGE);
- tvPoruka.setText(textPoruke);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement