Advertisement
angeloeboy10

blablabla

Feb 19th, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.00 KB | None | 0 0
  1. package com.example.register;
  2.  
  3. import android.content.Context;
  4. import android.content.SharedPreferences;
  5. import android.support.v7.app.AppCompatActivity;
  6. import android.os.Bundle;
  7. import android.widget.EditText;
  8. import android.widget.TextView;
  9.  
  10. import org.w3c.dom.Text;
  11.  
  12. public class loginSuccesful extends AppCompatActivity {
  13.  
  14.     TextView email, username;
  15.     String txtEmail, txtUsername;
  16.  
  17.     @Override
  18.     protected void onCreate(Bundle savedInstanceState) {
  19.         super.onCreate(savedInstanceState);
  20.         setContentView(R.layout.activity_login_succesful);
  21.  
  22.         email = (TextView) findViewById(R.id.emailContainer);
  23.         username = (TextView) findViewById(R.id.usernameContainer);
  24.  
  25.         SharedPreferences sharedP = getSharedPreferences("UserInformation", Context.MODE_PRIVATE);
  26.  
  27.         txtEmail = sharedP.getString("EMAIL", "");
  28.         txtUsername = sharedP.getString("USERNAME", "");
  29.  
  30.         email.setText(txtEmail);
  31.         username.setText(txtUsername);
  32.  
  33.  
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement