Android webview - starting due to developer command or rotation? how do i tell? -
i'm working webview instance have html / javascript code needs know if new display or merely rotation or similar event. i'm familiar addjavascriptinterface getting access java side content not problem.
this question may relate more activity lifecycle - http://developer.android.com/reference/android/app/activity.html
what methods unique initial loading of activity not subsequent reloads? or unique reloading , not initial load?
i believe interested in configuration changes section of page linked to.
the part of interest this:
unless specify otherwise, configuration change cause current activity destroyed, going through normal activity lifecycle process of onpause(), onstop(), , ondestroy() appropriate...in special cases, may want bypass restarting of activity based on 1 or more types of configuration changes. done android:configchanges attribute in manifest. types of configuration changes handle there, receive call current activity's onconfigurationchanged(configuration) method instead of being restarted. if configuration change involves not handle, however, activity still restarted , onconfigurationchanged(configuration) not called.
Comments
Post a Comment