Skip to main content

Posts

How to create PDFs in Android SDK?

is there any way to create create PDF Files from an android application? So far I've found nothing short of writing all the code from scratch. Is there any API I can use, that works on android? Thanks in advance. Source: Tips4all

How to register some URL namespace (myapp://app.start/) for accessing your program by calling a URL in browser in Android OS?

So I want to create an Android app so it would be registered somewhere in android OS (or just would start on system start) and when phone user clicks on special button on a web page inside a web browser a la: <a href="myapp://mysettings">Foo</a> my app would pop up and run using the params sent in that URL. So how do I do such thing? I need a tutorial with code! Source: Tips4all

ASP.NET MVC and AJAX

I have a view which is composed of top, left and bottom headers and a main contents pane. Suppose that during an AJAX request I need to update the HTML of the top, bottom and main panels (the left header should stay the same). I was wondering what would be the best way to accomplish this. The first thought was to put the main contents panel into a partial and have a controller action that would return PartialView. This wouldn't work because as the action returns only the HTML of the main pane I cannot update the top and bottom headers. So if I put the top and bottom headers into their own respective partial views I would need my controller action to return multiple partial views. Is this possible at all or I am doing something completely off the track? I saw that it is possible to render a partial view to a string so I thought that I could use this technique in the action to return a JSON object with 3 properties representing the HTML of the 3 partials that I need to updat

jQuery - filter element based on .data() key/value

Say I have 4 div elements with class .navlink , which, when clicked, use .data() to set a key called 'selected' , to a value of true : $('.navlink')click(function() { $(this).data('selected', true); }) Every time a new navlink is clicked, I would like to store the previously selected navlink for later manipulation. Is there a quick and easy way to select an element based on what was stored using .data() ? There don't seem to be any jQuery :filters that fit the bill, and I tried the following (within the same click event), but for some reason it doesn't work: var $previous = $('.navlink').filter( function() { $(this).data("selected") == true } ); I know that there are other ways to accomplish this, but right now I'm mostly just curious if it can be done via .data() . Thanks. Source: Tips4all

Detect application heap size in Android

How do you programmatically detect the application heap size available to an Android app? I heard there's a function that does this in later versions of the SDK. In any case, I'm looking for solution that works for 1.5 and upwards. Source: Tips4all