Skip to content

ImageViewDemo.ag

xu_whale edited this page Sep 7, 2020 · 1 revision

copy下面代码,运行试试

ui {
   
        ImageView("https://hbimg.huabanimg.com/7c41bc5871d74c9036932ca9bba76de363727be113b6fd-NApej6_fw658")
        .width(100)
        .height(50)
        .contentMode(ContentMode.SCALE_ASPECT_FILL)
        ,
        ImageView()
        .width(50).height(50)
        .contentMode(ContentMode.SCALE_ASPECT_FILL)
        .setCornerImage("https://hbimg.huabanimg.com/7c41bc5871d74c9036932ca9bba76de363727be113b6fd-NApej6_fw658",
                        "https://hbimg.huabanimg.com/973de16798446890fc3b5f55a978db53c36059e619f83-5eeIuJ_fw658",
                        50, RectCorner.ALL_CORNERS)
        ,
        ImageView()
        .width(50).height(50)
        .setImageWithCallback("https://hbimg.huabanimg.com/7c41bc5871d74c9036932ca9bba76de363727be113b6fd-NApej6_fw658",
                              "https://hbimg.huabanimg.com/973de16798446890fc3b5f55a978db53c36059e619f83-5eeIuJ_fw658",
                              function(success, error, imgURL)
                                  print(success, error, imgURL)
                              end)
    
}

---
--- previews
function preview()
end
Clone this wiki locally