Android Question Scrollview not filling up from iconbutton click.

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi Guys,
I have two activities one with normal buttons and another with iconbuttons.
On click of both one common activity opens and loads scrollview.
On clicking normal buttons the scrollview loads properly,
while clicking iconbutton it gives error.

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference

One thing if i put a breakpoint where scrollview is filled it gets loaded from iconbutton also.

I guess the problem is in iconbuttons.

Can anyone guide please?

Note-:I have added iconbuttons from designer, I am initialising iconbuttons to get click event. It is showing warning you should not initialize as you have added them from designer.
 

DonManfred

Expert
Licensed User
Longtime User
Try the sample code of iconbutton. It is handling the click too but does not raise any error.

Try to reproduce your problem in a small project and post the project here
 
Upvote 0

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi DonManfred,

Thanks for your reply. i set the eventname property(i forgot earlier) now it fires click event without initializing it.
After a lot of checking it looks like the problem is in clCheckList Class.

ScrollView fails to initialize always in release mode.In debug mode it works sometimes.

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference

I have started a new thread for it.

Pls have a look

Thanks
Juzer
 
Upvote 0
Top