title: Getting value from edittext preference in preference screen
body: <p>I'm new to android development. I just heard about preference screen in android. So I just made one. This is just to enter name in a dialog. </p>
  
  <pre><code>&lt;PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" &gt;
     &lt;EditTextPreference 
     android:title="Name"
     android:summary="To enter name click on Name"
     android:dialogTitle="Name Dialog"
     android:dialogMessage="Enter Your Name"
     android:key="name"/&gt;
  </code></pre>
  
  <p>This is my created preference screen. I just need to know how can I access the entered name 'tony' in my mainactivity. I don't know the way to access the name from the dialog. Do I need to add any seperate activity for accessing the name in the name dialog. Can someone please explain it to me.</p>
  
  <p><img src="https://i.stack.imgur.com/O558T.jpg" alt="enter image description here"><img src="https://i.stack.imgur.com/UXOXG.jpg" alt="enter image description here"></p>