[Solved] why use menu.findItem() and not findViewByID alone?

[ad_1]

The difference is that the second line refers to menu to find its item and the first finds view in activity layout

Doc for the first line: https://developer.android.com/reference/android/app/Activity.html#findViewById(int)

Doc for the second line:
https://developer.android.com/reference/android/view/Menu.html#findItem(int)

[ad_2]

solved why use menu.findItem() and not findViewByID alone?