avast / android-butterknife-zelezny

Android Studio plug-in for generating ButterKnife injections from selected layout XML.
Apache License 2.0
3.38k stars 412 forks source link

Allow some way for Zelenzy play well with BaseActivity / BaseFragment #68

Open ubiratansoares opened 9 years ago

ubiratansoares commented 9 years ago

Hi guys

Usually I`ve some BaseActivity and/or BaseFragment in my projects, something like

public abstract class BaseActivity extends AppCompatActivity {

protected abstract int getLayoutResource();

@Override protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(getLayoutResource());
    ButterKnife.bind(this);
}

}

I really love Butterknife Zelenzy, but the plugin does not play well with Butterknife binding as superclass-made behavior.

There is any way to provide an optional setting for this plugin to disable the lifecycle methods re-generation? Maybe a checkbox on the fields input screen ...

Thanks in advance and kudos for the amazing work!

TomasKypta commented 9 years ago

Hi, this is a good idea. We should improve behavior in these cases.

smithaaron commented 9 years ago

I came here to request exactly this. I also use base classes and have to delete this stuff every time I use the plugin.

davidvavra commented 8 years ago

Good idea, we will accept a pull request for this.

yuzhongxingke commented 8 years ago

Is not available now, this is a useful function, and add in, please?

siempredelao commented 7 years ago

Related with #74 .