you put:
String PREF_NAME = "null";
then you are never changing its value (and you should not, see later..) and you are printing out:
System.out.println(PREF_NAME);
==> obviously you get "null" as output
What you should do instead:
final String PREF_NAME = "pref_name"; //define the name for your key
then later:
prefs.put(PREF_NAME, unameTextField.getText()); //put something in your preference using your key
System.out.println(prefs.get(PREF_NAME, "no value")); //output the preference *value* not the key
see the documentation