Swipe to Delete and the “More” button (like in Mail app on iOS 7)

How to Implement It looks like iOS 8 opens up this API. Hints of such functionality are present in Beta 2. To get something working, implement the following two methods on your UITableView’s delegate to get the desired effect (see gist for an example). – tableView:editActionsForRowAtIndexPath: – tableView:commitEditingStyle:forRowAtIndexPath: Known Issues The documentation says tableView:commitEditingStyle:forRowAtIndexPath is: … Read more

What’s the difference between fill_parent and wrap_content?

Either attribute can be applied to View’s (visual control) horizontal or vertical size. It’s used to set a View or Layouts size based on either it’s contents or the size of it’s parent layout rather than explicitly specifying a dimension. fill_parent (deprecated and renamed MATCH_PARENT in API Level 8 and higher) Setting the layout of … Read more

How do I add options to a DropDownList using jQuery?

Without using any extra plugins, var myOptions = { val1 : ‘text1’, val2 : ‘text2’ }; var mySelect = $(‘#mySelect’); $.each(myOptions, function(val, text) { mySelect.append( $(‘<option></option>’).val(val).html(text) ); }); If you had lots of options, or this code needed to be run very frequently, then you should look into using a DocumentFragment instead of modifying the … Read more

Create a directly-executable cross-platform GUI app using Python

First you will need some GUI library with Python bindings and then (if you want) some program that will convert your python scripts into standalone executables. Cross-platform GUI libraries with Python bindings (Windows, Linux, Mac) Of course, there are many, but the most popular that I’ve seen in wild are: Tkinter – based on Tk … Read more

How can I make the cursor turn to the wait cursor?

You can use Cursor.Current. // Set cursor as hourglass Cursor.Current = Cursors.WaitCursor; // Execute your time-intensive hashing code here… // Set cursor as default arrow Cursor.Current = Cursors.Default; However, if the hashing operation is really lengthy (MSDN defines this as more than 2-7 seconds), you should probably use a visual feedback indicator other than the … Read more