0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 20:03:05 +02:00
Commit Graph

15144 Commits

Author SHA1 Message Date
Daniel Svärd
8b9448e23e Merge branch 'asynchronous-loading-in-deckpicker' of github.com:daniel-svard/Anki-Android into asynchronous-loading-in-deckpicker
Conflicts:
	src/com/ichi2/anki/DeckPicker.java
2009-10-02 17:01:14 +02:00
Daniel Svärd
7fc02e02a0 Stop loading deck counts when a deck has been selected
Tell the loading thread to finish after it has loaded the current deck.
Should speed up the loading of the selected deck, especially if there
are many large decks in the list.
2009-10-02 16:45:00 +02:00
Daniel Svärd
0ac45dea30 Progress spinners
Adds a small progress spinner to the right of each deck in the deck
picker while its counts are loading. Purely cosmetic.
2009-10-02 16:45:00 +02:00
Daniel Svärd
999e36b3b4 Fix for the NullPointerException it DeckPicker.handle.handleMessage 2009-10-02 16:44:59 +02:00
Daniel Svärd
44b95dba53 Asynchronous loading of card counts in deck picker
Delegates the loading of the card counts to a separate thread to improve
responsiveness when choosing the deck picker. I'm not sure how locking
for the database works so I implemented a separate locking scheme. With
this, a deck choise will not be acted upon until the counts for all the
decks have been loaded. Should be fairly easy to implement so that the
loader thread will stop loading new decks if one has already been
chosen.

Also fixed an issue about the deck not being loaded again when pressing
the "back" button, causing a force close when trying to space the next
card. It's just a quick fix in Ankidroid.onResume(), not very pretty.
2009-10-02 16:44:59 +02:00
Daniel Svärd
9539a6632a Removed two warnings 2009-10-02 16:32:34 +02:00
Daniel Svärd
468b33023f Hide underlaying controls when showing progress dialog
Makes the background black while loading a new deck. Looks prettier than
before when it was showing the last card from the old deck.
2009-10-02 15:54:07 +02:00
Daniel Svärd
5e2608f814 Fix for db not being loaded if user cancels deck picking
Fixed an issue about the deck not being loaded again when pressing
the "back" button, causing a force close when trying to space the next
card. It's just a quick fix in Ankidroid.onResume(), not very pretty.
2009-10-02 14:14:19 +02:00
Daniel Svärd
9824c6b266 Stop loading deck counts when a deck has been selected
Tell the loading thread to finish after it has loaded the current deck.
Should speed up the loading of the selected deck, especially if there
are many large decks in the list.
2009-10-02 13:05:33 +02:00
Daniel Svärd
30b930a09e Progress spinners
Adds a small progress spinner to the right of each deck in the deck
picker while its counts are loading. Purely cosmetic.
2009-10-02 11:23:41 +02:00
Daniel Svärd
df38b32b39 Fix for the NullPointerException it DeckPicker.handle.handleMessage 2009-10-02 08:58:29 +02:00
Daniel Svärd
bd716d815c Asynchronous loading of card counts in deck picker
Delegates the loading of the card counts to a separate thread to improve
responsiveness when choosing the deck picker. I'm not sure how locking
for the database works so I implemented a separate locking scheme. With
this, a deck choise will not be acted upon until the counts for all the
decks have been loaded. Should be fairly easy to implement so that the
loader thread will stop loading new decks if one has already been
chosen.

Also fixed an issue about the deck not being loaded again when pressing
the "back" button, causing a force close when trying to space the next
card. It's just a quick fix in Ankidroid.onResume(), not very pretty.
2009-10-02 00:20:26 +02:00
Daniel Svärd
4fdf5a51cf Merge remote branch 'upstream/master'
Conflicts:
	src/com/ichi2/anki/DeckPicker.java
2009-10-01 19:26:22 +02:00
Daniel Svärd
95bc9b1796 Removed two @override commands 2009-10-01 19:22:44 +02:00
nicolas-raoul
9e1ccb57fe Spacing algorithm that should be a bit less lame, but still not compatible with the Anki format 2009-10-01 20:13:50 +09:00
nicolas-raoul
1e6cb73471 Example of location.properties file. I created mine by hand actually, it was faster than figuring out the tool that would create it 2009-10-01 20:12:16 +09:00
Jan Berkel
635ff3603e added build.xml + config 2009-10-01 09:24:16 +01:00
nicolas-raoul
92cc795b63 removed two @override markers that somehow prevented Eclipse from compiling:
- The method accept(File) of type DeckPicker.AnkiFilter must override a superclass method
- The method compare(HashMap<String,String>, HashMap<String,String>) of type DeckPicker.HashMapCompare must override a superclass method
I don't understand why, these @override are right in my opinion. Maybe a problem in my environment? I am using compiler compliance level 1.5 on the latest Eclipse, and Java HotSpot 1.6.0_16 on Linux.
2009-10-01 14:21:22 +09:00
nicolas-raoul
e0770cb39a Merge commit 'daniel-svard/master' 2009-10-01 14:15:50 +09:00
nicolas-raoul
f60f84dee7 I just commented two @override markers that somehow prevented Eclipse from compiling:
- The method accept(File) of type DeckPicker.AnkiFilter must override a superclass method
- The method compare(HashMap<String,String>, HashMap<String,String>) of type DeckPicker.HashMapCompare must override a superclass method

