Note that there are some explanatory texts on larger screens.

plurals
  1. POMultiple textviews are not shown in Linear layout
    primarykey
    data
    text
    <p>i try to develop a small Android app and i use fragments for tab feature. Here is my tab3's layout:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#FF0000" android:orientation="vertical" &gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/European_Central_Bank" /&gt; &lt;TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Türk Lirası: " /&gt; &lt;TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Dolar:" /&gt; &lt;TextView android:id="@+id/textView3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Japon Yeni:" /&gt; &lt;/LinearLayout&gt; </code></pre> <p>And this is the Java part:</p> <pre><code>public class Tab3Fragment extends Fragment { private String turkishLira; private String dollar; private String japaneseMoney; URL url; public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View myCreateView=(LinearLayout)inflater.inflate(R.layout.tab_frag3_layout, container, false); getCurrencyInfo(); TextView textView1 = (TextView) myCreateView.findViewById(R.id.textView1); TextView textView2 = (TextView) myCreateView.findViewById(R.id.textView2); TextView textView3 = (TextView) myCreateView.findViewById(R.id.textView3); textView1.setText(turkishLira); textView2.setText(dollar); textView3.setText(japaneseMoney); return myCreateView; } getCurrencyInfo() {...} } </code></pre> <p>The question is only the first textview is shown on the phone. If i swap the 1st and 2nd textview, this time 2nd textview which has a static content is shown. What am i missing? I don't have any problem in getCurrencyInfo method, i printed it's results. Thanks, in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload