ahmedre/quran_android — pull request #159 by afarra (2012-08-01 02:32:23+00:00)
Title: Page Info Overlay

Add option for overlaying page info (pg #, sura name, and juz2 #).

Beta for now. Just in case, surrounded the 2 entry points with catch-all to avoid FC's... at least until after Ramadan :)

It determines the empty gap between the top of the ImageView and the top of the actual bitmap. If the gap is large enough, it draws the text within that gap. If not, it uses the ayah-info database to get the actual location of the top of the first line, and utilizes that gap as well for drawing (i.e. between top of bitmap and top of highest glyph). A side effect is that on pages where a sura starts there is a huge gap (either because of basmallah or because of the decoration with sura name) and so it partly overlaps on that.

Should check for ayah-info files, but wasn't sure if it's a good idea because then the user would be asked every time they view a page. For now the "catch all" should take care of it..