문제

I need to update my menu. I have a fragment which is created from activity. In that activity, I have an asynchronous method which fetches an object.

It is based on this method that I need to update the menu. At all time, I'm using fragments, I am using onPrepareOptionsMenu method but its not working. This is because when onPrepareOptionsMenu is first called, the object is not yet fetched from the server.

I'm trying to use invalidateMenuOption but i'm getting "Call requires API level 11 (current min is 8): android.app.Activity#invalidateOptionsMenu". When I set the API Level to 11, invalidateMenuOption does the job

Is there any turnaround for API Level 8

도움이 되었습니까?

해결책

Better use Android Support library and then try this. Sure it will work.

http://developer.android.com/tools/support-library/setup.html

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top