Android Question Layout variant problem

Discussion in 'Android Questions' started by GaNdAlF89, Sep 9, 2015.

  1. GaNdAlF89

    GaNdAlF89 Active Member Licensed User

    I have two variant of layout: landscape and portrait. When the orientation of device changes, the Activity_Resume is executed again. How can I avoid this case? I want that the correct layout is loaded (only graphically) when the orentation changes, but no other event is raised. Thanks.
     
  2. RandomCoder

    RandomCoder Well-Known Member Licensed User

    You cannot stop this event from being raised but maybe you can use a Process Global variable to determine if the code is to be executed or not.
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    Make sure not to load the layout in Activity_Resume.
     
  4. GaNdAlF89

    GaNdAlF89 Active Member Licensed User

    Sure, it is loaded in Activity_Create.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice