title: How to get android default attributes in a custom view
body: <p>I have created a simple custom view that contains a <code>RelativeLayout</code> and an <code>EditText</code>:</p>
  
  <pre><code>&lt;RelativeLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"&gt;
  
      &lt;EditText
          android:id="@+id/edt_content"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"/&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Also I have added some custom attributes in <code>res/values/attrs.xml</code> and I retrieve these attributes in my custom view constructor and everything works ok.</p>
  
  <p>Now, I want to retrieve <code>EditText</code> default attributes in my custom view for example I want to get <code>android:text</code> attribute in my custom view.</p>
  
  <p>My custom view class (<em>simplified</em>):</p>
  
  <pre><code>public class CustomEditText extends RelativeLayout {
      private int panCount;
  
      public CustomEditText(Context context, AttributeSet attrs) {
          super(context, attrs);
          TypedArray typedArray = context.getTheme().obtainStyledAttributes(attrs,
              R.styleable.CustomEditText, 0, 0);
          try {
              this.panCount = typedArray.getInt(R.styleable.CustomEditText_panCount, 16);
          } finally {
              typedArray.recycle();
          }
      }
  }
  </code></pre>
  
  <p>How can I do that without redeclaring text attribute in <code>res/values/attrs.xml</code>? </p>