Tag Archives: android

Android Numeric Keypad Password Field

Just discovered something, which may be useful to some of you Googlers!

Problem

To get a the numeric keypad up on an iOS device it’s fairly easy. All you do is apply the pattern attribute. At Sky we use ‘pattern=”\d*”‘ in our codebase. The problem is that this doesn’t work on Android. Android requires that the field has a type attribute of either, ‘tel’ or ‘number’. This creates problems, as it means that if you want a numeric password field, you can’t get the numeric keypad up on Android… or can you?

Introducing -webkit-text-security:

The solution (and this also works for iOS) is to create all numeric password fields as ‘number’ (‘tel’ works too), and apply the following CSS property:

input[type=number] {
  -webkit-text-security: disc;
}

This replaces the text with the asterisk typically found on a password field. This means that you can do away with the ‘pattern’ attribute completely. I’d strongly suggest that you don’t get carried away and use this CSS for all password fields – it should really only be used where you need a numeric keypad for a password!

I’ve confirmed this works on iOS 6.1.2, Android 2.3.3 and Android 4.1.2

Hope that helps someone 🙂

Share

Apple or Android / Apple or Microsoft

With it being over 6 months since my last blog post, I figured I’d stick another post in. This time I’m looking for your opinion on whether I should stick with my current setup (below) or move to a new setup!

My Current Setup (Got a problem with Dell? Well it’s never failed for me!)

Desktop: Dell Dimension 9200 Tower w/19″ Widescreen (Windows 7 Ultimate)
Laptop: Dell Inspiron 1545 w/15.6″ Widescreen (Windows 7 Ultimate)
Phone: Google Nexus One (Froyo AKA Anroid2.2)

I’ll start with my Dekstop: I bought it in June 2007 as I needed a “super-fast” computer for working with .NET and the Silverlight Framework in my new job – as it happens I decided to focus my ‘career’ down the PHP route, so I’ve never really utilsed the power. Naturally though, this meant that it was always meant to be a Windows-based PC, and it came with Vista (which I have since upgraded to Windows 7). I’ve played with Ubuntu before, and I like it – but I have too many applications that I cannot get to work correctly within it (Photoshop, Fireworks, Flash etc). So, I’m using Windows 7 – and it’s great (no, seriously, it is!)

It’s pretty much the same story with my laptop.

Roll forward to April 2009, and I bought my shiny Apple iPhone 3G – I gave my iPod Nano away, and loaded all my music onto the phone. The iPhone was Awesome, but that didn’t stop me buying a Google Nexus One (January 2010). Why? Because I love Google! After using both, I can definately say that the Android device offers much more than the iPhone 3G, and that I know I made the right decision.

I now use Dropbox to syncronise my Desktop with my Laptop, and also have the Dropbox App on my phone. So everything is perfect, it’s all good – but I want something new and shiny to play with, like an iPhone 4, and an MacBook Pro…

Can someone convince me that I’m being stupid, or persuade me enough to go out and buy one…?!

Share

Green Android Desk Stand

Well, in an earlier post – I showed you how to make a budget Nexus One Andrex Dock

I thought I’d get creative – so I had a look how to make play dough:

http://becomingdomestic.co.uk/2006/10/28/how-to-make-playdough-no-cook-recipe/

And then Proceeded:

Ingredients in the bowl...

Ingredients in the bowl...

We NEED green!

We NEED green!

Mix it up...

Mix it up...

Aaah, lovely loaf...

Aaah, lovely loaf...

Into shape...

Into shape...

Right now, the thing is in the oven.

Apparently you are not meant to put play doh in the oven. So it may just be a big PHAT PHAIL!

I’ll update once it’s out the oven!!

UPDATE: ITS OUT THE OVEN

It burnt...

It burnt...

android-stand-7

so yeah, damn good reason to stop being a tight ass and pay for the shipping from the US for the Google Nexus One Desktop Dock!!

Share