Android TextView drawable, change padding between drawable and text?
I am creating a TextView with a drawable underneath, in a GridLayout . I want to bring the drawable to the middle of the TextView ; I tried with setCompoundDrawablePadding(-75) and it only changes the position of the text. Current code: TextView secondItem = new TextView(this); GridLayout.LayoutParams second = new GridLayout.LayoutParams(row2, col1); second.width = halfOfScreenWidth; second.height = (int) (quarterScreenWidth * 1.5); secondItem.setLayoutParams(second); secondItem.setBackgroundResource(R.color.MenuSecond); secondItem.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, 0, R