Android Text View [closed]
I am creating a pop up window in click event,inside that pop up window there are text view and Button... If i create a Id in XML and set the text by TextView txt=(TextView)findViewById(R.id.text)
txt.setText("Message");
I ma getting Null pointer Exception same for Button..
Pls
findViewById is relative to the parent. if you call it from another window (popup) and not from activity, it won't find the R.id.text and return null.
精彩评论