title: Set inputType for an EditText within an Alert Dialog?
body: <p>I am trying to add a AlertDialog to ask for people's name when they 1st start an app. I have created an EditText for entry purpose. I want to change the input type for this EditText to ensure capitalization at word level as I am expecting proper names. I referred to multiple links, they all provided the same answer,</p>
  
  <pre><code>    AlertDialog.Builder alert = new AlertDialog.Builder(this);
      alert.setTitle("Hello!");
      alert.setMessage("What is your name?");
  
      final EditText input = new EditText(this)
      input.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_WORDS)
      alert.setview(input)
  </code></pre>
  
  <p>But it is not working. Throwing me an error saying "cannot resolve symbol 'InputType'". Please help.</p>
  
  <p>I am new to Android apps. If there is more information you require, please let me know. I could not figure out what exactly will be required. Appreciate in advance.</p>