Repeat Image in with ImageView in RelativeLayout

后端 未结 4 636
灰色年华
灰色年华 2020-12-23 21:07

I want to repeat the image with ImageView with in RelativeLayout. Can it be possible to use the Bitmap xml and use tilemode \"repeat\"

4条回答
  •  北荒
    北荒 (楼主)
    2020-12-23 21:45

    In all requests exists one small problem if you image will be great and smaller what size your layout, image will not resize, only repeat by X. For repeat by Y you can do it only programmly.

    I solve my problem like this (set gravity fill)

    drawable bg for image

    
    
    

    and on layout

    
    
    
        
    
    
    

    And table_cells_bg_img it's image with width=1px and height = 1px

    and etc of layout, so now your image it's like background and it's will resized for any size of parent layout

    Try, maybe help. To be cleared in my case i need tiled background image to full size of tablecell repeated by X coordinate (like i can do it on iOS). So i solve it like i describe.

提交回复
热议问题