NinePatchDrawable.SetTargetDensity 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.
Overloads
SetTargetDensity(Canvas) |
Set the density scale at which this drawable will be rendered. |
SetTargetDensity(DisplayMetrics) |
Set the density scale at which this drawable will be rendered. |
SetTargetDensity(Int32) |
Set the density at which this drawable will be rendered. |
SetTargetDensity(Canvas)
Set the density scale at which this drawable will be rendered.
[Android.Runtime.Register("setTargetDensity", "(Landroid/graphics/Canvas;)V", "GetSetTargetDensity_Landroid_graphics_Canvas_Handler")]
public virtual void SetTargetDensity (Android.Graphics.Canvas canvas);
[<Android.Runtime.Register("setTargetDensity", "(Landroid/graphics/Canvas;)V", "GetSetTargetDensity_Landroid_graphics_Canvas_Handler")>]
abstract member SetTargetDensity : Android.Graphics.Canvas -> unit
override this.SetTargetDensity : Android.Graphics.Canvas -> unit
Parameters
- canvas
- Canvas
The Canvas from which the density scale must be obtained.
- Attributes
Remarks
Set the density scale at which this drawable will be rendered. This method assumes the drawable will be rendered at the same density as the specified canvas.
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.
See also
Applies to
SetTargetDensity(DisplayMetrics)
Set the density scale at which this drawable will be rendered.
[Android.Runtime.Register("setTargetDensity", "(Landroid/util/DisplayMetrics;)V", "GetSetTargetDensity_Landroid_util_DisplayMetrics_Handler")]
public virtual void SetTargetDensity (Android.Util.DisplayMetrics metrics);
[<Android.Runtime.Register("setTargetDensity", "(Landroid/util/DisplayMetrics;)V", "GetSetTargetDensity_Landroid_util_DisplayMetrics_Handler")>]
abstract member SetTargetDensity : Android.Util.DisplayMetrics -> unit
override this.SetTargetDensity : Android.Util.DisplayMetrics -> unit
Parameters
- metrics
- DisplayMetrics
The DisplayMetrics indicating the density scale for this drawable.
- Attributes
Remarks
Set the density scale at which this drawable will be rendered.
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.
See also
Applies to
SetTargetDensity(Int32)
Set the density at which this drawable will be rendered.
[Android.Runtime.Register("setTargetDensity", "(I)V", "GetSetTargetDensity_IHandler")]
public virtual void SetTargetDensity (int density);
[<Android.Runtime.Register("setTargetDensity", "(I)V", "GetSetTargetDensity_IHandler")>]
abstract member SetTargetDensity : int -> unit
override this.SetTargetDensity : int -> unit
Parameters
- density
- Int32
The density scale for this drawable.
- Attributes
Remarks
Set the density at which this drawable will be rendered.
Java documentation for android.graphics.drawable.NinePatchDrawable.setTargetDensity(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.