Problem in Creating a View Dynamically ( in Android ) [Error : couldn't save which view ...]
<p>I'm trying to create a View dynamically (on click). Any person have any idea why this does not work. It just opens a blank (BLACK) screen. When i click back it moves to previous screen as well. And i need to know the way i'm trying to set the team is correct.</p>

<pre><code>public class Details extends Activity {

    protected void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        //setTheme(android.R.style.Theme_Dialog);

        TextView label = new TextView(this);  
        label.setText("Hello This text");  
        label.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
        label.setTextSize(20);        
        label.setGravity(Gravity.CENTER);

        TableRow tr = new TableRow(this);
        tr.addView(label);

        TableLayout tl = new TableLayout(this);
        tl.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
        tl.setGravity(Gravity.CENTER);
        tl.addView(tr);

        ScrollView sv = new ScrollView(this);
        sv.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
        sv.addView(tl);

        setContentView(sv);
    }       
}
</code></pre>

<p>There is an msg in LogCat as following</p>

<pre><code>couldn't save which view has focus because the focused view ##### has no id 
</code></pre>
