Android Codepad

Android CodePad is a simple source code viewer that supports syntax highlighting.

it supports all C-like, Bash-like, and XML-like languages. it automatically selects the syntax depending on the file.

Android CodePad uses WebKit and google-code-prettify to do the syntax highlighting.

You can get the application in the market by searching for "Android Codepad", download the file directly in the google code project page or scanning the following QR Code:



The project its open source, if you want to contribute to the project, you're free to do it, right now is hosted on google code: http://code.google.com/p/android-codepad/ and its released under the Apache License 2.0 (that reminds me that i need to add the license in the source directory).

4 comments:

Ricochet said...

Thanks for the great idea, it looks like a cool app. Right now, on my Nexus One running 2.1, I get a force close every time I try to open a file. I am opening .sql and .cs files on my sd card. Is there something I should do differently?

Mark said...

Cool! I have been looking for something like this for a while now.
There are two features I'd like to see added to this
- ability to edit files
-- I'm sure you have noticed all the comments on the market asking for this feature
-- this would be nice, but I suspect it would be difficult to do syntax coloring while the file is being edited

- ability to annotate a file
-- see below for an explanation of what I mean by annotate
-- should be a lot easier to program than editing
-- tap on a source line to view/edit it's annotation
-- drag to select several lines for the annotation

by annotate I mean:
-writing notes about source code which are stored in a separate text file
-this annotation file has a human-readable syntax, somewhat like diff
--annotation file format:
--- header is several lines, formatted as such: ## space label-without-whitespace space data
## annotation-of /path/to/source/code.c
## source-md5 blahblahblahblahblahblah
## source-modification-date 5/11/10
--- then any number of lines starting with a line number (nnn) or line number range (nnn-nnn) followed by a colon and text
--- annotations must be in order but a line number or range can be repeated to create a longer note about that line/range
123: this is a single-line annotation that pertains to one source code line
145-165: this one pertains to multiple lines
202: and here is a multi-line
202: annotation that pertains
202: to a single line

What do you think?

Cosme Zamudio said...

@Ricochet anything weird you notice on your files, is there a way you could sent those to my email to test?

@Mark Editing files will be available for next version, syntax coloring is not going to be available while editing for now.
Annotations is a good idea, actually i use this app to do code reviews in my work, count on that feature for the next version. is there any standard way of doing anotations you know about?

Mark said...

When I google annotation, I don't find anything that matches what I want -- so maybe annotation is the wrong word.
There is some standard for annotating java, but it's completely different than what I want (http://types.cs.washington.edu/annotation-file-utilities/annotation-file-format.html). It would be useless to me. Microsoft's SAL is extra information for the compiler to verify function behavior, again not useful to me.

In the absence of a standard, I'd like to see something text based, so it is human-readable and can be searched with standard tools like grep - something like what I proposed above.

Thank you
Mark

Post a Comment

top