[Q] Need to render HTML file as a book and retain CSS formatting on Android - Web App Development

So I have a local HTML file with CSS and I need to display this file in the form of a book (scroll left/right to view previous/next content, not up and down).
The only solution that I know how to perform currently is manually splitting the file into dozens of separate .html files and switching between them as the user flips pages. Which I realize is a terrible way to do this.
I think that this is achievable with javascript but I do not know how to implement that as a solution.

Related

Here is a more convenient way to search XDA Developers using google for IE7 users

Hey, if you are like me and are so lazy that you can't stand to do an absolute minimum amount of work, and you use Internet Explorer 7, than this tip is for you!!!!
You can add google search xda developers to your inline search box at the top right of your IE7 window. It only takes a few steps to add this, and you can have it in your IE7 search box for convenient google searching of xda developers any time you want.
or if you prefer the old way, the instructions are still located here:
http://forum.xda-developers.com/showthread.php?t=304582
Follow these steps (they look like a lot, but they are simple):
1. Go to the regular google / XDA developers search url
http://www.google.com/advanced_search?q=+site:http://forum.xda-developers.com&hl=en&lr=&as_qdr=all
2. Type the word TEST (all caps) into any one of the search boxes ( with all of the words, with the exact phrase, with at least one of the words) that google offers you (depending on how you most like to search xda developers) (if you type TEST into the "with all the words" field, that is the default google search method)
3. press "google search"
4. Copy the url of the current page you are on
5. click the little pull down arrow next to the picture of the magnifying glass in you IE7 search box
6. on the pull down menu click "find more providers"
7. on the page that comes up, there is a yellow box on the right side of the page that says "create your own" paste the url that you had previously copied into the first text field in the yellow box
8. In the second text field in the yellow box type the name that you want your new search shortcut to be called (I just called mine XDA DEV)
9. click "install" in the yellow box
10. A dialogue will come up with the final options (you can click cancel to quit at this point) you can click add provider to add it as one of your search shortcuts, or check the "make this my default search povider" box to make it the one that is automatically seen in that search box when you start IE7.
11. Success!!! if you didn't already add it as your default search provider, then you can pull down the box with the little arrow next to the magnifying glass and select it whenever you want to search xda developers quickly and conveniently through google.
12. to also add google search the XDA wiki, repeat these same steps, except with this as the url for step 1:
http://www.google.com/advanced_search?q= +site:http://wiki.xda-developers.com&hl=en&lr=&as_qdr=all
13. You could also use these steps to google search any website, or even use the website's own search engine too
ENJOY!!!!!!!!!!!!!!!!!!!
Same can be done for firefox 2 and I'm using it myself.
There is a standard keyword on google to search a specific site, so in this case, go to google, type your search, and then site:forum.xda-developers.com
eg On google, to search for vijay555 within the forum, type
Code:
vijay555 site:forum.xda-developers.com
Mike: I didn't notice any large, detrimental features in IE7. Firefox is still probably the way to go, but I tend to drift between the two depending on how much WMV porn I'm watching.
Actually, I use my own browser, VJMultiBrowser, which IMHO is nicer then both, but that's another story.
V
vijay555 said:
Actually, I use my own browser, VJMultiBrowser, which IMHO is nicer then both, but that's another story.
V
Click to expand...
Click to collapse
strange
Google gives no results when searching for VJMultiBrowser?
mestrini: VJMultibrowser has never been released, to anyone except BuzzLightyear. It's very very much built around how I work, but it's been my main browser for a few years (ie since I wrote it), although obviously it's in continuous development.
That is in fact a problem, I've squeezed so many things in there, I forget what it can do. I just remembered that it has a flick gesture for flicking to the next page in a set of documents, eg, flick mouse left/right to go from
http;//forum.xda-developers.com/p=1436702
to
http;//forum.xda-developers.com/p=1436703
etc
Anyway, yeah, it's never been released, hence no information on it, but I recently made up a bit of an overview/description of it for the recent LifeHacker.com non-Firefox browser wars. However, I think I went slightly outside the limitations of the competition (they wanted a max image size of 1280*1024). There was too much to fit in, so I think I got disqualified. However, if you wanna have a look, check out the image below.
I suggest that you first put your browser in fullscreen mode (press F11), and then scroll right to the bottom first, to see how I use it in a 1x3 (ie 4 browser panes) setup normally. Then scroll back up the graphic to see some of the main features (but not all!).
V
Warning: 0.9mb image!
Click to enlarge:
http://www.vijay555.com/smilies/VJMultibrowser.png [no compression]
VJMultibrowser - Features Part 1
PS: Some of the features, as described to LifeHacker.com
VJMultiBrowser is a browser “shell” I started working on some time back. Necessity was the mother of its invention – I worked in an office that had banned use of Internet Explorer. As such, I started discreetly using a custom version of Internet Explorer in Kiosk Mode to have a very low profile browser – no chrome at all, and no easy way to navigate.
I then started working on the MiniBrowser, a single browser with minimal chrome, ie very low profile interface, designed to use 99.5% of the available screen space for the browser, using only a tiny area for the necessary interface (Back, Forward, Home, Refresh, Save etc).
I quickly realized that for most efficient use while browsing, I would typically need at least 4 windows to be open simultaneously. This gave birth to VJMultiBrowser. The browser starts off as a single browser window with low profile interface. However, as required, up to three sibling browsers can be spawned to join the parent. Each browser is color coded in the top right so as not to lose track of them.
Each browser can be used to drag and drop using the MiniIcons in the top right near the navigation bar. Thus one can stay within the same browser window but drag off interesting links to its three brethren easily. The target browser will show a fluorescent green highlight to show it’s the required drop target, and if it’s currently obscured, it will jump up to the top to show which browser you are dropping into.
The home icon can also be used as a drag icon (to drag the current URL) and also as a drop target (eg highlight a URL in Word and drop it onto the home icon and it will navigate there).
The address bar and page title can be resized or completely hidden if not required. The home icon can optionally display the URL and Title as a Balloon, so no interface is required unless needed.
The address bar is a full command line – apps can be run, calculations performed, or jump to various shortcuts and favorites. Favorites and URLs will be autocompleted.
The concept is that I can use 4 browsers as a super-tabbed browser: 4 mini tabs accessible from each browser, and each browser can be hidden or viewed by clicking on its associated miniicon. Each browser can be maximized, closed, toggled in height, shrunk to an icon (MicroIcon mode) for non-obtrusive browsing. Each browser can be freely resized, or optionally docked together (like Winamp) and joint resized in proportion. Browsers can be resized using the numeric keypad for presets, or the cursor keys for pixel perfect resizing.
Layouts and current browsing sessions can be saved and reloaded by double clicking an icon or drag dropping a session onto the navigation bar. A single click can also resize the 4 browsers to quarter full screen (ie each browser takes a quarter of the screen), quarter non-full screen (same, but not the whole screen is used), explorer layout (1 large browser, 3 vertically adjacent mini browsers) etc.
Although typically 4 browsers are sufficient, for occasional usage you can “clone” either a fully featured MutliBrowser, or its little brother, the MiniBrowser. MiniBrowsers have full functionality, but have an even lower profile chrome/interface, ie just a context sensitive back and forward button, a home icon for drag drop saving etc, and a mini address bar. MiniBrowser are designed for temporary usage, and specialized usage, eg popping up Alexa information, a list of links on the page etc. Lists of links etc can be live filtered by typing the required path into the Mini Browser address bar.
A non complete list of features (as it’s in continuous development, and also, I forget all the little things built into it!):
* Built in command line from address bar - do calculations, run applications, aliases, live search and highlight, path navigation (with one button navigation up and down the website/directory path).
* File explorer – will navigate through local system to replace the Windows Explorer with a 4 pane multi-explorer.
* Use of customisable command aliases in address bar eg:
g] LifeHacker = google lifehacker
m] Bourne = find times for films containing Bourne
i] Bourne = imdb query Bourne
TRF to translate to French, TRG to translate to German etc.
* Aliases for most popular search engines, eBay, Movies.com, Wikipedia, IMDB etc. All aliases are user configurable
* Some Greasemonkey and embedded Javascript support, and customisable advanced bookmarklet support (can inject javascript and CSS sheets directly into the page. Optionally disable scripts, CSS and frames).
* CSS remover and rewriter.
* Built in WYSIWYG HTML editor.
* Live search type-ahead Google searches with one click access to searches and "I'm feeling lucky" targets (eg, start typing LifeHa, and press Ctrl + 1 to execute a Google search on the most popular hit for that search. Press Ctrl + Alt + 1 to go directly to LifeHacker.com).
* Live highlighting, eg start typing in Life and all references to Life will be highlighted, and a popup showing the hit count will appear. Quickly navigate forward and back through hits using F11 and F12.
* Live zoom in and out, and rotation (clockwise and anticlockwise). Can be used on websites and while image viewing – particularly useful when used in Explorer replacement mode, to browse through a folder full of images.
* Optional alpha transparency for the browser.
* Optional ghost mode for true transparent browsing – makes a selected colour on the webpage transparent, to allow viewing through webpage onto desktop etc. This is useful for example docking a display of live stock prices on the desktop, but not obscuring screen in any way.
* Gesture recognition for most important browsing functions.
Eg mouse drag left/right to go forward back, mouse drag up/down to navigate up and down directory path, button + drag to get special context menu for shortcuts, favorites etc. Browse with mouse only, no forward and back clicks required.
* Can host both the Internet Explorer and Mozilla browser for the best of both browser engines.
* Ad blocker, using customisable list of blockable urls.
* Anti-phising filter.
* Anti-spoofing filter and blocker (will catch rule defined exploits and warn before displaying the page, or optionally present a text only view of the page to disarm the spoof).
* Popup blocker, with optional override (either force popup into parent browser, or into a mini-browser so as not to obscure main session).
* Popup history to show URLs of overridden popups.
* Session based Browsing History (optionally saveable, by default erased on close). Color coded history shows what webpages were viewed by which Multibrowser.
* Form Filler – single click form filler to fill forms with generic, predefined form data eg Name, Address, Telephone) or fill in a form, save that data, and re-use pre-saved data to fill in that form on request.
* Save multi-browser layouts as shortcuts to reload and resume pre-defined browsing sessions with one click (eg have a folder on your desktop containing special layouts for News, RSS, Local Drives, YouTube).
* Image extractor (will present a list of all images on the page).
* Link extractor (will present a list of all links on the page).
* Site summarizer (will present a list of all links on the page with associated neighboring text, to quickly summarize the contents of a long page of links).
* Shortcut/Alias access to Alexa data and WhoIs data (presented in a mini-browser to not obscure main browsing session).
* ThumbNailer (will inject thumbails into links on the current page to see what the destination looks like).
* Built in RSS news reader.
* Optional Magnetized windows (like Winamp) to allow window docking and for the docked windows to be dragged as a group).
* Built in scratchpad/notepad with drag and drop save.
* Built in HTML to Text and HTML to PDF conversion. Merely drag the Home icon onto Notepad, Word etc and it will be automatically converted. Optionally right drag the home icon to save the URL only as text.
* Built in Speech engine to speak page or selected text.
* Zapper – remove any annoying page element (eg flashing adverts) by moving mouse over the element and pressing ctrl + z.
* Cropper – select required selection on the page and choose menu option to crop the entire page just to the selection: useful when printing only selected parts of a complex web page.
* Built in Favorites searching with wildcard searching and session saving.
* Gesture-based Favorites popup – Favorites presented as a popup menu by merely flicking the mouse.
Click to expand...
Click to collapse
V
VJMutlibrowser - Features Part 2
Some more of the features (messages have a limit of 10,000 characters. Who knew!?)
* Drag and drop search for Dictionary references, Google and Wikipedia (merely drop a selected word or phrase onto the navigation menu and a popup for each of these searches will appear). No keyboard required.
* Any corner dragging – resize the Browser from any corner using tiny drag handles in each corner. Alternatively use the efficient Multibrowser Gripper in the top right to drag and position the window, (left click and hold), resize the window (right click and hold), maximize (double click), minimize, toggle size etc.
* Desktop docking - immediately dock to any corner or edge. Use cursor keys for pixel perfect placement.
* Resizable Breadcrumb bar to allow single click navigation through local and web paths (eg, http://www.google.com/images/deviants, clicking on ‘images’ will immediately navigate to that URL. Also for local file browsing, eg in a path C:\Documents and Settings\MP014292\Desktop, clicking ‘C:\’ will browse to C:\.
* Status bar – hidden by default, can be displayed, resized. Carries an item history to see browser ‘status text’ all previous items. Will automatically extract embedded items like YouTube movies, flash games etc so they can be saved locally with one click.
* Optional keyboard only link navigation – jump to selected links, eg alt + 6 to jump to the 6th link on the page.
* Unlimited MultiBrowser and MiniBrowser clones – if more then 4 browers are required, more fully function browser windows can be spawned at the click of a button. MiniBrowsers (limited functionality browsers for displaying popups etc) can be similarly spawned.
* Custom error screen – if page cannot be found, a Google search will immediately be initiated, with links to Google Cache, Internet Archives, different domain suffixes (eg, Vijay555.com, .org, .co.uk etc)
* Single click appending of www. .com, www. .net, www. .co.uk, www. .org etc.
* Lots of other stuff I forget.
* 238k, installed. No spyware.
Click to expand...
Click to collapse
Note that the screenshot doesn't show all features. But hopefully gives some idea of how it works. All browser panes are freely resizeable etc though, so you can have any layout you want.
V
Use the XDA-Developers Toolbar,
Take a look at it at http://forum.xda-developers.com/showthread.php?t=330587

Bit of a problem with an app Im making...

Hi,
I am new to android development so sorry if this question has a really obvious answer. I am hoping to make a game for the platform but to start with I have just tried to make a basic layout of 4 buttons to move in different directions and then have a background and an image in front which will be my sprite and move across the screen depending on what button is pressed.
At the moment I have created two views. One via the main xml document and the other through the java code itself. The java code one contains the background and image to be drawn and the main.xml contains the buttons.
At the moment I have my code set up like this:
this.setContentView(R.layout.main); <<<<<<<<<< xml
this.setContentView(this.myTestView); <<<<<<<<<<<<<< java
I am aware that I am basically setting one and then setting the other over the top of it and this means that only one of these views will appear. Does anyone know of a way I can use these views in conjunction so that both the images frm the java file and the layout from the xml can both be used?
Cheers for any help.
ExO
As far as I know you cannot do this. By calling setContentView you are overwriting the object which held the content previously.
Once the view is set you can add items in code after this call.
Why do you not have all the elements in the xml?
aw ok, i wasnt sure if it was possible or not. The reason I did it like this was just because I'm still learning to use both languages. Aswell as that I am using droiddraw to generate my xml and couldnt see an option within that to add images etc. Cheers for the reply .

Why Wordpad++ over Wordpad?

Hi all. Can someone who uses Notepad++ explain why you use this program over Notepad? I ask because of course, I already have Notepad and Notepad++ does not appear to be readily available. Does it offer any advantage to editing .xmls or something else?
I think you actually mean Notepad++, and here's a quick summary of its features according to Wikipedia:
Features
Some of its general features include:
Tabbed document interface
Drag-and-drop
Multiple Clipboard (plugin required)
Split screen editing and synchronized scrolling
Spell checker (requires Aspell) (Spell checker does not distinguish between text and code)
Supports text encoding formats such as Unicode, for international writing systems
Find and replace over multiple documents
File comparison
Zooming
Programming languages
Running under Mac OS X using the Wine compatibility layer.
It also includes features for source code editing:
Auto-completion
Bookmarks
Syntax highlighting and syntax folding
Brace and indent highlighting
Regular expression find and replace
Speech synthesis
FTP Browser (plug-in included in standard installation)
Macro recording and execution.
Various tools such as line sorting, text encoding conversion, text folding
File status auto-detection
Plugins for multiline regular expression search and replace
Notepad++ supports syntax highlighting and syntax folding for 48 programming, scripting, and markup languages. It attempts to automatically detect the language that a given file uses, using a modifiable list of file extension bindings. Users may also manually set the current language, overriding the extension's default language. The program also supports autocompletion for a subset of the API of some programming languages.
Users can also define their own language (for syntax highlighting) and its respective API (for autocompletion) by using the built-in User Language Define System. Users may configure the syntax highlighting's font styles per element, per language, and the resulting formatted script may be printed in full-color (WYSIWYG). Additionally, Notepad++ displays indent guidelines when source code is indented with tab characters, and highlights closing braces, brackets and tags.
Plugins
Notepad++ has support for macros and plugins. Currently, there are 27 official plugins for Notepad++, 10 of which are included by default in the program. The first plugin to be included in the program was "TextFX", which includes features such as W3C validation for HTML and CSS, text sorting, character case alteration and quote handling.
Hopefully that answers your question!
Ha I did mean Notepad++!! That's probably why I couldn't find much info on Wordpad lol.
I use it cause it allows you to save stuff as unix/linux. When you write code with regular notepad it adds under
un-wanted characters messing **** up. Notepad ++ dont do this
Sent from my SPH-D700 using Tapatalk
Thanks. I need to download that notepad++ tonight
Sent from my SPH-D700 using XDA App
running_the_dream said:
Hi all. Can someone who uses Notepad++ explain why you use this program over Notepad? I ask because of course, I already have Notepad and Notepad++ does not appear to be readily available. Does it offer any advantage to editing .xmls or something else?
Click to expand...
Click to collapse
I use it because of all of the features. There is no comparison. The main features I use are the code formatting, comparison, advanced search and replace & spell checker just to name a few.
Sent from my SPH-D700
Sent from my SPH-D700 using XDA App

[Q] Drawer Category definition...

Can anyone tell me how/where you define the categories under the app drawer?
Each time I flash a ROM, I lose my category definitions, although any home screen "launcher action" widgets can be recovered. If I can match the order in which I defined the categories then my widgets will be ok.
I'm guessing that when you add a new catalog, you add some sort of file with a number and that is linked in the launcher action widget. e.g. Add new catogory "Office" to the menu maps to /data/data/appdrawer/categories/1.xml (I'm guessing the location and format - hopefully someone can let me know how it really works!)
That file 1.xml contains the name "Office" somewhere in its definition (or even somewhere else relative to the launcher/appdrawer) so that 1.xml can be identified as "Office"
However, when you create a launcher action widget, I think that a link is created and that that doesn't care about the name (you can call the widget whatever you want) so your widget might be "Office.wdgt" which is linked to "1.xml" from above. That works until you flash a new rom and then you have to remember that you created the "Office" category first otherwise the widget, which still links to "1.xml" will point to the newly defined first category...
I've got about 9 or 10 categories and it's a PITA trying to remember the order I've defined them in. If I could interrogate a file somehow through adb or via the terminal, that'd be great as I could at least recover my categories in the correct order and not have to recreate all of the widgets.
[Edit]
Alternatively - Does anyone know how to disassemble the ADW backup files? It's these that are referencing the drawer categories, so perhaps I can work it out from the ADW backup...
[/Edit]
Can anyone help?
Thanks in advance
Bingo - I think.
The adw_ex_launcher.db file is an SQLite database which can be viewed using sqljet-browser or any other SQLite browser software. In there, there is a favorites table and the data has title and intent columns (amongst others) Within the intent data the CATALOG_INDEX is defined and this ranks the categories as needed.
At least with this I can setup my categories, knowing that they're defined in the correct order and I don't have to mess around with redefining both catalogs and home screen launcher actions.
Hope this helps someone else...

Request desktop site

Is there a way to change a global setting so when browsing it does not automatically render in "tiny little phone" mode?For some sites I have to either request desktop site scoll to the bottom and choose desktop or some other convoluted way.

Categories

Resources