Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,814,481 Members 54,423 Now Online
XDA Developers Android and Mobile Development Forum

profile page edittext

Tip us?
 
WaitTobi
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 11
Join Date: Aug 2014
Location: Toronto,On
Default profile page edittext

I'm trying to have a profile page kinda of concept for one of my activities. I'm curious if this is the correct form to save the entered info and i would like it to stat whatever text they entered until next time they want to edit it ..

public class MainPage extends Activity implements OnClickListener,
OnItemSelectedListener {

TabHost th;
TextView Uotw, Aotw, Ds, Hmos, Eds, Cl;
Button go, Submit;
EditText Name, Email, Phone, Info;
@override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.main_page);
Name = (EditText) findViewById(R.id.etNameOfBusiness);
Email = (EditText) findViewById(R.id.etEmail);
Phone = (EditText) findViewById(R.id.etPhone);
Info = (EditText) findViewById(R.id.etAdditionalInfo);

Submit.setOnClickListener(new OnClickListener(){
@override
public void onClick(View v) {
// TODO Auto-generated method stub

{
Log.v("EditText", Name.getText().toString());
Log.v("EditText", Email.getText().toString());
Log.v("EditText", Phone.getText().toString());
Log.v("EditText", Info.getText().toString());

}



i didn't post the whole activity because to much code thats irrelevant to the question
 
Omarkoopa
Old
#2  
Junior Member
Thanks Meter 1
Posts: 3
Join Date: Jun 2014
Location: Algiers
Quote:
Originally Posted by WaitTobi View Post
I'm trying to have a profile page kinda of concept for one of my activities. I'm curious if this is the correct form to save the entered info and i would like it to stat whatever text they entered until next time they want to edit it ..

public class MainPage extends Activity implements OnClickListener,
OnItemSelectedListener {

TabHost th;
TextView Uotw, Aotw, Ds, Hmos, Eds, Cl;
Button go, Submit;
EditText Name, Email, Phone, Info;
@override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.main_page);
Name = (EditText) findViewById(R.id.etNameOfBusiness);
Email = (EditText) findViewById(R.id.etEmail);
Phone = (EditText) findViewById(R.id.etPhone);
Info = (EditText) findViewById(R.id.etAdditionalInfo);

Submit.setOnClickListener(new OnClickListener(){
@override
public void onClick(View v) {
// TODO Auto-generated method stub

{
Log.v("EditText", Name.getText().toString());
Log.v("EditText", Email.getText().toString());
Log.v("EditText", Phone.getText().toString());
Log.v("EditText", Info.getText().toString());

}



i didn't post the whole activity because to much code thats irrelevant to the question
 
WaitTobi
Old
#3  
Junior Member - OP
Thanks Meter 0
Posts: 11
Join Date: Aug 2014
Location: Toronto,On
Quote:
Originally Posted by Omarkoopa View Post
sorry maybe i was just rambling and not getting my real question across what I'm trying to do is have my edittexts to b able to save the info thats entered and stays there until a user would like to change it ..kind of like a profile pages you'd enter info and have it permanently save and can be viewed by other users .... i hope this make more sense
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes