Is there an easy way to add a border to the top and bottom of an Android View?

后端 未结 24 2866
盖世英雄少女心
盖世英雄少女心 2020-11-22 13:36

I have a TextView and I\'d like to add a black border along its top and bottom borders. I tried adding android:drawableTop and android:drawableBottom

24条回答
  •  礼貌的吻别
    2020-11-22 14:11

    // Just simply add border around the image view or view
    
    
    
    // After that dynamically put color into your view or image view object
    
    objView.setBackgroundColor(Color.GREEN);
    
    //VinodJ/Abhishek
    

提交回复
热议问题