Code example for ImageView

Methods: setBackgroundResourcesetImageResource

0
            parent.addView(tab);
            parent.addView(text);
        } 
 
        void setIcon(int iconId) {
            tab.setImageResource(iconId);
        } 
 
        void setTabBackgroundResource(int tabId) {
            tab.setBackgroundResource(tabId);
        } 
 
        void setBarBackgroundResource(int barId) {
            text.setBackgroundResource(barId);
        } 
 
        void setHintText(int resId) {
            text.setText(resId);
        } 
 
Experience pair programming with AI  Get Codota for Java