I have some TextViews inside a LinearLayout. At runtime, the LinearLayout is visible, but none of the TextViews are. Here is the XML:
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.5384615384615385"
android:scaleType="fitXY"
android:adjustViewBounds="true">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
>
<TextView
android:id="@+id/onezero"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="one"
android:typeface="sans"
android:layout_weight="1"
android:layout_margin="17dp"
android:textIsSelectable="true"
android:clickable="true" />
<TextView
android:id="@+id/oneone"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="two"
android:typeface="sans"
android:layout_margin="17dp"
android:textIsSelectable="true"
android:clickable="true" />
<TextView
android:id="@+id/onefour"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="three"
android:layout_weight="1"
android:typeface="sans"
android:layout_margin="17dp"
android:textIsSelectable="true"
android:clickable="true" />
<TextView
android:id="@+id/other"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="four"
android:layout_margin="17dp"
android:typeface="sans"
android:layout_weight="1"
android:textIsSelectable="true"
android:clickable="true" />
</LinearLayout>
<ScrollView
android:id="@+id/scrollview1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical"
android:fillViewport="true">
<TextView
android:id="@+id/tv1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:typeface="sans"
android:textSize="17sp"
/>
</ScrollView>
</LinearLayout>
</FrameLayout>
How do I make them visible?
EDIT: Code that accesses this layout:
void fragment(){
ten.setTextColor(0xFFFFFF);//These are the 4 TextViews
eleven.setTextColor(0xFFFFFF);
fourteen.setTextColor(0xFFFFFF);
other.setTextColor(0xFFFFFF);
ten.setVisibility(View.VISIBLE);
eleven.setVisibility(View.VISIBLE);
fourteen.setVisibility(View.VISIBLE);
other.setVisibility(View.VISIBLE);
}
Code where I am initializing the textviews:
ten=(TextView)findViewById(R.id.onezero);
eleven=(TextView)findViewById(R.id.oneone);
fourteen=(TextView)findViewById(R.id.onefour);
other=(TextView)findViewById(R.id.other);
EDIT: I tried clicking on the LinearLayout area and the TextViews are registering clicks.. that means that they are there but invisible...
TextViews' background to red, now they are visible as red rectangles, but no text is visible inside them, additionally, they are registering clicks, that means the text is present, but somehow invisible . - vergil corleone