how to set background drawable programmatically in android
layout.setBackground(ContextCompat.getDrawable(context, R.drawable.ready));
Source: stackoverflow.com
android studio setbackground
RelativeLayout layout =(RelativeLayout)findViewById(R.id.background); layout.setBackgroundResource(R.drawable.ready);
Source: stackoverflow.com
set background drawable programmatically android
textView.setBackground(ContextCompat.getDrawable(MainActivity.this, R.drawable.cellborder));
Source: stackoverflow.com