1. Android Central Question's Avatar
    Hello I am making a app in which when main activity opens a lotte animation plays as a button and when i click on that animation (button) then activity 2 opens and plays a video and when the video get completes i called main activity again using intent, so when main activity opens again i want that now that animation button hides.

    I tried to write override onresume and i also tried override onrestart and then i wrote

    override fun onRestart() {
    super.onRestart()
    binding.btnanimation.visibility = View.INVISIBLE
    }
    but when i do that then when activity opens in starting then also that button animation get hides, but i want that when app opens it must be visible as its called inside oncreate

    my onCreate code something like this

    override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)

    binding = ActivityMainBinding.inflate(layoutInflater)

    requestWindowFeature(Window.FEATURE_NO_TITLE);
    this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN)

    setContentView(binding.root)

    binding.btnanimation.visibility = View.VISIBLE
    So what mistake i am doing and how to fix that ?
    12-04-2021 04:05 AM
  2. B. Diddy's Avatar
    Welcome to Android Central! I moved this to the Software Development forum for more specific traffic.

    Please register on this forum, which will allow you to engage in discussion more easily, as well as post images. https://forums.androidcentral.com/as...community.html
    12-04-2021 04:07 AM
  3. Kizzy Catwoman's Avatar
    you may get more specific help from XDA forums as well.
    12-05-2021 06:04 AM

Similar Threads

  1. How to put text messages in the saved box ?
    By Android Central Question in forum Ask a Question
    Replies: 3
    Last Post: 12-04-2021, 09:01 AM
  2. App games go to home screen
    By Android Central Question in forum Ask a Question
    Replies: 2
    Last Post: 12-04-2021, 08:43 AM
  3. Replies: 2
    Last Post: 12-04-2021, 08:41 AM
  4. Why is my Huawei phone not showing preferred network type in settings
    By Android Central Question in forum Ask a Question
    Replies: 2
    Last Post: 12-04-2021, 12:46 AM
  5. Why can't I update Android software via mobile data?
    By Ace Gamer in forum Ask a Question
    Replies: 2
    Last Post: 12-03-2021, 10:41 PM
LINK TO POST COPIED TO CLIPBOARD