Android Question .9patch, there's a problem with the expansion of the background image. Where's that wrong?

cxdzbl

Active Member
Licensed User
I put the map on the panel, can guarantee that the image without distortion, but the background of serious deformation, please enlighten.

B4X:
SetNinePatchDrawable (Panel, "msgstyle")
Sub SetNinePatchDrawable (Control, As, View, ImageName, As, String)
Dim R As Reflector
Dim package As String
Dim ID As Int
Package = r.GetStaticField ("anywheresoftware.b4a.BA", "packageName")
Id = r.GetStaticField (package &.R$drawable, ImageName)
R.Target = r.GetContext
R.Target = r.RunMethod ("getResources")
Control.Background = r.RunMethod2 ("getDrawable", "Id", "java.lang.int")
End Sub
 

Attachments

  • ){Z4P%HJ2(%W0JQZ}L6NJ_X.png
    36.1 KB · Views: 392
  • 20170829_215257.png
    97.3 KB · Views: 428

cxdzbl

Active Member
Licensed User
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…