So I have a LinearLayout
then inside is a ScrollView
then inside is another RelativeLayout
and finally inside is another LinearLayout
with id mylinearlayout
.
I want to create TextView's
dynamically it works fine, but the text seems to be disabled like GRAY
color. Although i didn't set any color..
Here's my code:
final LinearLayout linlayout = (LinearLayout) findViewById(R.id.mylinearlayout);
final TextView tv = new TextView(getApplicationContext());
tv.setTextSize(20);
tv.isEnabled();
tv.setGravity(Gravity.CENTER);
if(orderstatus.equals("Pending")) {
tv.setText("OrderID: "+orderid + "\n"+"OrderDate: " + orderdate + "\n" +"OrderStatus: "+orderstatus + " \n\n");
tv.setId(i + 5);
linlayout.addView(tv);
}