'Activity.SetProgressBarIndeterminate(bool)' is obsolete

MichaelRumplerMichaelRumpler ATMember ✭✭✭✭✭

Do you also hate it when some API gets marked as obsolete without providing an alternative?
The ObsoleteAttribute takes a message as parameter which you can use to provide a new method which replaces the old or a link to a web page which explains it or whatever.

When I try to compile Xamarin.Forms.Platform.Android I get these errors:

\Xamarin.Forms\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs(413,4,413,37): error CS0618: 'Activity.SetProgressBarIndeterminate(bool)' is obsolete: 'deprecated'
\Xamarin.Forms\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs(449,4,449,49): error CS0618: 'Activity.SetProgressBarIndeterminateVisibility(bool)' is obsolete: 'deprecated'
\Xamarin.Forms\Xamarin.Forms.Platform.Android\FormsApplicationActivity.cs(245,5,245,38): error CS0618: 'Activity.SetProgressBarIndeterminate(bool)' is obsolete: 'deprecated'
\Xamarin.Forms\Xamarin.Forms.Platform.Android\FormsApplicationActivity.cs(314,4,314,49): error CS0618: 'Activity.SetProgressBarIndeterminateVisibility(bool)' is obsolete: 'deprecated'

Neither Xamarin nor Google provide any alternative and I couldn't find anything on the web either.

Does anybody know, what should be used instead?

Answers

  • MichaelRumplerMichaelRumpler ATMember ✭✭✭✭✭

    It seems like Xamarin doesn't know it either. In a newer branch they just disabled the warning (they treat warnings as errors, so it doesn't compile).

Sign In or Register to comment.