Android Viewflipper Black Screen before last View
<p>Having some difficulty with a viewflipper atm. If I set the viewflipper to the last child view at the start it works and goes to the last view. If I set it to the first view and navigate through the views, it reaches a black screen before the final view.</p>

<pre><code>   flip=(ViewFlipper)findViewById(R.id.flipper);
     flip.setInAnimation(this,android.R.anim.fade_in);
     flip.setOutAnimation(this, android.R.anim.fade_out);
     curdate.setText(currentDate);

     next.setOnClickListener(new View.OnClickListener(){ 
         public void onClick(View view){
             flip.setDisplayedChild(1);
         }
     });
     next1.setOnClickListener(new View.OnClickListener(){ 
         public void onClick(View view){
             flip.setDisplayedChild(2);

         }
     });
     next2.setOnClickListener(new View.OnClickListener(){ 
         public void onClick(View view){

             flip.setDisplayedChild(3);
         }
     });
     previous.setOnClickListener(new View.OnClickListener(){ 
         public void onClick(View view){
             flip.setDisplayedChild(0);
         }
     });
     previous1.setOnClickListener(new View.OnClickListener(){ 
         public void onClick(View view){
             flip.setDisplayedChild(1);
         }
     });
     previous2.setOnClickListener(new View.OnClickListener(){ 
         public void onClick(View view){
             flip.setDisplayedChild(2);
         }
     });
</code></pre>

<p>As above, the last view should be 3, and if I put flip.setDisplayedCHild(3) before the onClickListeners, it goes to the end and works, but going through normally, it just reaches a black screen.</p>

<p>My xml code is a bit too long to show, but it consists of a ScrollView,a LinearLayout,then a ViewFlipper,and the ViewFlipper's views are all TableLayouts.</p>

<p>Appreciate any help</p>
