summaryrefslogtreecommitdiff
path: root/android/src/com/artifex/mupdfdemo/MuPDFActivity.java
AgeCommit message (Collapse)Author
2013-06-20Rearrange source files.Tor Andersson
2013-05-28Android: disable whole "extras" menu when in reflow modePaul Gardiner
2013-05-27Fix indentation to be consistent with regard to tabs/spaces.Tor Andersson
2013-05-24Bug 694092: Android: Redraw performance (overdraw) fixesRobin Watts
Thanks to Goncalo Ferreira(*) (aka monxalo) for this patch. Firstly, we move our textured background off the layout and into a style applied to MuPDFActivity. By using "windowBackground", we avoid the default background being redrawn only to be overlaid with ours. This cuts out one level of overdrawing. Secondly, when drawing each PageView, the old code would render the background for the page, then would draw the bitmap over the top of that. While it's important to draw the background of the page before we have a bitmap for the page, we can avoid that stage once a page bitmap arrives. (* apologies for not being able to put the cedilla on the 'c' in your name, but git gives problems with top bit set chars.)
2013-04-11android: Clean up string resources.Tor Andersson
2013-04-09Android: Ensure mTopBarMode is initialisedRobin Watts
Otherwise loading calc.pdf and clicking buttons causes a null pointer exception.
2013-04-09Android: handle features not supported other than for PDF filesPaul Gardiner
2013-04-09Android: new, more-logical menu hierarchyPaul Gardiner
2013-04-08Android: Fix operation under Froyo/Gingerbread.Robin Watts
Android resolves references at class load time, so when MuPDFActivity is loaded, it tries to resolve AnimatorInflater. This fails on a 2.2 system. The fix is to push the code into 'SafeAnimatorInflater'. When MuPDFActivity is loaded, SafeAnimatorInflater is resolved, but it's not actually loaded until it's used. We never use it unless we have at least honeycomb, hence we never try to resolve the missing class.
2013-04-03Android: avoid SEGV when printing fails, and display errorPaul Gardiner
2013-04-03Android: prepare for localisationPaul Gardiner
2013-04-03Use xml onClick field to avoid some of the explicit Button objectsPaul Gardiner
2013-03-29Android: some user-feedback improvementsPaul Gardiner
Disable some features when in reflow mode Disable features when document format prohibits Add a few instructional on-scrren, info messages
2013-03-29Android: initial support for printingPaul Gardiner
This wont work for other than PDF documents Also, we should save the file before printing if it has been changed
2013-03-27Android: fix git rebase slipPaul Gardiner
2013-03-26Android: Ensure that autorotate doesn't kick us out of reflow mode.Robin Watts
2013-03-26Android: Popup notifications for entering/exiting reflow mode.Robin Watts
2013-03-25Android: add support for Ink annotation creationPaul Gardiner
2013-03-24Android: warn when no text selected and avoid creating empty annotationsPaul Gardiner
2013-03-24Add another input mode for drawing ink annotationsPaul Gardiner
2013-03-21Bug 693719: Android: Catch exceptions when counting pages.Robin Watts
Return 0. Check for this case when opening a PDF and give a nice dialogue. Fix the nice dialogue code so that it doesn't crash afterwards due to a null mSearchTask.
2013-02-26Android: add support for highlight and underline markup annotations.Paul Gardiner
Highlight annotations currently come out opaque so aren't a lot of use.
2013-02-26Android: implement annotation deletionPaul Gardiner
2013-02-22Android: add annotation-editing menu, triggered on annotation selectionPaul Gardiner
2013-02-22Android: add MuPDFCore.getAnnotationsPaul Gardiner
2013-02-13Android: highlight reflow icon when in reflow modePaul Gardiner
2013-02-11Android: factor out ReaderView's special handling of MuPDFView objectsPaul Gardiner
2013-02-11Android: factor out search from main activityPaul Gardiner
2013-02-04Android: add hooks for zooming in reflow modePaul Gardiner
2013-02-04Android: add button for reflowPaul Gardiner
2013-02-03Android: first attempt at reflow modePaul Gardiner
2013-02-02Android: introduce common interface for normal and reflowed viewsPaul Gardiner
2013-01-31Android: implement strikeout annotation creationPaul Gardiner
2013-01-26Android: Fix NullPointerException seen on Google PlayRobin Watts
According to Google Plays automated crash detection, we get a NullPointerException when trying to parse a null string as a Uri. This turns out to be caused by us trying to open a PDF attachment from gmail. This is because MuPDF is invoked with a content:// URL that does not have a file associated with it. Instead we can open that URL as an InputStream. Here we amend MuPDF to spot that case, and to open the InputStream, suck the data into a byteArray, and then to use that to open the file from.
2013-01-24Android: Implement 'Smart Motion'.Robin Watts
Currently, when the edges of the screen are tapped, we move just enough to bring the next/previous page onto the screen. When we are zoomed out, this is exactly what we want. When we are zoomed in, however, it rarely is, as 1) it doesn't allow for their being more content on the same page that we might want to view, and 2) it doesn't take us the the same region of the next page, but rather to the 'nearest edge' of the next page at the same zoom. This is particularly annoying as if we accidentally hit 'right', we can't then hit 'left' to go back to where we were. Smart Motion is an attempt to more neatly advance/retreat through the document in a logical fashion. When we are asked to 'advance', we try to advance down the page by 90% of the screen height; this will bring the next pageful of information into view, allowing for lines that might have been split over the edge of the screen before. If that would take us past the bottom of the page, we just move to the bottom of the page. If we are already at the bottom of the page, however, we consider advancing to the next 'column' of content on this page (i.e. we look to see if we have another screenful of content to the right of this one). If we do, we move to the top of the same page, at the top. If we don't, we move to the next page. When we move to the next page, we always move to the top, but our X position is chosen to match the first column of text (as calculated from the current screen position) on the next page. We assign the right hand side and bottom edges of the screen to 'advance', and the left and top edges to 'retreat'. Common use cases: * When the screen is zoomed out, left/right act precisely as they always have. * When the screen is zoomed in to avoid the margins of the page, left/right jump to the next/previous pages, with the same zoom, an improvement on the current mechanism. * When the screen is zoomed in to view a portrait file in landscape mode so that a line of text just fills the screen, left/right move nicely down the page a screenful at a time, and advances to do the same on the next page. We had no way of doing this before. * When the page is in 2 (or more) columns, and the user zooms to fit a single column in, advance nicely follows the flow across multiple pages. We had no way to do this before.
2013-01-22Android: Fix clipboard operation on older androids.Robin Watts
ClipboardManager changed its API at Honeycomb, AnimatorInflater only appeared at Honeycomb. Both of these are used by the clipboard code. Add fallback code to work with the older systems on older devices.
2013-01-22Android: Make the 'tap to skip page' regions more smartly sized.Robin Watts
Rather than always using 20% of the screen for the tap region (which can be excessive and confusing on a large tablet), instead try to use just the left/right inch. We do this by reading the dpi of the screen. As (apparently) some devices lie about the dpi of the screen we arrange first to always use at least 100 pixels, and then never to use more than 1/5 of the screen.
2013-01-21Rename app.Robin Watts
Due to a clash on Google Play, we need to rename the apps main class from com.artifex.mupdf to something else. We choose com.artifex.mupdfdemo. Any user of the code in their own app should rename it similarly. To simplify this process we add some macros in the C. Various renames and lots of tedious package name editing is still required in the Java though.