Created
September 17, 2018 15:24
-
-
Save janhesters/1de14fe326d6241c3056de9e9ddf8991 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... Other imports | |
import android.content.Intent; | |
import android.content.res.Configuration; | |
public class MainActivity extends ReactActivity { | |
// ... Leave the default code from React Native untouched | |
@Override | |
public void onConfigurationChanged(Configuration newConfig) { | |
super.onConfigurationChanged(newConfig); | |
Intent intent = new Intent("onConfigurationChanged"); | |
intent.putExtra("newConfig", newConfig); | |
this.sendBroadcast(intent); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment