I have an activity that contains a webview, in the event screen rotation or not I want to call a function in side the webview. How can I do it:
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
int orientation=newConfig.orientation;
switch(orientation) {
case Configuration.ORIENTATION_LANDSCAPE:
ORIENTATION = Configuration.ORIENTATION_LANDSCAPE;
/// Call function inside webview
break;
case Configuration.ORIENTATION_PORTRAIT:
ORIENTATION = Configuration.ORIENTATION_PORTRAIT;
/// Call function inside webview
break;
}
}
Thanks you so much
Aucun commentaire:
Enregistrer un commentaire