Recently I changed a little bit of my app and for a reason I don't understand the "setTextColor" method seems that it no longer works.
In my XML, I have a listview and I programmatically add TextViews in this listView.
XML:
<LinearLayout
android:id="@+id/activity_game_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left|top"
android:orientation="vertical"
android:padding="7dp" >
</LinearLayout>
Java:
textView = new TextView(getContext());
textView.setText("some text");
textView.setTextSize(20f);
textView.setGravity(Gravity.CENTER);
textView.setTextColor(Color.BLACK);
textView.setTextAppearance(getContext(), android.R.style.TextAppearance_Medium);
addView(textView);
But this text is white whatever I do. Why?