Skip to content

Is there a way to disable landscape rotation on mobile ? #3258

Answered by Jacalz
lbellego asked this question in Q&A
Discussion options

You must be logged in to vote

You can place your own Android manifest file in the root of your project. It will be used instead of the one supplied by Fyne.

This way, you can use a manifest that suits your needs better. See https://github.com/cjh0613/wormhole-gui/blob/mobile/AndroidManifest.xml for an example on what I mean (had to link to one of the forks as the manifest has been removed upstream due to no longer being needed).

If you wish to copy the Fyne manifest and modify it for your needs, you can find the code here:

var manifestTmpl = template.Must(template.New("manifest").Parse(`
.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Jacalz
Comment options

@lbellego
Comment options

@Jacalz
Comment options

Answer selected by lbellego
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants