Anki-Android icon indicating copy to clipboard operation
Anki-Android copied to clipboard

Fixed Record Audio Waveform not visible #16258

Open shalenMathew opened this issue 1 year ago • 6 comments

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

WhatsApp Image 2024-05-10 at 11 46 27 PM

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

shalenMathew avatar May 10 '24 18:05 shalenMathew

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.

welcome[bot] avatar May 10 '24 18:05 welcome[bot]

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

david-allison avatar May 11 '24 01:05 david-allison

Forgot to ping, @criticalAY has context for the landscape change hiding the control

david-allison avatar May 11 '24 01:05 david-allison

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

criticalAY avatar May 11 '24 06:05 criticalAY

So whats the fix here ? Should i make any further changes ?

shalenMathew avatar May 11 '24 11:05 shalenMathew

Shall i change px to dp ?

shalenMathew avatar May 11 '24 11:05 shalenMathew

You will need to fix the behavior mentioned in the issue which is emulator only

criticalAY avatar May 11 '24 13:05 criticalAY

You will need to fix the behavior mentioned in the issue which is emulator only

Ok 👌

shalenMathew avatar May 11 '24 13:05 shalenMathew

@shalenMathew could you mark this as draft if it's not ready for review?

david-allison avatar May 21 '24 14:05 david-allison

@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

shalenMathew avatar May 23 '24 13:05 shalenMathew

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

criticalAY avatar May 23 '24 13:05 criticalAY

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 avatar May 24 '24 11:05 shalenMathew

@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

david-allison avatar May 24 '24 11:05 david-allison

@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

shalenMathew avatar May 24 '24 12:05 shalenMathew

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.

criticalAY avatar Jun 19 '24 22:06 criticalAY