java - Why can I not use a method to set text for a generic EditText? -


in couple of places in code, i've used method set text of view instead of directly setting it. mean rather doing:

edittext.settext(mystring); 

i've used method follows:

public void settext(edittext edittext, string mystring) {      edittext.settext(mystring); } 

(obviously looks little superfluous; used check properties of string may have impact on how set text in cases.)

using method way not seem set text. why this?

thanks!

get id of element , set . example

 edittext edittext=(edittext)findviewbyid(r.id.edittext_from_example);  edtitext.settext("string"); 

further more, if want can write seperate methods

it doesnt know edittext set string.


Comments

Popular posts from this blog

php - Magento - Deleted Base url key -

javascript - Tooltipster plugin not firing jquery function when button or any click even occur -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -