Layout.GetOffsetForHorizontal(Int32, Single) 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.
Get the character offset on the specified line whose position is closest to the specified horizontal position.
[Android.Runtime.Register("getOffsetForHorizontal", "(IF)I", "GetGetOffsetForHorizontal_IFHandler")]
public virtual int GetOffsetForHorizontal(int line, float horiz);
[<Android.Runtime.Register("getOffsetForHorizontal", "(IF)I", "GetGetOffsetForHorizontal_IFHandler")>]
abstract member GetOffsetForHorizontal : int * single -> int
override this.GetOffsetForHorizontal : int * single -> int
Parameters
- line
- Int32
The zero-based index of the line.
- horiz
- Single
The horizontal pixel position to locate on the line.
Returns
The text offset whose position on the line is closest to horiz.
- Attributes
Remarks
Get the character offset on the specified line whose position is closest to the specified horizontal position.
Java documentation for android.text.Layout.getOffsetForHorizontal(int, float).
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.