According to what I\'ve read, you can use a gradientDrawable and have three colors set for it, for example:
It is not possible to do into a xml file, but you can apply +3 color gradient in yout java code with GradientDrawable class:
GradientDrawable gradientDrawable = new GradientDrawable(
Orientation.TOP_BOTTOM,
new int[]{ContextCompat.getColor(this, R.color.color1),
ContextCompat.getColor(this, R.color.color2),
ContextCompat.getColor(this, R.color.color3),
ContextCompat.getColor(this, R.color.color4)});
findViewById(R.id.background).setBackground(gradientDrawable);