akexorcist / Localization

[Android] In-app language changing library
Apache License 2.0
983 stars 154 forks source link

In Activity, onConfigurationChanged function always return one orientation information while rotate the device. #119

Closed Chuntianhong closed 3 years ago

Chuntianhong commented 3 years ago

When change orientation of Activity, I change layout manually, some hide, some show with same information. But onConfigurationchanged function newConfig returns portrait. This is happened after combine the localization library. Would you check and give me an advice? Thank you.

` @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig);

    if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
        Log.e("ResList", "Landscape");

        showToastMessage("Land!");
    } else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) {
        Log.e("ResList", "Portrait");

        showToastMessage("Port!");
    }
}

`