开发者

getting error at " edittext.getText().toString() " inside a custom dialog

I am facing errors at the following places inside the custom dialogs that i hav created. Is is not possible to hav such functions inside a custom dialog??

final EditText x= (EditText)findViewById(R.id.edtLocationName);

String strTextValue = x.getText().toString(); //here

int x1 =geoLat.intValue()xt().t开发者_开发知识库oString(); //and here


you should use

dlgobject.x.getText().toString();

u may use dialog interface to access the contents of a dialog.


String strTextValue = x.getText().toString(); //here

^ Nothing seems wrong to me on this

int x1 = geoLat.intValue()xt().toString(); //and here

^ i think you should try int x1 = geoLat.intValue(xt).toString();

Hope that helped :)

Edit: Can you tell what errors you get?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