loginBtn.setOnClickListener(this) here `loginBtn` ...
# android
k
loginBtn.setOnClickListener(this) here
loginBtn
is from the xml via android extentions
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setOnClickListener(android.view.View$OnClickListener)' on a null object
r
Where are you doing this at? I believe this happens when you call it to early,
k
on the onCreateView of the Fragment
r
yea thats to early
k
so where to set it
r
The view needs to already be created
onViewCreated
try that
k
okay
It worked!! Thanks a ton
r
no prob dude