Skip to content

Is there better way to get values from Deck to WebView? #6306

@krmanik

Description

@krmanik
Reproduction Steps

I have added following codes to AnkiDroid.

card.js

view.loadUrl
AbstractFlashcardViewer.java

Added custom card layout using css and js to deck template.
Anki-Custom-Card-Layout

demo

Expected Result

Is there a better way to following values without using setTimeout .

Deck Title,
ETA,
New, Learn, Review Card Counts
Mark,
four button or three button is there 

I get values ( cards count, title, mark, eta ) but by using setTimeout function of javascript.

Actual Result

WebView should get values without using setTimeout.

Reason

It will help in card creation with custom layout.

Debug info

Refer to the support page if you are unsure where to get the "debug info".

Research

Enter an [x] character to confirm the points below:

  • [ x ] I have read the support page and am reporting a bug or enhancement request specific to AnkiDroid
  • [ x ] I have checked the manual and the FAQ and could not find a solution to my issue
  • [ x ] I have searched for similar existing issues here and on the user forum
  • [ x ] (Optional) I have confirmed the issue is not resolved in the latest alpha release (instructions)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions