-1

I am working on an application that have use internet.

What i want to do if connection available than option menu showing if not than hide specific menu. & when internet available application show all menu item.

RaRa
  • 2,024
  • 1
  • 18
  • 29
  • You need to implement Broadcast receiver [Try this](https://stackoverflow.com/questions/15698790/broadcast-receiver-for-checking-internet-connection-in-android-app) – Vikash Rathore Feb 10 '22 at 13:21

1 Answers1

0

You can try this. removeItem
You just have to pass an Id of your menu item that wants to hide. Add item again whenever you want.

vishalk
  • 659
  • 1
  • 4
  • 12