title: Android Annotations: custom view inheritance?
body: <p>I'm trying to create a custom view that has a content area and a progress bar so that any inheriting custom view would have it's layout inflated in the content area. That way you could show/hide the progress bar on the child view.</p>
  
  <pre><code>@EViewGroup(R.layout.loading_view)
  class LoadingView extends RelativeLayout{
  
         // some code
  
         @ViewById FrameLayout content;
         @ViewById ProgressBar pb;
  
         public View getFrameLayout(){
                // sub-classes will use this to inject their content 
                return content; 
         }
  
         void setIsLoading(boolean l){
                // shows\hides pb
         }
  }
  
  @EViewGroup(R.layout.other_view)
  class OtherView extends LoadingView{
         @ViewById TextView someTxt;
  
         public OtherView(...){
                // inject to getFrameLayout()
         }
  
  }
  </code></pre>
  
  <p>Now this doesn't remotely work. Here is why:</p>
  
  <ul>
  <li><p><code>@EViewGroup</code> on <code>OtherView</code> overrides the one on <code>LoadingView</code> so <code>R.layout.loading_view</code> doesn't even gets loaded. it only gets loaded if you specify <code>@EViewGroup(R.layout.loading_view)</code></p>
  
  <ul>
  <li>if you do specify the same layout , there is no point in having <code>Android Annotations</code> in the first place since it will not inject view in <code>OtherView</code>.</li>
  </ul></li>
  </ul>
  
  <p>Is there any way at all to make this work ? Any ideas ?</p>