Source code: TrivialGameActivity.java

  LinearLayout ll = new LinearLayout(this);
  ll.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));  
  ll.setOrientation(android.widget.LinearLayout.VERTICAL);
  // ll.setBackgroundColor(0x88000000);
  ll.setBackgroundDrawable(getResources().getDrawable(R.drawable.background));
        
  LinearLayout.LayoutParams params1 = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,  
           LayoutParams.WRAP_CONTENT);  
  params1.topMargin = 2;
              
  TextView tv1 = new TextView(this);
  tv1.setLayoutParams(params1);       
  tv1.setText("Question #1");
  tv1.setTextSize(20);
  tv1.setTextColor (Color.WHITE);
  tv1.setPadding(10, 10, 10, 10);
  ll.addView(tv1);  

  TextView tv2 = new TextView(this);
  tv2.setLayoutParams(params1);       
  tv2.setText(USER_NAME+" what is the capital of Oklahoma?");
  tv2.setTextColor (Color.WHITE);
  tv2.setTextSize(15);
  tv2.setPadding(10, 10, 10, 10);
  ll.addView(tv2);  

  setContentView (ll);