Skip to content

Commit 3994973

Browse files
committed
remove the butterknife
1 parent dac5bc0 commit 3994973

File tree

3 files changed

+2
-14
lines changed

3 files changed

+2
-14
lines changed

myutils/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ dependencies {
2727
//noinspection GradleDynamicVersion
2828
implementation 'com.android.support:design:27+'
2929

30-
implementation 'com.jakewharton:butterknife:10.1.0'
31-
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
30+
// implementation 'com.jakewharton:butterknife:10.1.0'
31+
// annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
3232
}

myutils/src/main/java/com/jty/myutils/base/BaseActivity.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
import com.jty.myutils.R;
1616
import com.jty.myutils.ui.StatusBarCompat;
1717

18-
import butterknife.ButterKnife;
19-
import butterknife.Unbinder;
2018

2119
/**
2220
* Created by TaoYuan on 2018/3/26 0026.
@@ -34,8 +32,6 @@ public abstract class BaseActivity extends Activity {
3432
*/
3533
protected final int TITLE_TYPE_IMG = 1;
3634

37-
private Unbinder unbinder;
38-
3935
@Override
4036
protected void onCreate(Bundle savedInstanceState) {
4137
super.onCreate(savedInstanceState);
@@ -51,8 +47,6 @@ protected void onCreate(Bundle savedInstanceState) {
5147
SetStatusBarColor();
5248

5349
setContentView(getLayoutId());
54-
//绑定ButterKnife
55-
unbinder = ButterKnife.bind(this);
5650

5751
this.initPresenter();
5852
this.initView();
@@ -104,7 +98,6 @@ protected void onStop() {
10498
protected void onDestroy() {
10599
super.onDestroy();
106100
AppManager.getAppManager().finishActivity(this);
107-
unbinder.unbind();
108101

109102
}
110103

myutils/src/main/java/com/jty/myutils/base/BaseFragment.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
import android.view.View;
1010
import android.view.ViewGroup;
1111

12-
import butterknife.ButterKnife;
13-
import butterknife.Unbinder;
1412

1513
/**
1614
* Created by TaoYuan on 2018/3/27 0027.
@@ -21,15 +19,13 @@
2119
public abstract class BaseFragment extends Fragment {
2220
protected View rootView;
2321
public Context mContext;
24-
private Unbinder unbinder;
2522

2623
@Nullable
2724
@Override
2825
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
2926
if (rootView == null)
3027
rootView = inflater.inflate(getLayoutResource(), container, false);
3128

32-
unbinder = ButterKnife.bind(this, rootView);
3329

3430
if (mContext != null) {
3531
mContext = this.getActivity();
@@ -92,7 +88,6 @@ public void startActivity(Class<?> cls, Bundle bundle) {
9288
@Override
9389
public void onDestroyView() {
9490
super.onDestroyView();
95-
unbinder.unbind();
9691
}
9792

9893

0 commit comments

Comments
 (0)