I don't understand why, these @override are right in my opinion. Maybe a problem in my environment? I am using compiler compliance level 1.5 on the latest Eclipse, and Java HotSpot 1.6.0_16 on Linux.
2009-10-01 14:10:47 +09:00
nicolas-raoul
5388922ccc Merge branch 'master' of git://github.com/daniel-svard/Anki-Android into daniel-svard 2009-10-01 13:49:33 +09:00
Daniel Svärd
bb43b8489c Deck picker screen with updated due and new counts
Non-cached version of the counts for new and due cards for each deck
listed in the deck picker. Ported quite a bit of python code from
libanki to make it happen (ie. there are probably bugs).

tagIds() in Deck.java is only declared, but
not implemented since it will not be called from the current code. However
it needs implementation for possible future calls to it.
2009-09-30 23:21:44 +02:00
edu-zamora
2ce76a9ff5 Fixed bug with Whiteboard: when you started Ankidroid or selected on preferences to show timer/whiteboard, the Whiteboard was always visible even when the button said it was off 2009-09-29 18:17:18 +02:00
Daniel Svärd
51da3a693f Progress dialog when loading a new deck
There can be quite a delay when getting the next card from a big deck.
So I added a simple progress dialog when loading a new deck, so that the
user knows something has happened when he selects a new deck. This
implied creating a new thread to do the loading while the ui thread
shows the dialog.
2009-09-27 08:47:06 +02:00
Daniel Svärd
010c4343ac Merge remote branch 'upstream/master'
Conflicts:
	res/layout/preferences.xml
2009-09-25 17:04:06 +02:00
nicolas-raoul
172a95ca9b Fixed typo, replaced outdated README with link to Wiki, bumped version code and version name as I published the app to the Android Market 2009-09-25 21:36:00 +09:00
Daniel Svärd
ad0093a0da Improved deck picker screen
Redesigned deck picker that gets rid of the filesystem browser. The path
to the folder in which the decks are stored are set in the preferences.
The picker screen then shows a list of all the decks.

Deck.java contains a new class to represent the top level object in the
database, the deck. It is nowhere near finished, but is supposed to
contain the functionality of the Deck class in libanki.

No new data is written to the database. Read data (due cards etc.) is
cached and might be out of date.
2009-09-23 08:03:39 +02:00
nicolas-raoul
c198668831 Made Spaced Repetition optional, checkbox in preferences. Fixed crash when generating sample deck while no SD card is present. 2009-09-08 18:33:20 +09:00
nicolas-raoul
a6d9b0b2bc Fixed bugs in last commit 2009-08-28 22:26:32 +09:00
nicolas-raoul
f2fdd1104e Finished preferences, now remember the deck from last time, added About box 2009-08-28 22:02:45 +09:00
nicolas-raoul
e6ba3f6022 Integrated sample preferences dialog found at www.kaloer.com/android-preferences 2009-08-28 20:02:37 +09:00
nicolas-raoul
611506f704 Started to implement sample deck loading, for user-friendliness. Commented out by now because unstable 2009-08-26 22:01:50 +09:00
nicolas-raoul
32153c0380 Keep deck filename during short interruption like phone calls or rotations 2009-08-26 20:56:44 +09:00
nicolas-raoul
97b7d20d64 Renamed FlashCard to Ankidroid because Android was confused not finding it. Also: Skip suspended cards 2009-08-26 20:21:13 +09:00
nicolas-raoul
781a094261 Deck picker is now only an ActivityForResult instead of being the main activity 2009-08-25 22:20:05 +09:00
nicolas-raoul
1e16797b06 Start to add ability to remember which deck was opened last time, not actually usable yet 2009-08-25 19:54:35 +09:00
nicolas-raoul
f0e5c1e1d9 Added menu to switch to another deck 2009-08-25 19:24:58 +09:00
nicolas-raoul
935bb2e788 Moved Whiteboard to its own class to make FlashCard.java more understandable 2009-08-25 19:12:20 +09:00
nicolas-raoul
9b95ab5445 Added missing Javadoc comments, removed debug code, cleaned, prepared for signed delivery 2009-08-24 20:17:04 +09:00
nicolas-raoul
47c5a7b818 Very basic but working version of the spaced repetition feature 2009-08-21 19:01:47 +09:00
nicolas-raoul
cdd2e749c4 Fixed incompatible ids problem by treating ids as strings instead of int 2009-08-20 20:53:42 +09:00
nicolas-raoul
0284a44cf2 Started to implement spaced repetition, work in progress 2009-08-18 20:30:55 +09:00
nico
7f858dec66 Removed generated R.java; modified some settings required by Market; added filtering Java code so that deck selector only shows deck files 2009-06-28 18:04:10 +09:00
Casey Link
58f719fe10 initial import 2009-06-03 10:56:54 -04:00