Display.GetSuggestedFrameRate(DisplayFrameRateCategory) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the display-defined frame rate given a descriptive frame rate category.
[Android.Runtime.Register("getSuggestedFrameRate", "(I)F", "GetGetSuggestedFrameRate_IHandler", ApiSince=36)]
public virtual float GetSuggestedFrameRate(Android.Views.DisplayFrameRateCategory category);
[<Android.Runtime.Register("getSuggestedFrameRate", "(I)F", "GetGetSuggestedFrameRate_IHandler", ApiSince=36)>]
abstract member GetSuggestedFrameRate : Android.Views.DisplayFrameRateCategory -> single
override this.GetSuggestedFrameRate : Android.Views.DisplayFrameRateCategory -> single
Parameters
- category
- DisplayFrameRateCategory
either #FRAME_RATE_CATEGORY_NORMAL
or #FRAME_RATE_CATEGORY_HIGH
Returns
- Attributes
Remarks
Gets the display-defined frame rate given a descriptive frame rate category.
For example, an animation that does not require fast render rates can use the #FRAME_RATE_CATEGORY_NORMAL
to get the suggested frame rate.
{@code
float desiredMinRate = display.getSuggestedFrameRate(FRAME_RATE_CATEGORY_NORMAL);
surface.setFrameRate(desiredMinRate, Surface.FRAME_RATE_COMPATIBILITY_DEFAULT);
}
</p>
Java documentation for android.view.Display.getSuggestedFrameRate(int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.