Java ImageView没有';即使我将其设置为不可见,也不要将其自身设置为不可见
我正在开发一款纸牌游戏,我正在尝试在第二位玩家玩完他的牌后将其设置为不可见。 但即使我将ImageView设置为不可见,它也不会变为不可见。 这是我的密码:Java ImageView没有';即使我将其设置为不可见,也不要将其自身设置为不可见,java,android,Java,Android,我正在开发一款纸牌游戏,我正在尝试在第二位玩家玩完他的牌后将其设置为不可见。 但即使我将ImageView设置为不可见,它也不会变为不可见。 这是我的密码: case HAND_CHECK: // give winned cards to the winning player giocatoreGiocante =tavoloDaGioco.CalcoloMano(); if(giocator
case HAND_CHECK:
// give winned cards to the winning player
giocatoreGiocante =tavoloDaGioco.CalcoloMano();
if(giocatore1.GetCartaByIndex(0)==null&&giocatore2.GetCartaByIndex(0)==null){
gameState =GAME_STATE.CALCOLO_PUNTI;
}
else {
gameState = GAME_STATE.PESCA;
}
//playedCard is an ImageView
playedCard.setVisibility(View.INVISIBLE); //this is not execute
Log.d("PUNTI", "GIOCATORE1="+giocatore1.GetPunti()+"GIOCATORE2="+giocatore2.GetPunti());
UpdateGame();
break;
playedCard保持可见,我希望它消失。我用View解决了这个问题。Goe关于
View呢。Goe
?with View.Goe仍然可见注释是您的代码是:playedCard是一个ImageView。这是否意味着playedCard不是ImageView?playedCard是ImageView您调试代码了吗?是playedCard.setVisibility(视图.不可见)代码>执行?如果是,则之后会调用UpdateGame()代码>。这会影响能见度吗?