Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

pwput
Copy link

@pwput pwput commented Jun 30, 2024

No description provided.

Copy link
Owner

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" ?

Copy link
Author

@pwput pwput Jun 30, 2024

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.

Copy link
Owner

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

@Darkempire78
Copy link
Owner

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

@pwput
Copy link
Author

pwput commented Jun 30, 2024

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?

@Darkempire78
Copy link
Owner

Darkempire78 commented Jun 30, 2024

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
@pwput

@Darkempire78
Copy link
Owner

You are right, they should be fragments as you said

@pwput
Copy link
Author

pwput commented Jun 30, 2024

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?
@Darkempire78

@Darkempire78
Copy link
Owner

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? @Darkempire78

I agree, I think we can do it in this issue

@Darkempire78
Copy link
Owner

@pwput Do you plan to do it ? 😆

@Darkempire78
Copy link
Owner

@pwput It seems good for me. Can you please fix the conflict ?

@Darkempire78
Copy link
Owner

Darkempire78 commented Aug 11, 2024

@pwput can you please fix the conflict ?

@Darkempire78
Copy link
Owner

@pwput are you still alive ? 😭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants