Comments (9)
Fixing the bug regarding the problems to write on all the surface of the Whiteboard
when the orientation changes I have already fixed this bug too.
When Android detects a change in orientation, by default exectues onCreate again.
This behaviour it's not desirable because we only want to change the UI, not reopen
the deck and reload the cards. If onConfigurationChanged(Configuration newConfig is
overridden Android will execute this function instead of onCreate, when the
orientation changes, so it solves the problem.
Reported by edu.zasu
on 2009-10-23 09:38:54
- Status changed:
Fixed
from anki-android.
Great :-)
Reported by nicolas.raoul
on 2009-10-23 09:43:33
from anki-android.
I had a different solution in place here locally to fix this problem, but this one might
be better. I will try it
out and see if it also fixes the problem with the crash on screen orientation change
while a deck is loading
after it has been chosen in the deck picker.
Reported by daniel.svard
on 2009-10-23 10:18:30
from anki-android.
I don't know if I completely understood how to provoke this crash you are talking
about but I tried it and I think it works just fine.
Let me know if something it is not working!
Reported by edu.zasu
on 2009-10-23 10:33:06
from anki-android.
This is how I made it crash before:
1. Pick a new deck in the deck picker screen.
2. Rotate the screen while the "Loading deck. Please wait..." progress dialog is displaying.
It was a problem with the thread that is loading the deck trying to write to Ankidroid.currentCard,
but
since the activity got restarted on the configuration change, that reference was not
valid any more.
From reading the documentation on onConfigurationChanged, it seems that it prevents
the activity from
being restarted and thus this problem would be solved too.
My solution involved using the onRetainNonConfigurationInstance() and getLastNonConfigurationInstance()
methods, as well as keeping a reference to the currently active
activity and using a lock to limit the thread's access to it.
Reported by daniel.svard
on 2009-10-23 10:47:30
from anki-android.
I didn't manage to reproduce this :-/
I have the country-capitals deck and a ~15000 cards deck, maybe they load too fast?
Both take less than a second to load.
I am using my master branch.
Reported by nicolas.raoul
on 2009-10-23 10:54:44
from anki-android.
Then you probably fixed it too. :-D Don't worry.
I just pulled Nicolas' master branch and I'll try it out.
I think it was present at this commit at least: bec770b0e1b04831b538b044deb116451023a76d
(in Nicolas'
branch)
Reported by daniel.svard
on 2009-10-23 11:05:49
from anki-android.
Thanks, Daniel! We'll be waiting your feedback on that ;D
Reported by edu.zasu
on 2009-10-23 11:11:59
from anki-android.
Tried it now and the bug doesn't seem to exist anymore. It also feels a lot more responsive
than my
solution.
Great job Edu, thanks!
I'm thinking we should do something similar to the DeckPicker activity to not make
it reload all the deck
data on an orientation change.
Reported by daniel.svard
on 2009-10-23 11:21:52
from anki-android.
Related Issues (20)
- Crash recording audio HOT 1
- Template Previewer [Don't keep Activities]: lateinit property currentCard has not been initialized HOT 3
- New built in image occlusion card type doesn't work (Ankidroid) HOT 8
- [BUG]: After starting importing collection or restoring, the deck list does not refresh to the imported one HOT 3
- [BUG] TTS appears in browser HOT 4
- [BUG]: crash on emulator after recording local audio HOT 2
- Old 2.17.6 card preview toggle option HOT 5
- Card Template Editor: ViewPager loses front/back toggle after 'don't keep activities' HOT 2
- marketing-titles.txt and chromeos release are no longer used and should be removed
- [BUG]: When long pressing "Sync" button, its tooltip isn't shown; and after the long press, synchronization starts HOT 1
- Crash on switching app while edit tags dialog is open HOT 8
- [BUG]: Externally loaded JavaScript doesn't seem to work anymore in 2.18 HOT 4
- Show progress in progress dialog when optimising all presets
- Selecting child decks requires more taps in the hierarchical deck selection dialog
- [BUG]: globalThis.AnkiDroidJS is undefined HOT 2
- Notify users when a due learning card is ready HOT 7
- Expose all UI functions through the JS API HOT 1
- [BUG]: Filtered Deck doesn't include scheduling HOT 5
- [BUG]: 2.18beta2 can no longer use paths like /storage/emulated/0/AnkiDroid HOT 10
- [BUG]: Optimiser Stops Working HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anki-android.