protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = getIntent();
String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);
int numAlpha = Integer.parseInt(intent.getStringExtra(MainActivity.alphaInteger));
int numRed = Integer.parseInt(intent.getStringExtra(MainActivity.redInteger));
int numGreen = Integer.parseInt(intent.getStringExtra(MainActivity.greenInteger));
int numBlue = Integer.parseInt(intent.getStringExtra(MainActivity.blueInteger));
TextView textView = new TextView(this);
textView.setText(message);
setContentView(textView);
textView.setTextColor(Color.argb(numAlpha, numRed, numGreen, numBlue));
}
I have an app where user can set ARGB and then TextView should be set to what user has defined. However, the text doesn't show up at all. When I remove the textView.setTextColor line, it starts showing again. I tested numAlpha, numRed, numGreen and numBlue with Log.v and they output everything correctly. What's the problem?
Thanks in advance.