Created custom LanguageSelectDialog class. This can be reused in multiple places. The library screen has been modified to use this class. Settings screen still requires modification.
A sample library_zim.xml is available at
https://github.com/kiwix/testfiles/blob/master/libraryfiles/one_item_in_library/library_zim.xml
The bug seems to have been introduced inadvertently in
b9930252e1
which returned a null to `getView(...)`
I've left a key log statement as this was one clue (after checking
various other areas of the codebase) that indicated there might be a
problem related to the number of entries rather than the attributes of
the item. I aim to revise the format of the log message as part of a
wider update on logging.
* zim_manager: Replace RelativeLayout with SwipeRefreshLayout
Signed-off-by: David Sn <divad.nnamtdeis@gmail.com>
* Replace refresh button with swipe gesture
Signed-off-by: David Sn <divad.nnamtdeis@gmail.com>
* Remove "progress bar" in favor of swipe animation
Signed-off-by: David Sn <divad.nnamtdeis@gmail.com>
* Fix not refreshing list if user has swiped to refresh
Signed-off-by: David Sn <divad.nnamtdeis@gmail.com>
* Fix "no files found" after downloading a file
Signed-off-by: David Sn <divad.nnamtdeis@gmail.com>
* Remove menu_rescan_fs from tests and replace click with swipeDown
Signed-off-by: David Sn <divad.nnamtdeis@gmail.com>
* Add refresh on swipe for online content
Signed-off-by: David Sn <divad.nnamtdeis@gmail.com>
* Disable swipe to refresh if no network connection
Prevents the user from requesting a refresh when the list isn't loaded yet.
* Rename swiperefresh to seperate id for both tabs
Signed-off-by: David Sn <divad.nnamtdeis@gmail.com>
current logging used in the DownloadService. Hopefully the extra log
messages will help us debug problems when tests fail, particularly
remotely e.g. on BitBar's TestDroid service.
The logs are local to the device and don't contain any sensitive
additional information. The extra information helps diagnose
network issues when they occur during testing.
Once we are happy with using Spoon we can add code that automatically
takes a screenshot when tests fail. This may help us debug some of the
problems we encounter running the tests on various devices. Using Spoon
exposed a limitation/key behaviour of ActivityTestRule that references
the intended Activity under test. To account for this behaviour I
restructured DownloadTest so it simply tests the download, rather than
reading the contents of the file.
I also discovered that the tests would fail on wide-screens as the Home
menu option moves from the overflow menu to the main menu. I've modified
one test to cope. Again, once we're happy with this approach (which
involves a little extra code) we can revise all the tests so they can
run equally competently on various screen sizes.