Resources.GetFraction(Int32, Int32, Int32) Resources.GetFraction(Int32, Int32, Int32) Method

Definition

Retrieve a fractional unit for a particular resource ID.

[Android.Runtime.Register("getFraction", "(III)F", "GetGetFraction_IIIHandler", ApiSince=3)]
public virtual float GetFraction (int id, int base, int pbase);
abstract member GetFraction : int * int * int -> single
override this.GetFraction : int * int * int -> single

Parameters

id
Int32 Int32

The desired resource identifier, as generated by the aapt tool. This integer encodes the package, type, and resource entry. The value 0 is an invalid identifier.

base
Int32 Int32

The base value of this fraction. In other words, a standard fraction is multiplied by this value.

pbase
Int32 Int32

The parent base value of this fraction. In other words, a parent fraction (nn%p) is multiplied by this value.

Returns

Exceptions

Throws NotFoundException if the given ID does not exist.

Remarks

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.

Applies to