android - How can I take values from EditText and sum them in array -


i have 2 edit-text example. wanna take value user entered on it. , sum them on array.

let code this.

edittext onevalue = (edittext)addview.findviewbyid(r.id.one); edittext twovalue = (edittext)addview.findviewbyid(r.id.two); 

if user entered 5 in onevalue, , 7 in twovalue. how can sum them in array ?

what mean "sum them in array"? if want add 2 values , add summed value in array can following:

int[] array = new int[10]; // size  int = integer.parseint(onevalue.gettext().tostring());  int b = integer.parseint(twovalue.gettext().tostring());  int c = + b;  array[0] = c; // position 

Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -