6
voglio nascondere dicelayout (dicelout era in mainboardlinear) ma quando l'animazione è finita lo schermo lampeggiava a causa di View.GONE! se ho impostato setfillafter su true e clear View.GONE, non ho più il problema flash ma la mia scrollview in mainboardlinear non può essere scorsa in questo caso!Nascondere la vista con animazione e impostare la visibilità su andato senza flash sullo schermo
final RelativeLayout rLayout=(RelativeLayout)findViewById(R.id.dicelayout);
Animation animation=new TranslateAnimation(0, 0, 0, -rLayout.getHeight());
animation.setFillAfter(false);
animation.setFillBefore(true);
animation.setDuration(1000);
((LinearLayout)findViewById(R.id.mainboardlinear)).startAnimation(animation);
Thread t=new Thread(new Runnable() {
public void run() {
try {
Thread.sleep(999);
runOnUiThread(new Runnable() {
public void run() {
rLayout.setVisibility(View.GONE);
}
});
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
t.start();