Enable/disable an activity programmatically

前端 未结 4 1559
被撕碎了的回忆
被撕碎了的回忆 2020-12-06 01:30

I have an activity in in my app which I have kept as

android:enabled=\"false\"

now I want that when a button is clicked it should get chan

4条回答
  •  天涯浪人
    2020-12-06 02:08

    Use PackageManager and setComponentEnabledSetting() to enable or disable any component within your app: activity, service, etc.

提交回复
热议问题