user3816094 user3816094 - 1 year ago 94
Java Question

Why findViewByID can call without super keyword

I'm new to java and android programming. As far as I know,

was defined on parent classes and I'm just curious about why
method can call without
keyword in child class.

Answer Source

Without overriding the findViewById method in the child class, super and this are equivalent.

The view that you are trying to find is in this class, not the super class.

You can do this.findViewById(), or ActivityName.this.findViewById() but that is just redundant.

Related question to ask: Why doesn't setContentView need a super?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download