android.md: screens
[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
114#### UI
115
116Material.IO:
117
118- Navigation drawer: navigation drawer
119
120TODO: is it ok to have 3 levels of drawers?
121
122### Context menu
123
ea5b1120 124![Context Menu](screens/menu.jpg)
bac39c50
NR
125
126The context menu options are as follow for stories:
127
128- Open : open the book (= internal or external reader)
129- Rename... : ask the user for a new title for the story (default is current name)
130- 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)
131 - *
132 - [new source...]
133 - [A-H]
134 - Anima
135 - Fanfiction.NET
136 - [I-Z]
137 - MangaFox
138- 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)
139 - *
140 - [new author...]
141 - [0-9]
142 - 5-stars
143 - [A-H]
144 - Albert
145 - BĂ©atrice
146 - Hakan
147 - [I-Z]
148 - Irma
149 - Zoul
150- Delete : delete the story
151- Redownload : redownload the story (will **not** delete the original)
152- Properties : open the properties page
153
154For other books (sources and authors):
155
156- Open: open the book (= go to the selected destination)
157
158#### UI
159
160Material.IO:
161
162- menu: menu
163
164### Description page
165
ea5b1120 166![Description Page](screens/desc.jpg)
bac39c50
NR
167
168#### Header
169
170Use the same cover image as the books, and the description key/values comes from BasicLibrary.getDescription().
171
172#### Description
173
174Simply display Story.getMeta().getResume(), without adding the chapter number (it is always 0 for description).
175
176An example can be seen in be.nikiroo.fanfix.ui.GuiReaderViewerTextOutput.java.
177
178### Options page
179
ea5b1120
NR
180![Options Page](screens/options.jpg)
181
bac39c50
NR
182It consists of a "Remote Library" panel:
183
184- enable : an option to enable/disable the remote library (if disabled, use the local library instead)
185- server : (only enabled if the remote library is) the remote server host
186- port : (only enabled if the remote library is) the remote server port
187- key : (only enabled if the remote library is) the remote server secret key
188
189...and 5 other options:
190
191- Open CBZ files internally : open CBZ files with the internal viewer
192- Open epub files internally : open EPUB files with the internal viewer
193- Show handles on image viewer : can hide the handles used as cues in the image viewer to know where to click
194- Startup screen : select the destination to show on application startup
195- Language : select the language to use
196
197#### Startup screen
198
199Can be:
200
201- Sources
202 - All
203 - Listing
204- Authors
205 - All
206 - Listing
207
208...but will have to be presented in a better way to the user (i.e., better names).
209
210#### UI
211
212Material.IO:
213
214- the page itself : Temporary UI Region
215- the options : Switch
216- the languages : Exposed Dropdown Menu
217- the text fields : the default for text fields
b19b9ba2 218- the scret key field : the default for passwords (with * * * )
bac39c50 219
b19b9ba2
NR
220## Internal viewer
221
222The program will have an internal viewer that will be able to display the 2 kinds of stories (images and text).
223
224### Base viewer
225
226This is common to both of the viewer (this is **not** an architectural directives, I only speak about the concept here).
227
ea5b1120 228![Base Viewer](screens/viewer.jpg)
b19b9ba2
NR
229
230#### Header
231
232The title is the title of the story, shortened with "..." if too long.
233
234#### Content
235
236This area will host the text viewer or the image viewer.
237
238#### Navigator
239
240It contains 4 action buttons (first, previous, next and last chapter) and the title of the current chapter:
241
242- Descripton : for the properties page (same layout as the actual Properties page)
243- Chapter X/Y: title : for the normal chapters (note that "Chapter X/Y" should be bold, and "X" should be coloured)
244
245#### UI
246
247Matrial.IO:
248
249- Header : Header
250- Navigator : Bottom sheet
251
252### Text viewer
253
ea5b1120 254![Text Viewer](screens/viewer-text.jpg)
b19b9ba2
NR
255
256It will contain the content of the current chapter (Story.getChapters().get(index - 1)).
257
258Same layout as the Properties page uses for the resume, with just a small difference: the chapter name is now prefixed by "Chaper X: ".
259
260### Image viewer
261
ea5b1120 262![Image Viewer](screens/viewer-image.jpg)
b19b9ba2
NR
263
264#### Image
265
266Auto-zoom and fit (keep aspect ratio).
267
268#### Image counter
269
270Just display "Image X/Y"
271
272#### Handles
273
274This is a simple cue to show the user where to click.
275
276It can be hidden via the option "Show handles on image viewer" from the Options page.
277
278#### UI
279
280Pinch & Zoom should be allowed.
281
282Drag-to-pan should be allowed.
bac39c50 283