How to place AdView below the RecyclerView? Please see details

后端 未结 4 730
春和景丽
春和景丽 2021-01-17 02:33

I\'m developing an app in which some data is getting loaded from Firebase and is shown in the RecyclerView.

What I want is I want to show t

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-17 02:54

    You should use LinearLayout instead of RelativeLayout. In LinearLayout put ad at the bottom of the screen and let it occupy it's space and set layout_weight to your RecyclerView.

    
    
        
    
        
    
            
    
        
    
    
    

    And one more thing, don't set layout_height of AdView to match_parent, use wrap_content instead.

提交回复
热议问题