title: Set inner edittext xml properties on custom view
body: <p>I created a compound view consisting on an <code>EditText</code> and a <code>TextView</code>... I want make any developer using my view able to do the following</p>
  
  <pre><code>&lt;MyCustomView
              android:id="@+id/password"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              app:setInputType="textPassword"/&gt;
  </code></pre>
  
  <p>Pay close attention to the last line of that xml. 
  How can I wire that property to the <code>EditText</code> that lives inside <code>MyCustomView</code></p>
  
  <p>PD: I already created a  on Attrs.xml and tried to do this</p>
  
  <pre><code>&lt;declare-styleable name="ValidateEditText"&gt;
  &lt;flag name="none" value="0x00000000" /&gt;
              &lt;flag name="text" value="0x00000001" /&gt;
              &lt;flag name="textCapCharacters" value="0x00001000" /&gt;
              &lt;flag name="textCapWords" value="0x00002000" /&gt;
              &lt;flag name="textCapSentences" value="0x00004000" /&gt;
              &lt;flag name="textAutoCorrect" value="0x00008000" /&gt; ...
  </code></pre>
  
  <p>This does not work.. EditText.setContentType is not working for some reason</p>
  
  <p>I alredy set other custom attributes, my question is how to set this particular one "InputType" doesnt seem to be working.</p>
  
  <pre><code>protected void init(Context context, AttributeSet attrs) {
  
      if (attrs != null) {
          TypedArray typedArray;
          typedArray = context.obtainStyledAttributes(attrs, R.styleable.ValidateEditText);
          try {
              mHint = typedArray.getString(R.styleable.ValidateEditText_hint);
  
              mInputType = typedArray.getInt(R.styleable.ValidateEditText_inputType, EditorInfo.TYPE_CLASS_TEXT);
              mMaxLength = typedArray.getInt(R.styleable.ValidateEditText_maxLength, -1);
              mSingleLine = typedArray.getBoolean(R.styleable.ValidateEditText_singleLine, false);
              mPassword = typedArray.getBoolean(R.styleable.ValidateEditText_password, false);
              mImeOption = typedArray.getInt(R.styleable.ValidateEditText_imeOptions, EditorInfo.IME_ACTION_NEXT);
              mEditable = typedArray.getBoolean(R.styleable.ValidateEditText_editable, true);
          } catch (Exception e) {
              e.printStackTrace();
          } finally {
              typedArray.recycle();
          }
      }
  }
  
  @Override
  protected void onFinishInflate() {
      super.onFinishInflate();
  
      //Initialise views
      mErrorMessage = (TextView) findViewById(R.id.error_msg);
          mEditText = (EditText) findViewById(R.id.edit_text);
  
  
          mEditText.setInputType(mInputType); 
      ...
  }
  </code></pre>