Hide A Layout After 10 Seconds In Android?

前端 未结 6 395
旧巷少年郎
旧巷少年郎 2021-02-04 07:30

I have a layout displayed on a button click.I want to hide that layout after 10 seconds.

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(         


        
6条回答
  •  迷失自我
    2021-02-04 08:36

    You can use an Animation started when you click the button, with 10 seconds duration that fades out the layout and probably sets its visibility to GONE at the end.

提交回复
热议问题