-
-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option for fixed orientation #475
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't it be "darkempire78.opencalculator.APP_ORIENTATION_SELECTOR" instead of "darkempire78.opencalculator.ORIENTATION" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tried to remain consistent with the rest of the keys and selectors, e.g., there are 'darkempire78.opencalculator.THEME' in MyPreferences and 'darkempire78.opencalculator.APP_THEME_SELECTOR' in root_preferences.xml. I can change the key to 'darkempire78.opencalculator.APP_ORIENTATION_SELECTOR', but then other keys should also be systematized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes I think it would be better to harmonized every keys
There is a weird behavior, when I set the landscape orientation, the settings are in portait for like 1s each time I open them screen-20240630-163312.mp4 |
In my opinion, it is caused by the app architecture. Screen orientation takes time every time the orientation is changed. There is a MainActivity that runs all the time, so when you change its orientation, it remains changed. However, the Settings and About activities are created and destroyed every time you open or close them, so their orientation is changed every time they are opened. Is there any reason why Settings and About are separate activities and not just fragments running inside MainActivity? |
To be honest, this was my first Android app, so I didn't really follow the best practices and conventions |
You are right, they should be fragments as you said |
I propose creating three fragments: CalculatorFragment, AboutFragment, and SettingsFragment, all within MainActivity. What do you think? Should this be a separate issue or part of this one? |
I agree, I think we can do it in this issue |
@pwput Do you plan to do it ? 😆 |
@pwput It seems good for me. Can you please fix the conflict ? |
@pwput can you please fix the conflict ? |
@pwput are you still alive ? 😭 |
No description provided.