⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 notes.txt

📁 textviewer 一个手机上的文本浏览器实现
💻 TXT
字号:
Note: when file.txt is somewhere in between 7884 bytes and double that, the program crashes (I assume that the Form element can't handle that much text; because the title is displayed but the text doesn't come up). So we'll have to page, I guess todo:* "find next"* http://forum.java.sun.com/thread.jsp?thread=217782&forum=76&message=769034* catch numberformatexception* interruptedexception (note: never happens in MIDP)* dynamic paging (w/ chapters in mind)* page change interface* maybe move gc out of subprocedures* word break* preset word break ("ebook mode") at \n\n (like wiki paragraphs)* sourceforge* savannah* text file attacher util* "jump -5"* add yield() in loader threadi think done:* file close (i think done)* gauge (i think done)not to do?:* chapterscheckout also http://henson.newmail.ru/j2me/Editor.htmwith no garbage collection forced:NOTE: right now, must set MIDlet-Data-Size to about the size of the text file to avoid using twice as much heap space (less w/ g.c.???)for a 28k file, MIDlet-Data-Size=30000, 75k is used after reading in the file, and 90k is used after pagination and display of the first page. While "more"-ing, heap limit of emulator is quickly reached; however, with garbage collection, can stay to about 83k with more slight increases. ---with gc forced:doesn't work with data-file-size = 104500 (and app = 49k, compressed)does work with data-file-size = 30000for some reason an increase of 10000 in data-file-size increases memory usage by 20000 (incr from 30000 to 40000 --> incr from 75000 95000) -- why?with 30000 file size, the problem loads, but there are unbearable wacky problems. You enter things in forms and they don't "take". Actually, I think calling System.gv() at all can do that. I bet that perhaps some internal system objects were being g.c.ed while they were still needed.nah. now i think that using TextField is just a sketchy buisness on this phone. i have to type things in twice in the in-built "Portfolio II" app, too!I guess I gotta give menu options for everything.-----sf description:TextViewer is a crude, bare-bones viewer for text files on mobile devices. It is a J2ME MIDP "midlet".  You must attach the text file to TextViewer before you download it to the cell phone. So, the purpose of this program is to allow you to download a text file from your computer to your cell phone and then read it on the cell phone later. I could not find any text file viewers that were open source. There are other things that could probably do the job, such as html viewers and some text editors. But if you just want to read a text file on a cell phone, you want an application that lets you read the file without making you navigate superflous menu items (since that takes significant time on a cell phone with few buttons). I do not intend to have any dependencies beyond the MIDP 1.0 specification. Features include:* Dividing the file into pages approximatly the size of a cellphone screen* Navigating among the pages with "next", "prev", "goto page #", "jump ahead 10", "jump ahead 50", etc. * A basic search function* Quick initial startup by loading most of the file in a background threadPotential future features:* Breaking pages at word breaks* Navigating big files by breaking them into "chapters"----textviewer4midp----aux scripts:textViewer_attacher.pldownloadToMobile.pl#todo: change name of tv_attacher to tv_attach

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -