Ответ 1
TextView textView = (TextView)findViewById(R.id.myTxtView);
textView.setCompoundDrawablesWithIntrinsicBounds(
R.drawable.icon, //left
0, //top
0, //right
0);//bottom
В xml вы можете установить drawable влево, вправо, внизу или в верхней части текста в TextView. Есть ли способ установить/изменить этот код с помощью кода?
TextView textView = (TextView)findViewById(R.id.myTxtView);
textView.setCompoundDrawablesWithIntrinsicBounds(
R.drawable.icon, //left
0, //top
0, //right
0);//bottom