Skip to content

Instantly share code, notes, and snippets.

@jobinjj
Created June 1, 2019 16:12
Show Gist options
  • Save jobinjj/1ce39fb958b2dbca06ad171c33bc1537 to your computer and use it in GitHub Desktop.
Save jobinjj/1ce39fb958b2dbca06ad171c33bc1537 to your computer and use it in GitHub Desktop.
package com.techpakka.sharedpreferences;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
Button btn_save,btn_load,btn_second;
EditText ed_name,ed_email;
TextView txt_name,txt_email;
String str_name,str_email;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//initialising layout components
btn_save = findViewById(R.id.btn_save);
btn_load = findViewById(R.id.btn_load);
btn_second = findViewById(R.id.btn_second);
txt_name= findViewById(R.id.txt_name);
txt_email= findViewById(R.id.txt_email);
ed_name = findViewById(R.id.ed1);
ed_email = findViewById(R.id.ed2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment