Android Open Source - RadiusDev New Contact






From Project

Back to project page RadiusDev.

License

The source code is released under:

MIT License

If you think the Android project RadiusDev listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.example.radiusdev;
//w ww .  j  av  a2  s  .  com
import java.util.HashMap;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

public class NewContact extends Activity {

  EditText firstName;
  EditText lastName;
  EditText phoneNumber;
  EditText emailAddress;
  
  DBHelper dbTools = new DBHelper(this);
  
  public void onCreate(Bundle savedInstanceState){
    
    super.onCreate(savedInstanceState);
    setContentView(R.layout.add_new_contact);
    
    firstName = (EditText) findViewById(R.id.firstName);
    lastName = (EditText) findViewById(R.id.lastName);
    phoneNumber = (EditText) findViewById(R.id.phoneNumber);
    emailAddress = (EditText) findViewById(R.id.emailAddress);
    
  }
  
  public void addNewContact(View view){
    
    HashMap<String, String> queryValuesMap = new HashMap<String, String>();
    
    queryValuesMap.put("firstName", firstName.getText().toString());
    queryValuesMap.put("lastName", lastName.getText().toString());
    queryValuesMap.put("phoneNumber", phoneNumber.getText().toString());
    queryValuesMap.put("emailAddress", emailAddress.getText().toString());
    
    dbTools.insertContact(queryValuesMap);
    
    this.callMainActivity(view);
  }

  private void callMainActivity(View view) {
    // TODO Auto-generated method stub
    Intent theIntent = new Intent(getApplication(), CustomizedListView.class);
    startActivity(theIntent);
    
  }
  
}




Java Source Code List

com.example.radiusdev.AppPreferenceActivity.java
com.example.radiusdev.ArrayAdapter.java
com.example.radiusdev.Contact.java
com.example.radiusdev.CustomizedListView.java
com.example.radiusdev.DBHelper.java
com.example.radiusdev.DisplayAbout.java
com.example.radiusdev.DisplayContactList.java
com.example.radiusdev.DisplayMapContacts.java
com.example.radiusdev.DisplayUserInfo.java
com.example.radiusdev.EditContact.java
com.example.radiusdev.EditUser.java
com.example.radiusdev.GPS.java
com.example.radiusdev.JSONparser.java
com.example.radiusdev.Login.java
com.example.radiusdev.MainActivity.java
com.example.radiusdev.Main.java
com.example.radiusdev.MapWrapperLayout.java
com.example.radiusdev.Map.java
com.example.radiusdev.NewContact.java
com.example.radiusdev.OnInfoWindowElemTouchListener.java
com.example.radiusdev.PreferencesHelper.java
com.example.radiusdev.Register.java
com.example.radiusdev.UserSettings.java
com.example.radiusdev.imageUploader.java