title: Android layout only showing after oncreate method finishes
body: <p>I have created (what I thought was) a simple JAVA card game.  In JAVA, the game loads the layout (frame) and displays ImageButtons consisting of a square like cardholder image for each player.  The cardholders are then populated by random cards from the deck one by one.</p>
  
  <p>So, in my onCreate method in Android, my initial layout consists of the cards with the card holder image, and then I run a method in the onCreate method to deal the cards.  The problem I have is the initial layout doesn't show up at all.  What shows up is the final layout with the cardholders already populated.  The program doesn't even show them as they are individually being dealt  I considered that maybe I need to run AsyncTask but I really don't have any "major" instructions in my deal method which would seem to require it.</p>
  
  <p>I'm a relatively newbie to Android development and I guess I'm wondering, if something so simple is going to hang my original layout, where do main application instructions go if not in methods being called from the onCreate method?  Why isn't it as simple as merely displaying my original layout, and then continuing the UI thread with the updating of the cards one-by-one?</p>
  
  <p>UPDATE:</p>
  
  <p>Unfortunately, it still doesn't work.  My onCreate looks like this:</p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.activity_main);
              player1Card1B = (ImageButton) findViewById(R.id.p1C1Bref);
              player1Card2B = (ImageButton) findViewById(R.id.p1C2Bref);
              player1Card3B = (ImageButton) findViewById(R.id.p1C3Bref);
              player2Card1B = (ImageButton) findViewById(R.id.p2C1Bref);
              player2Card2B = (ImageButton) findViewById(R.id.p2C2Bref);
              player2Card3B = (ImageButton) findViewById(R.id.p2C3Bref);
              player3Card1B = (ImageButton) findViewById(R.id.p3C1Bref);
              player3Card2B = (ImageButton) findViewById(R.id.p3C2Bref);
              player3Card3B = (ImageButton) findViewById(R.id.p3C3Bref);
              player4Card1B = (ImageButton) findViewById(R.id.p4C1Bref);
              player4Card2B = (ImageButton) findViewById(R.id.p4C2Bref);
              player4Card3B = (ImageButton) findViewById(R.id.p4C3Bref);
  
              newDeckCard = (ImageButton) findViewById(R.id.newCardDeckBref);
              discardDeckCard = (ImageButton) findViewById(R.id.discardCardDeckBref);
              knockButton = (ImageButton) findViewById(R.id.knockBref);
  
              player1Card1B.setOnClickListener(this);
              player1Card2B.setOnClickListener(this);        
              player1Card3B.setOnClickListener(this);
              newDeckCard.setOnClickListener(this);
              discardDeckCard.setOnClickListener(this);
              knockButton.setOnClickListener(this);
      }
  
  and my onStart like this:
  
       @Override
      protected void onStart() {
          // TODO Auto-generated method stub
          super.onStart();
  
  
          shuffle();
          deal();
      }
  </code></pre>
  
  <p>I just get a white screen that reads "Main" and then eventually the cards are shown already populated.  I don't even get the placeholders that are read in the onCreate method.  When I remove the deal() method, the placeholder cards show up.  When I put it back, the placeholder cards don't show up and just the dealt cards show up.</p>