Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Bundle bundle = getIntent().getExtras();
- if(bundle != null)
- {
- String date = bundle.getString("date");
- txtDate.setText(date);
- }
- Bundle b = getIntent().getExtras();
- if(b != null)
- {
- String name = bundle.getString("name");
- txtName.setText("Create an event for:" +name);
- }
- buttonDate = (Button) findViewById(R.id.btnDate);
- buttonDate.setOnClickListener(new View.OnClickListener()
- {
- @Override
- public void onClick(View v)
- {
- Intent calIntent = new Intent(Create_Events.this, Calendar_Event.class);
- startActivity(calIntent);
- }
- });
- ContactsList.java -- the ListView of the names which is passed to the Create_Events page.
- Cursor cursor = null;
- cursor = (Cursor) l.getItemAtPosition(position);
- Intent intent = new Intent(ContactsList.this, Create_Events.class);
- intent.putExtra("name", cursor.getString(cursor.getColumnIndex(buddyDB.KEY_NAME)));
- startActivity(intent);
- private void SavePreferences(String key, String value)
- {
- SharedPreferences sharedPref = getSharedPreferences("MY_SHARED_PREF", MODE_PRIVATE);
- SharedPreferences.Editor editor = sharedPref.edit();
- editor.putString(key, value);
- editor.commit();
- }
- private void LoadPreferences()
- {
- SharedPreferences sharedPref = getSharedPreferences("MY_SHARED_PREF", MODE_PRIVATE);
- String name = sharedPref.getString("name", "");
- }
Add Comment
Please, Sign In to add comment