@sshipsey wrote:
Is it possible to detect rotation in an Ionic4 app without actually rotating the entire app?
I’m using this:
I’d like to enter some callback on device rotation, not necessarily rotating the entire app. If I lock orientation, i lose the screenOrientation.onChange() emits. If I unlock rotation, my screenOrientation.onChange() emits, but the app also rotates. Attempting something like this:this.screenOrientation.unlock(); this.screenOrientation.onChange().subscribe(ev => { this.screenOrientation.lock( this.screenOrientation.ORIENTATIONS.PORTRAIT_PRIMARY ); // Do other stuff });
makes the rotation jump between the two which looks bad. Been fighting this for a while, any ideas are appreciated
Posts: 1
Participants: 1