title: Custom view style, android's attributes are ignored
body: <p>I created a custom compound view - the view loads, no crashes, so far so good.</p>
  <p>Now, i plan to use this view MANY MANY times in my app, so the view needs a style.</p>
  <p>I declared a styleable for it in my attr.xml file</p>
  <pre><code>  &lt;declare-styleable name=&quot;MyCustomView&quot;&gt;
  
          &lt;attr name=&quot;ff_label&quot; format=&quot;string&quot; /&gt;
          &lt;attr name=&quot;ff_fieldText&quot; format=&quot;string&quot; /&gt;
      &lt;/declare-styleable&gt;
      
      &lt;declare-styleable name=&quot;MyCustomViewStyle&quot;&gt;
          &lt;attr name=&quot;customViewStyle&quot; format=&quot;reference&quot; /&gt;
      &lt;/declare-styleable&gt;
  </code></pre>
  <p>Then i went to my theme file and wrote this inside</p>
  <pre><code>&lt;!-- Application theme. --&gt;
  &lt;style name=&quot;AppTheme&quot; parent=&quot;AppBaseTheme&quot;&gt;
  
      &lt;!-- All customizations that are NOT specific to a particular API-level can go here. --&gt;
      //bunch of other stuff
      &lt;item name=&quot;customViewStyle&quot;&gt;@style/customViewStyle&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  <p>then in my android manifest i declared</p>
  <pre><code>&lt;application
          android:name=&quot;com.my.app.App&quot;
          android:allowBackup=&quot;true&quot;
          android:icon=&quot;@drawable/ic_launcher&quot;
          android:label=&quot;@string/app_name&quot;
          android:theme=&quot;@style/AppTheme&quot; &gt;
  </code></pre>
  <p>then in my styles.xml file i wrote</p>
  <pre><code>   &lt;style name=&quot;customViewStyleStyle&quot; parent=&quot;@android:style/Widget.EditText&quot;&gt;
          &lt;item name=&quot;android:paddingBottom&quot;&gt;@dimen/space_between_adjacent_widgets_vertical&lt;/item&gt;
          &lt;item name=&quot;android:layout_width&quot;&gt;match_parent&lt;/item&gt;
          &lt;item name=&quot;android:layout_height&quot;&gt;wrap_content&lt;/item&gt;
          &lt;item name=&quot;ff_label&quot;&gt;@string/default_label_text&lt;/item&gt;
          &lt;item name=&quot;ff_fieldText&quot;&gt;@string/default_label_text&lt;/item&gt;
      &lt;/style&gt;
  </code></pre>
  <p>My problem : My OWN attributes are recognised just fine.<br />
  Why are the attributes labeled <code>&quot;android:...&quot;</code> ignored ?</p>
  <p>MyCustomView.java</p>
  <pre><code>public MyCustomView(Context context, AttributeSet attrs) {
      super(context, attrs);
      initAttributes(context, attrs, R.attr.customViewStyle);
  }
  
  public MyCustomView(Context context) {
      super(context);
      initAttributes(context, null, R.attr.customViewStyle);
  }
  
  private void initAttributes(Context context, AttributeSet attrs, int defStyle) {
      LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      inflater.inflate(R.layout.custom_view, this, true);
      label = (TextView) findViewById(R.id.label);
      formField = (EditText) findViewById(R.id.formField);
      TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.MyCustomView, defStyle,0);
  
      if (a.hasValue(R.styleable.MyCustomView_ff_label)) {
          labelText = a.getString(R.styleable.MyCustomView_ff_label);
          label.setText(labelText);
      }
  
      
      if (a.hasValue(R.styleable.MyCustomView_ff_fieldText)) {
          fieldText = a.getString(R.styleable.MyCustomView_ff_fieldText);
          field.setHint(fieldText);
      }
      
      
      a.recycle();
  }
  </code></pre>
  <p>layout.xml</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;TableLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res/com.my.app&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      android:orientation=&quot;vertical&quot; &gt;
  
      &lt;com.my.app.MyCustomView
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
            /&gt;
  
     &lt;com.my.app.MyCustomView
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
            /&gt;
  
      &lt;com.my.app.MyCustomView
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
            /&gt;
  
      &lt;com.my.app.MyCustomView
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
            /&gt;
  
      &lt;com.my.app.MyCustomView
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
            /&gt;
  
      &lt;com.my.app.MyCustomView
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
            /&gt;
  
      &lt;com.my.app.MyCustomView
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
            /&gt;
  
      &lt;com.my.app.MyCustomView
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
            /&gt;
  
      &lt;include layout=&quot;@layout/layout_set_default&quot; /&gt;
  
  &lt;/TableLayout&gt;
  </code></pre>
  <p>The default height of 1 view is about 30 dp - &gt; and i can't use a list view for it.
  Its supposed to have 10dp padding between each view</p>