I would like to load the value of Name from the sharedpreference that is defined below, but I cant. How can I extract the value of Name and toast it or ideally put it in the tex
You should either use getDefaultSharedPreferences() or getSharedPreferences("myCustomSharedPrefs",...) in both places.
getDefaultSharedPreferences()
getSharedPreferences("myCustomSharedPrefs",...)
That way you create (AFAIK) different shared preferences and fail to read the data you write into the other.