SearchViewSample icon indicating copy to clipboard operation
SearchViewSample copied to clipboard

int width=myView.getWidth() on a null object reference

Open asqa opened this issue 6 years ago • 5 comments

iam trying to make app like what you done but i got some error "int width=myView.getWidth()" on a null object reference. How i can fix this?

asqa avatar Feb 02 '18 13:02 asqa

Your myView might be null

ItzNotABug avatar Feb 08 '18 04:02 ItzNotABug

i think so.. so what i should to do?

asqa avatar Feb 08 '18 09:02 asqa

check if the View you are passing does exist & is Right for e.g. Typo while typing IDs

ItzNotABug avatar Feb 08 '18 10:02 ItzNotABug

ok thanks..let me try first

asqa avatar Feb 08 '18 11:02 asqa

same problem here

Kelvao avatar Jul 10 '18 17:07 Kelvao