1. Sử dụng thư viện ngoài, cần thêm dependency sau trong build.gradle compile 'com.isseiaoki:simplecropview:1.1.4' 2. Trong xml file thêm thẻ sau <com.isseiaoki.simplecropview.CropImageView xmlns: custom = "http://schemas.android.com/apk/res-auto" android :id= "@+id/cropImageView" android :layout_width= "match_parent" android :layout_height= "match_parent" custom :scv_crop_mode= "square" custom :scv_frame_color= "@color/colorAccent" custom :scv_frame_stroke_weight= "1dp" custom :scv_guide_color= "@color/colorAccent" custom :scv_guide_show_mode= "show_on_touch" custom :scv_guide_stroke_weight= "1dp" custom :scv_handle_color= "@color/colorAccent" custom :scv_handle_show_mode= "show_always" custom :scv_handle_size= "12dp" custom :scv_min_frame_size= "@dimen/_100sdp"...
Nhận xét
Đăng nhận xét