0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 03:52:15 +02:00
AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
Go to file
Mohd Raghib 2662e8b937
Update FAB UI for more intuitive double tapping (#12280)
* animate FAB

* remove all instances of add note layout

* update animations for `create deck` and `get shared deck`

* fix FAB to show completely during Rise animation

Add `8dp` margin top to make the FAB show completely when it undergoes Rise Animation where we increase the size of FAB on pressed.

Also decreases the translation values for Create Deck and Get Shared Decks after removal of Add Note Layout

* pressing fab opens the add note

also removed unwanted closing of FAB upon choosing Add Note, Create Deck or GetShared Deck

* function for closing FAB when chosen `Create Deck` option

This new function is same to the already present closeFloatingActionMenu() function but the only difference is that this function does not scale the FAB due to which we don't see the scaling up/down animation on FAB which makes the FAB animation smooth.

Otherwise when we click `Create Deck` the FAB undergoes the scaling up/down animation in the background which does not looks nice.

* fixes abrupt closing of FAB upon choosing `Get Shared Decks`

* add label for add note

* add colors by accessing them from attributes

* hide `add` label when choosing create deck

* fix unit test crash

Remove instances of add_note_layout from DeckPickerFloatingActionMenuTest.kt because it has been removed as a layout from DeckPickerFloatingActionMenu.kt

* fix: FAB animation when opening side drawer

As we were using closeFloatingActionMenu in DeckPicker while overriding onCreateOptionsMenu we were doing the rise and shrink animation of FAB which looks weird.

To avoid that we use the new function `closeFloatingActionMenuCaseTwo` which doesn't do the rise and shrink animation

* refactor: remove extra function for closing FAB

* remove un-necessary else-if condition

* improve animation

Improved the movement of animation for FAB by changing animation values for translations and alphas. Also matching the duration of different layouts to make the animation more smoother.

* make add note drawable animation smooth

rotate the add note drawable icon by 180 (basically inverting the image to X-axis) and while rotating the icon in FAB just rotate it 180f instead of 360f which makes the rotation animation more smooth and clean

* fix: halogen shadow artifact inside FAB on plain themes

* fix: unit test crash

Fixed unit test crash and updated addNoteLabel to follow the lifecycle of FAB in DeckPickerFloatingActionMenu

* pressing on Add Label opens AddNote screen

* fix color of FAB on pressing Get Shared Deck label

Color of FAB was changing to blue on pressing Add Shared deck label which will now sync with the color of theme

* fix : failing instrumented test

* fix: lint error

Lint error "Declarations and declarations with comments should have an empty space between."

* fix: maintain FAB color and functionality if safe display mode in on

If we are using the app in Safe display mode then clicking the fab would change the icon to note icon but there won't be any change in the color of the button as in case of (when animation is enabled).
Secondly on pressing back button or choosing any options we make the icon to change back to (add icon) without any animations

* fix: prevents FAB from changing color if any of the system animation is disabled

* add comment for the function and remove unnecessary testing code

* fix: abrupt changes in FAB icon when selecting an option
2023-06-10 13:43:50 -03:00
.github build: revert emulator to API 30 2023-04-24 16:38:43 +01:00
.idea Dialog: 'media sync unavailable' before migration 2023-03-24 11:12:48 -05:00
AnkiDroid Update FAB UI for more intuitive double tapping (#12280) 2023-06-10 13:43:50 -03:00
annotations Allow JetBrains @Contract annotations 2020-05-14 20:48:36 -05:00
api build: update targetSdkVersion to 31 2023-04-21 17:22:28 +03:00
docs Updated strings from Crowdin 2023-05-10 19:04:38 +03:00
gradle/wrapper Update Gradle Wrapper from 8.0.2 to 8.1.1. (#13653) 2023-04-22 07:29:33 -05:00
lint-rules Set kotlin related task in lint-rules module to use JVM 11 2023-03-13 17:02:42 -05:00
tools re-enable play store upload attempts 2023-04-23 10:32:58 -05:00
.codecov.yml ci: stop codecov from failing CI 2022-08-29 09:22:33 -05:00
.editorconfig Dependency Updates 20220219 (#13305) 2023-02-19 12:15:26 -05:00
.gitattributes chore: Mark user dictionaries as non-generated 2022-04-13 10:42:47 -05:00
.gitignore lint: Add user dictionaries to reduce typos 2022-04-05 17:11:56 -05:00
.prettierignore fix(prettier): Ignore 'build' folder 2022-03-16 11:48:12 +05:30
.prettierrc Change .prettierrc endOfLine to auto 2022-03-17 11:01:04 -05:00
build.gradle Dependency updates 20231305 (#13846) 2023-05-13 13:45:08 -05:00
CONTRIBUTING.md Created CONTRIBUTING.md (#8222) 2021-03-15 07:53:28 -05:00
COPYING Add readme and license file back after accidentally deleting 2014-11-10 02:23:41 +09:00
gradle.properties fix(release): increase build heap 2023-04-06 18:59:38 -05:00
gradlew Update Gradle Wrapper from 8.0.2 to 8.1. 2023-04-22 06:54:44 -05:00
gradlew.bat Update Gradle Wrapper from 7.5.1 to 7.6. 2022-11-26 22:33:28 -05:00
lint-release.xml Catch some attempts to access UI inside withCol, and col within UI thread 2023-06-04 07:00:16 -03:00
lint.gradle Dependency Updates 20220219 (#13305) 2023-02-19 12:15:26 -05:00
pre-commit Fix prettier throwing errors (#12895) 2022-11-29 19:30:07 -05:00
README.md Added Anki Forum URL in Readme file in Join Us On section (#12247) 2022-08-30 23:29:19 +05:30
settings.gradle Add lint checks for new time api 2020-08-25 10:04:26 +02:00

release build Open Collective backers and sponsors commit-activity forks stars contributors license

AnkiDroid

A semi-official port of the open source Anki spaced repetition flashcard system to Android. Memorize anything with AnkiDroid!

Features

  • night mode
  • whiteboard
  • progress widget
  • detailed statistics
  • syncing with AnkiWeb
  • write answers (optional)
  • text-to-speech integration
  • more than 6000 premade decks
  • spaced repetition (supermemo 2 algorithm)
  • supported contents: text, images, sounds, MathJax
  • add cards by intent from other applications like dictionaries

Install

Wiki

View Wiki

Help

Check the user manual and the wiki for usage instructions. See the help page for how to submit a bug report or contact a project member, etc.

Contribute

You can contribute to AnkiDroid by beta testing, translating, or submitting code. See the contribution wiki page for more info.

Join Us On

Credits

Code Contributors

Thanks to these awesome code contributors who keep this project going

Sponsors

Backers

Thank you to all our backers! 🙏

Translators

Thanks to our 1400 translators, for allowing us to be available, partially or totally, in 99 languages as of July 2022.

License