Replacing an ActionBar menu item icon with an indeterminate ProgressBar

后端 未结 6 1001
小蘑菇
小蘑菇 2020-12-30 02:29

I would like to add an indeterminate progress bar to the Honeycomb ActionBar, so that any time the user presses \"Refresh\", the refresh icon temporarily turns into an indet

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-30 03:06

    Hard to tell exactly how the Email app does it, but you may want to stay simple and just call setIcon with the id of a StateDrawable XML file, and then just change the state using a Timer.

提交回复
热议问题