Fixed Record Audio Waveform not visible #16258
Purpose / Description
fixing #16258 the issue where audio wave disappears when orientation changes to landscape
Fixes
- Fixes #16258
Approach
-
issue occurred due Audio Waveform being kept GONE when config changed , solved the issue
-
audio form is now visible even in landscape mode
-
changed the height of audio wave a bit , to suit in both landscape and potrait mode
How Has This Been Tested?
- tested in emulator
Screenshot
https://github.com/ankidroid/Anki-Android/assets/119736953/4de4ae18-0ad7-4873-a996-e3c5110b9e5b
Checklist
Please, go through these checks before submitting the PR.
- [x] You have a descriptive commit message with a short title (first line, max 50 chars).
- [x] You have commented your code, particularly in hard-to-understand areas
- [x] You have performed a self-review of your own code
- [x] UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
- [ ] UI Changes: You have tested your change using the Google Accessibility Scanner
First PR! 🚀 We sincerely appreciate that you have taken the time to propose a change to AnkiDroid! Please have patience with us as we are all volunteers - we will get to this as soon as possible.
Thanks!!
There was a reason that the audio waveform was hidden in landscape (I believe due to limited vertical space on phones)
This doesn't address the issue that the flip from landscape to portrait does not reveal the control
Forgot to ping, @criticalAY has context for the landscape change hiding the control
The audio wave form was kept hidden in landscape as the mobile screen don't have that much of space to accommodate both the waveform and the card content, when a user want to record while seeing the content of their card it is difficult if it's visible in landscape
So whats the fix here ? Should i make any further changes ?
Shall i change px to dp ?
You will need to fix the behavior mentioned in the issue which is emulator only
You will need to fix the behavior mentioned in the issue which is emulator only
Ok 👌
@shalenMathew could you mark this as draft if it's not ready for review?
@shalenMathew could you mark this as draft if it's not ready for review?
I have changed the size of audio waveform to 100dp just notify me if i need to make any more changes
This is not what I meant, I will repeat what I said, you need to figure out what is the issue that causes the emulator bug and fix that instead of changing the height
This is not what I meant, I will repeat what I said, you need to figure out what is the issue that causes the emulator bug and fix that instead of changing the height
ok , i think it not a bug the waveform disappears coz the logic is set up that way , when the orientation changes the waveform visiblity is set to gone , i think due to limited space of screen on landscape mode the logic is set up that way...
I think the logic is works as intended ... Maybe its not a bug
@shalenMathew first, you need to understand the problem:
- We want the view hidden in landscape mode
- We don't want the view hidden in portrait mode
- If the user switches from portrait to landscape, then from landscape to portrait, the view is invisible in portrait, this is a bug
The first step is to reproduce the problem in an emulator
Then explain what the bug is
Then fix the bug in a pull request
@shalenMathew first, you need to understand the problem:
- We want the view hidden in landscape mode
- We don't want the view hidden in portrait mode
- If the user switches from portrait to landscape, then from landscape to portrait, the view is invisible in portrait, this is a bug
The first step is to reproduce the problem in an emulator
Then explain what the bug is
Then fix the bug in a pull request
ok now i got it my bad, let me try to fix it
I am closing this PR as there are no changes here and i dont see any development recently, so the OP can figure out the right solution and get back.