setVisibility不起作用

时间:2017-05-28 17:20:47

标签: show-hide calendarview

在VISIBLE和GONE之间切换时,例如,对于按钮,它对CalendarView不起作用:

CalendarView myCalendar; .... myCalendar =(CalendarView)findViewById(R.id.my_calendar); ....            @覆盖             public void onClick(查看v){                 if(myCalendar.getVisibility()== View.GONE){                     myCalendar.setVisibility(View.VISIBLE);                 }                 其他                 {myCalendar.setVisibility(View.GONE);                 }                 leftLayout.invalidate();             }         });

如何隐藏和显示CalendarView?

0 个答案:

没有答案