android.md: add info
[fanfix.git] / docs / android / android.md
CommitLineData
bac39c50
NR
1# Android UI mock-up
2
3## Concepts
4
5### Story
6
7We have **Stories** in Fanfix, which represent a story (an "epub", ...) or a comics (a "CBZ" file, ...).
8
9A story is written by an author, comes from a source and is dentified by a LUID (Local Unique ID).
10It can be a text story or an image story.
11
12The source can actually be changed by the user (this is the main sorting key).
13
14### Book
15
16We also have **Books**.
17
18Books can be used to display:
19
20- All the sources present in the library
21- All the authors known in the lbrary
22- Stories sharing a source or an author
23
24### All and Listing modes
25
26When representing sources or authors, books can be arranged in two modes:
27
28- "All" mode : all the sources/authors are represented by a book and displayed in the UI
29- "Listing" mode : for each source/author, a group of books representing the corresponding story is present with the name of the source/author to group them (for instance, a JLabel on top of the group)
30
31Note: Listing mode can be left out of the Android version if needed (but the all mode is really needed).
32
33### Destination
34
35What I call here a destination is a specific group of books.
36
37Examples :
38
39- All the sources
40- All the books of author "Tulipe, F."
41- A listing of all the authors and their stories
42
43## Core
44
45### Library (main screen)
46
ea5b1120 47![Main library](screens/main_lib.jpg)
bac39c50
NR
48
49#### Header
50
51The header has a title, a navigation icon on the left and a search icon.
52
53Title can vary upon the current displayed books:
54
55- All sources
56- Sources listing
57- Source: xxx
58- All authors
59- Authors listing
60- Author: xxx
61
62The navigation icon open the Navigation drawer.
63
ea5b1120
NR
64##### Search
65
66![Search/Filter](screens/search.jpg)
67
bac39c50
NR
68The search icon is actually a filter: it will hide all the books that don't contain the given text (search on LUID, title and author).
69
70#### List
71
72This list will hold books. Each item will be represented by :
73
74- a cover image (which is provided by fanfix.jar)
75- a main info, which can be:
76 - for stories, the story title
77 - for source books, the source name
78 - for author books, the author name
79- a secondary info, which can vary via a setting (see the Options page) between:
80 - author name (for a book representing an author, it is left blank)
81 - a count (a word count for text stories, an image count for images stories, a stories count for sources and authors books)
82
83#### UI
84
85Material.IO:
86
87- Title, navigation icon, search icon : Header
88- List : TODO: List? AdaptiveList? (I forgot the full name...)
89
90A tap will open the target book.
91
92A long press will first "select" the book (visually alter it so the user know which book is the target) then open the context menu.
93
94### Navigation drawer
95
ea5b1120 96![Navigation Drawer](screens/navigation.jpg)
bac39c50
NR
97
98The navigation drawer will list 4 destinations:
99
100- All the sources
101- Listing of the sources
102- All the authors
103- Listing of the authors
104- By source
105
106...and 2 foldable "panels" with more destinations:
107
108- By source
109- By author
110
111Those subpanels will either contain the sources/authors **or** sub-subpanels with sources/authors.
112See fanfix.jar (BasicLibrary.getSourcesGrouped() and BasicLibrary.getAuthorsGrouped()).
113
6d5f99c7
NR
114Note: if those last two cause problems, they can be removed; the first four options would be enough to cover the main use cases.
115
bac39c50
NR
116#### UI
117
118Material.IO:
119
120- Navigation drawer: navigation drawer
121
122TODO: is it ok to have 3 levels of drawers?
123
124### Context menu
125
ea5b1120 126![Context Menu](screens/menu.jpg)
bac39c50
NR
127
128The context menu options are as follow for stories:
129
130- Open : open the book (= internal or external reader)
131- Rename... : ask the user for a new title for the story (default is current name)
132- Move to >> : show a "new source..." option as well as the current ones fo quick select (BasicLibrary.getSourcesGrouped() will return all the sources on only one level if their number is small enough)
133 - *
134 - [new source...]
135 - [A-H]
136 - Anima
137 - Fanfiction.NET
138 - [I-Z]
139 - MangaFox
140- Change author to >> : show a "new author..." option as well as the current ones fo quick select (BasicLibrary.getAuthorsGrouped() will return all the authors on only one level if their number is small enough)
141 - *
142 - [new author...]
143 - [0-9]
144 - 5-stars
145 - [A-H]
146 - Albert
147 - BĂ©atrice
148 - Hakan
149 - [I-Z]
150 - Irma
151 - Zoul
152- Delete : delete the story
153- Redownload : redownload the story (will **not** delete the original)
154- Properties : open the properties page
155
156For other books (sources and authors):
157
158- Open: open the book (= go to the selected destination)
159
160#### UI
161
162Material.IO:
163
164- menu: menu
165
166### Description page
167
ea5b1120 168![Description Page](screens/desc.jpg)
bac39c50
NR
169
170#### Header
171
172Use the same cover image as the books, and the description key/values comes from BasicLibrary.getDescription().
173
174#### Description
175
176Simply display Story.getMeta().getResume(), without adding the chapter number (it is always 0 for description).
177
178An example can be seen in be.nikiroo.fanfix.ui.GuiReaderViewerTextOutput.java.
179
180### Options page
181
ea5b1120
NR
182![Options Page](screens/options.jpg)
183
bac39c50
NR
184It consists of a "Remote Library" panel:
185
186- enable : an option to enable/disable the remote library (if disabled, use the local library instead)
187- server : (only enabled if the remote library is) the remote server host
188- port : (only enabled if the remote library is) the remote server port
189- key : (only enabled if the remote library is) the remote server secret key
190
191...and 5 other options:
192
193- Open CBZ files internally : open CBZ files with the internal viewer
194- Open epub files internally : open EPUB files with the internal viewer
195- Show handles on image viewer : can hide the handles used as cues in the image viewer to know where to click
196- Startup screen : select the destination to show on application startup
197- Language : select the language to use
198
199#### Startup screen
200
201Can be:
202
203- Sources
204 - All
205 - Listing
206- Authors
207 - All
208 - Listing
209
210...but will have to be presented in a better way to the user (i.e., better names).
211
212#### UI
213
214Material.IO:
215
216- the page itself : Temporary UI Region
217- the options : Switch
218- the languages : Exposed Dropdown Menu
219- the text fields : the default for text fields
b19b9ba2 220- the scret key field : the default for passwords (with * * * )
bac39c50 221
b19b9ba2
NR
222## Internal viewer
223
224The program will have an internal viewer that will be able to display the 2 kinds of stories (images and text).
225
226### Base viewer
227
228This is common to both of the viewer (this is **not** an architectural directives, I only speak about the concept here).
229
ea5b1120 230![Base Viewer](screens/viewer.jpg)
b19b9ba2
NR
231
232#### Header
233
234The title is the title of the story, shortened with "..." if too long.
235
236#### Content
237
238This area will host the text viewer or the image viewer.
239
240#### Navigator
241
242It contains 4 action buttons (first, previous, next and last chapter) and the title of the current chapter:
243
244- Descripton : for the properties page (same layout as the actual Properties page)
245- Chapter X/Y: title : for the normal chapters (note that "Chapter X/Y" should be bold, and "X" should be coloured)
246
247#### UI
248
249Matrial.IO:
250
251- Header : Header
252- Navigator : Bottom sheet
253
254### Text viewer
255
ea5b1120 256![Text Viewer](screens/viewer-text.jpg)
b19b9ba2
NR
257
258It will contain the content of the current chapter (Story.getChapters().get(index - 1)).
259
260Same layout as the Properties page uses for the resume, with just a small difference: the chapter name is now prefixed by "Chaper X: ".
261
262### Image viewer
263
ea5b1120 264![Image Viewer](screens/viewer-image.jpg)
b19b9ba2
NR
265
266#### Image
267
268Auto-zoom and fit (keep aspect ratio).
269
270#### Image counter
271
272Just display "Image X/Y"
273
274#### Handles
275
276This is a simple cue to show the user where to click.
277
278It can be hidden via the option "Show handles on image viewer" from the Options page.
279
280#### UI
281
282Pinch & Zoom should be allowed.
283
284Drag-to-pan should be allowed.
bac39c50 285