occasionally useful ruby, ubuntu, etc


Telling Android to Conserve Data on Mobile Hotspots in Android 4.1

So it turns out there actually is a way to inform your device (as long as it's Android 4.1 or above) which WiFi networks are actually mobile hotspots. It can't (or doesn't, anyway) do this automatically, and having your other devices connect to your mobile hotspot and then download large program updates is no fun! So I discovered the somewhat elusive option in the settings and thought I'd share.

Filed under: android Continue reading

Attaching a sticky (fixed) header/footer to an Android ListView

In my Android app, I have a ListView, and I want to persist a button at the bottom of the page (like how the Gmail app has Archive, Delete, and Older on the View Email screen). Unfortunately, this is not trivial, and many others have tried, but despite those suggestions, I never found something that quite worked correctly. The third article above got me actually pretty close, so without further ado, here's a working solution (images and javascript include after the jump):

Filed under: android Continue reading