GeezerVison is showing github.com — chore: upgrade ButterKnife 5.1.1 -> 7.0.1 · java4ever/RxJava-Android-Samples@e42ee1e
File treeExpand file treeCollapse file tree Open diff view settings src/main/java/com/morihacky/android/rxjava
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: app/build.gradle +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -10,7 +10,7 @@ dependencies { | 10 | 10 | compile 'io.reactivex:rxjava-math:1.0.0' | 11 | 11 | compile 'com.jakewharton.rxbinding:rxbinding:0.2.0' | 12 | 12 |
| 13 | | - compile 'com.jakewharton:butterknife:5.1.1' | | 13 | + compile 'com.jakewharton:butterknife:7.0.1' | 14 | 14 | compile 'com.jakewharton.timber:timber:2.4.2' | 15 | 15 | compile 'com.squareup.retrofit:retrofit:2.0.0-beta1' | 16 | 16 | compile 'com.squareup.retrofit:adapter-rxjava:2.0.0-beta1' | |
Collapse file Copy file name to clipboardExpand all lines: app/src/main/java/com/morihacky/android/rxjava/fragments/BufferDemoFragment.java +8-5Lines changed: 8 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 9 | 9 | import android.view.ViewGroup; | 10 | 10 | import android.widget.Button; | 11 | 11 | import android.widget.ListView; | 12 | | -import butterknife.ButterKnife; | 13 | | -import butterknife.InjectView; | | 12 | + | 14 | 13 | import com.jakewharton.rxbinding.view.RxView; | 15 | 14 | import com.jakewharton.rxbinding.view.ViewClickEvent; | 16 | 15 | import com.morihacky.android.rxjava.R; | 17 | 16 | import com.morihacky.android.rxjava.wiring.LogAdapter; | | 17 | + | 18 | 18 | import java.util.ArrayList; | 19 | 19 | import java.util.List; | 20 | 20 | import java.util.concurrent.TimeUnit; | | 21 | + | | 22 | +import butterknife.Bind; | | 23 | +import butterknife.ButterKnife; | 21 | 24 | import rx.Observer; | 22 | 25 | import rx.Subscription; | 23 | 26 | import rx.android.schedulers.AndroidSchedulers; | | 41 | 44 | public class BufferDemoFragment | 42 | 45 | extends BaseFragment { | 43 | 46 |
| 44 | | - @InjectView(R.id.list_threading_log) ListView _logsList; | 45 | | - @InjectView(R.id.btn_start_operation) Button _tapBtn; | | 47 | + @Bind(R.id.list_threading_log) ListView _logsList; | | 48 | + @Bind(R.id.btn_start_operation) Button _tapBtn; | 46 | 49 |
| 47 | 50 | private LogAdapter _adapter; | 48 | 51 | private List<String> _logs; | @@ -72,7 +75,7 @@ public View onCreateView(LayoutInflater inflater, | 72 | 75 | @Nullable ViewGroup container, | 73 | 76 | @Nullable Bundle savedInstanceState) { | 74 | 77 | View layout = inflater.inflate(R.layout.fragment_buffer, container, false); | 75 | | - ButterKnife.inject(this, layout); | | 78 | + ButterKnife.bind(this, layout); | 76 | 79 | return layout; | 77 | 80 | } | 78 | 81 |
| |
Collapse file Copy file name to clipboardExpand all lines: app/src/main/java/com/morihacky/android/rxjava/fragments/ConcurrencyWithSchedulersDemoFragment.java +9-6Lines changed: 9 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 11 | 11 | import android.widget.ArrayAdapter; | 12 | 12 | import android.widget.ListView; | 13 | 13 | import android.widget.ProgressBar; | 14 | | -import butterknife.ButterKnife; | 15 | | -import butterknife.InjectView; | 16 | | -import butterknife.OnClick; | | 14 | + | 17 | 15 | import com.morihacky.android.rxjava.R; | | 16 | + | 18 | 17 | import java.util.ArrayList; | 19 | 18 | import java.util.List; | | 19 | + | | 20 | +import butterknife.Bind; | | 21 | +import butterknife.ButterKnife; | | 22 | +import butterknife.OnClick; | 20 | 23 | import rx.Observable; | 21 | 24 | import rx.Observer; | 22 | 25 | import rx.Subscription; | | 28 | 31 | public class ConcurrencyWithSchedulersDemoFragment | 29 | 32 | extends BaseFragment { | 30 | 33 |
| 31 | | - @InjectView(R.id.progress_operation_running) ProgressBar _progress; | 32 | | - @InjectView(R.id.list_threading_log) ListView _logsList; | | 34 | + @Bind(R.id.progress_operation_running) ProgressBar _progress; | | 35 | + @Bind(R.id.list_threading_log) ListView _logsList; | 33 | 36 |
| 34 | 37 | private LogAdapter _adapter; | 35 | 38 | private List<String> _logs; | @@ -54,7 +57,7 @@ public View onCreateView(LayoutInflater inflater, | 54 | 57 | @Nullable ViewGroup container, | 55 | 58 | @Nullable Bundle savedInstanceState) { | 56 | 59 | View layout = inflater.inflate(R.layout.fragment_concurrency_schedulers, container, false); | 57 | | - ButterKnife.inject(this, layout); | | 60 | + ButterKnife.bind(this, layout); | 58 | 61 | return layout; | 59 | 62 | } | 60 | 63 |
| |
Collapse file Copy file name to clipboardExpand all lines: app/src/main/java/com/morihacky/android/rxjava/fragments/DebounceSearchEmitterFragment.java +9-6Lines changed: 9 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 11 | 11 | import android.widget.ArrayAdapter; | 12 | 12 | import android.widget.EditText; | 13 | 13 | import android.widget.ListView; | 14 | | -import butterknife.ButterKnife; | 15 | | -import butterknife.InjectView; | 16 | | -import butterknife.OnClick; | | 14 | + | 17 | 15 | import com.jakewharton.rxbinding.widget.RxTextView; | 18 | 16 | import com.jakewharton.rxbinding.widget.TextViewTextChangeEvent; | 19 | 17 | import com.morihacky.android.rxjava.R; | | 18 | + | 20 | 19 | import java.util.ArrayList; | 21 | 20 | import java.util.List; | 22 | 21 | import java.util.concurrent.TimeUnit; | | 22 | + | | 23 | +import butterknife.Bind; | | 24 | +import butterknife.ButterKnife; | | 25 | +import butterknife.OnClick; | 23 | 26 | import rx.Observer; | 24 | 27 | import rx.Subscription; | 25 | 28 | import rx.android.schedulers.AndroidSchedulers; | | 30 | 33 | public class DebounceSearchEmitterFragment | 31 | 34 | extends BaseFragment { | 32 | 35 |
| 33 | | - @InjectView(R.id.list_threading_log) ListView _logsList; | 34 | | - @InjectView(R.id.input_txt_debounce) EditText _inputSearchText; | | 36 | + @Bind(R.id.list_threading_log) ListView _logsList; | | 37 | + @Bind(R.id.input_txt_debounce) EditText _inputSearchText; | 35 | 38 |
| 36 | 39 | private LogAdapter _adapter; | 37 | 40 | private List<String> _logs; | @@ -51,7 +54,7 @@ public View onCreateView(LayoutInflater inflater, | 51 | 54 | @Nullable ViewGroup container, | 52 | 55 | @Nullable Bundle savedInstanceState) { | 53 | 56 | View layout = inflater.inflate(R.layout.fragment_debounce, container, false); | 54 | | - ButterKnife.inject(this, layout); | | 57 | + ButterKnife.bind(this, layout); | 55 | 58 | return layout; | 56 | 59 | } | 57 | 60 |
| |
Collapse file Copy file name to clipboardExpand all lines: app/src/main/java/com/morihacky/android/rxjava/fragments/DoubleBindingTextViewFragment.java +8-6Lines changed: 8 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 7 | 7 | import android.view.ViewGroup; | 8 | 8 | import android.widget.EditText; | 9 | 9 | import android.widget.TextView; | | 10 | + | | 11 | +import com.morihacky.android.rxjava.R; | | 12 | + | | 13 | +import butterknife.Bind; | 10 | 14 | import butterknife.ButterKnife; | 11 | | -import butterknife.InjectView; | 12 | 15 | import butterknife.OnTextChanged; | 13 | | -import com.morihacky.android.rxjava.R; | 14 | 16 | import rx.Subscription; | 15 | 17 | import rx.functions.Action1; | 16 | 18 | import rx.subjects.PublishSubject; | | 20 | 22 | public class DoubleBindingTextViewFragment | 21 | 23 | extends BaseFragment { | 22 | 24 |
| 23 | | - @InjectView(R.id.double_binding_num1) EditText _number1; | 24 | | - @InjectView(R.id.double_binding_num2) EditText _number2; | 25 | | - @InjectView(R.id.double_binding_result) TextView _result; | | 25 | + @Bind(R.id.double_binding_num1) EditText _number1; | | 26 | + @Bind(R.id.double_binding_num2) EditText _number2; | | 27 | + @Bind(R.id.double_binding_result) TextView _result; | 26 | 28 |
| 27 | 29 | Subscription _subscription; | 28 | 30 | PublishSubject<Float> _resultEmitterSubject; | @@ -32,7 +34,7 @@ public View onCreateView(LayoutInflater inflater, | 32 | 34 | @Nullable ViewGroup container, | 33 | 35 | @Nullable Bundle savedInstanceState) { | 34 | 36 | View layout = inflater.inflate(R.layout.fragment_double_binding_textview, container, false); | 35 | | - ButterKnife.inject(this, layout); | | 37 | + ButterKnife.bind(this, layout); | 36 | 38 |
| 37 | 39 | _resultEmitterSubject = PublishSubject.create(); | 38 | 40 | _subscription = _resultEmitterSubject.asObservable().subscribe(new Action1<Float>() { | |
Collapse file Copy file name to clipboardExpand all lines: app/src/main/java/com/morihacky/android/rxjava/fragments/ExponentialBackoffFragment.java +8-5Lines changed: 8 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 7 | 7 | import android.view.View; | 8 | 8 | import android.view.ViewGroup; | 9 | 9 | import android.widget.ListView; | 10 | | -import butterknife.ButterKnife; | 11 | | -import butterknife.InjectView; | 12 | | -import butterknife.OnClick; | | 10 | + | 13 | 11 | import com.morihacky.android.rxjava.R; | 14 | 12 | import com.morihacky.android.rxjava.RxUtils; | 15 | 13 | import com.morihacky.android.rxjava.wiring.LogAdapter; | | 14 | + | 16 | 15 | import java.util.ArrayList; | 17 | 16 | import java.util.List; | 18 | 17 | import java.util.concurrent.TimeUnit; | | 18 | + | | 19 | +import butterknife.Bind; | | 20 | +import butterknife.ButterKnife; | | 21 | +import butterknife.OnClick; | 19 | 22 | import rx.Observable; | 20 | 23 | import rx.Observer; | 21 | 24 | import rx.functions.Action0; | | 29 | 32 | public class ExponentialBackoffFragment | 30 | 33 | extends BaseFragment { | 31 | 34 |
| 32 | | - @InjectView(R.id.list_threading_log) ListView _logList; | | 35 | + @Bind(R.id.list_threading_log) ListView _logList; | 33 | 36 | private LogAdapter _adapter; | 34 | 37 | private List<String> _logs; | 35 | 38 |
| @@ -52,7 +55,7 @@ public View onCreateView(LayoutInflater inflater, | 52 | 55 | @Nullable ViewGroup container, | 53 | 56 | @Nullable Bundle savedInstanceState) { | 54 | 57 | View layout = inflater.inflate(R.layout.fragment_exponential_backoff, container, false); | 55 | | - ButterKnife.inject(this, layout); | | 58 | + ButterKnife.bind(this, layout); | 56 | 59 | return layout; | 57 | 60 | } | 58 | 61 |
| |
Collapse file Copy file name to clipboardExpand all lines: app/src/main/java/com/morihacky/android/rxjava/fragments/FormValidationCombineLatestFragment.java +9-7Lines changed: 9 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 7 | 7 | import android.view.ViewGroup; | 8 | 8 | import android.widget.EditText; | 9 | 9 | import android.widget.TextView; | 10 | | -import butterknife.ButterKnife; | 11 | | -import butterknife.InjectView; | | 10 | + | 12 | 11 | import com.jakewharton.rxbinding.widget.RxTextView; | 13 | 12 | import com.morihacky.android.rxjava.R; | | 13 | + | | 14 | +import butterknife.Bind; | | 15 | +import butterknife.ButterKnife; | 14 | 16 | import rx.Observable; | 15 | 17 | import rx.Observer; | 16 | 18 | import rx.Subscription; | | 23 | 25 | public class FormValidationCombineLatestFragment | 24 | 26 | extends BaseFragment { | 25 | 27 |
| 26 | | - @InjectView(R.id.btn_demo_form_valid) TextView _btnValidIndicator; | 27 | | - @InjectView(R.id.demo_combl_email) EditText _email; | 28 | | - @InjectView(R.id.demo_combl_password) EditText _password; | 29 | | - @InjectView(R.id.demo_combl_num) EditText _number; | | 28 | + @Bind(R.id.btn_demo_form_valid) TextView _btnValidIndicator; | | 29 | + @Bind(R.id.demo_combl_email) EditText _email; | | 30 | + @Bind(R.id.demo_combl_password) EditText _password; | | 31 | + @Bind(R.id.demo_combl_num) EditText _number; | 30 | 32 |
| 31 | 33 | private Observable<CharSequence> _emailChangeObservable; | 32 | 34 | private Observable<CharSequence> _passwordChangeObservable; | @@ -41,7 +43,7 @@ public View onCreateView(LayoutInflater inflater, | 41 | 43 | View layout = inflater.inflate(R.layout.fragment_form_validation_comb_latest, | 42 | 44 | container, | 43 | 45 | false); | 44 | | - ButterKnife.inject(this, layout); | | 46 | + ButterKnife.bind(this, layout); | 45 | 47 |
| 46 | 48 | _emailChangeObservable = RxTextView.textChanges(_email).skip(1); | 47 | 49 | _passwordChangeObservable = RxTextView.textChanges(_password).skip(1); | |
Collapse file Copy file name to clipboardExpand all lines: app/src/main/java/com/morihacky/android/rxjava/fragments/MainFragment.java +5-3Lines changed: 5 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 7 | 7 | import android.view.LayoutInflater; | 8 | 8 | import android.view.View; | 9 | 9 | import android.view.ViewGroup; | 10 | | -import butterknife.ButterKnife; | 11 | | -import butterknife.OnClick; | | 10 | + | 12 | 11 | import com.morihacky.android.rxjava.R; | 13 | 12 | import com.morihacky.android.rxjava.rxbus.RxBusDemoFragment; | 14 | 13 |
| | 14 | +import butterknife.ButterKnife; | | 15 | +import butterknife.OnClick; | | 16 | + | 15 | 17 | public class MainFragment | 16 | 18 | extends BaseFragment { | 17 | 19 |
| @@ -20,7 +22,7 @@ public View onCreateView(LayoutInflater inflater, | 20 | 22 | @Nullable ViewGroup container, | 21 | 23 | @Nullable Bundle savedInstanceState) { | 22 | 24 | View layout = inflater.inflate(R.layout.fragment_main, container, false); | 23 | | - ButterKnife.inject(this, layout); | | 25 | + ButterKnife.bind(this, layout); | 24 | 26 | return layout; | 25 | 27 | } | 26 | 28 |
| |
Collapse file Copy file name to clipboardExpand all lines: app/src/main/java/com/morihacky/android/rxjava/fragments/PollingFragment.java +8-5Lines changed: 8 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 10 | 10 | import android.view.ViewGroup; | 11 | 11 | import android.widget.ArrayAdapter; | 12 | 12 | import android.widget.ListView; | 13 | | -import butterknife.ButterKnife; | 14 | | -import butterknife.InjectView; | 15 | | -import butterknife.OnClick; | | 13 | + | 16 | 14 | import com.morihacky.android.rxjava.R; | | 15 | + | 17 | 16 | import java.util.ArrayList; | 18 | 17 | import java.util.List; | 19 | 18 | import java.util.concurrent.TimeUnit; | | 19 | + | | 20 | +import butterknife.Bind; | | 21 | +import butterknife.ButterKnife; | | 22 | +import butterknife.OnClick; | 20 | 23 | import rx.Observable; | 21 | 24 | import rx.Subscriber; | 22 | 25 | import rx.functions.Action0; | @@ -30,7 +33,7 @@ public class PollingFragment | 30 | 33 |
| 31 | 34 | public static final int INITIAL_DELAY = 0; | 32 | 35 | public static final int POLLING_INTERVAL = 1000; | 33 | | - @InjectView(R.id.list_threading_log) ListView _logsList; | | 36 | + @Bind(R.id.list_threading_log) ListView _logsList; | 34 | 37 |
| 35 | 38 | private LogAdapter _adapter; | 36 | 39 | private List<String> _logs; | @@ -55,7 +58,7 @@ public View onCreateView(LayoutInflater inflater, | 55 | 58 | @Nullable ViewGroup container, | 56 | 59 | @Nullable Bundle savedInstanceState) { | 57 | 60 | View layout = inflater.inflate(R.layout.fragment_polling, container, false); | 58 | | - ButterKnife.inject(this, layout); | | 61 | + ButterKnife.bind(this, layout); | 59 | 62 | return layout; | 60 | 63 | } | 61 | 64 |
| |
Collapse file Copy file name to clipboardExpand all lines: app/src/main/java/com/morihacky/android/rxjava/fragments/PseudoCacheConcatFragment.java +6-5Lines changed: 6 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 8 | 8 | import android.view.ViewGroup; | 9 | 9 | import android.widget.ArrayAdapter; | 10 | 10 | import android.widget.ListView; | 11 | | -import butterknife.ButterKnife; | 12 | | -import butterknife.InjectView; | 13 | | -import butterknife.OnClick; | | 11 | + | 14 | 12 | import com.morihacky.android.rxjava.R; | 15 | 13 | import com.morihacky.android.rxjava.retrofit.Contributor; | 16 | 14 | import com.morihacky.android.rxjava.retrofit.GithubApi; | | 27 | 25 | import retrofit.GsonConverterFactory; | 28 | 26 | import retrofit.Retrofit; | 29 | 27 | import retrofit.RxJavaCallAdapterFactory; | | 28 | +import butterknife.Bind; | | 29 | +import butterknife.ButterKnife; | | 30 | +import butterknife.OnClick; | 30 | 31 | import rx.Observable; | 31 | 32 | import rx.Subscriber; | 32 | 33 | import rx.Subscription; | | 39 | 40 | public class PseudoCacheConcatFragment | 40 | 41 | extends BaseFragment { | 41 | 42 |
| 42 | | - @InjectView(R.id.log_list) ListView _resultList; | | 43 | + @Bind(R.id.log_list) ListView _resultList; | 43 | 44 |
| 44 | 45 | private Subscription _subscription = null; | 45 | 46 | private HashMap<String, Long> _contributionMap = null; | @@ -50,7 +51,7 @@ public View onCreateView(LayoutInflater inflater, | 50 | 51 | @Nullable ViewGroup container, | 51 | 52 | @Nullable Bundle savedInstanceState) { | 52 | 53 | View layout = inflater.inflate(R.layout.fragment_pseudo_cache_concat, container, false); | 53 | | - ButterKnife.inject(this, layout); | | 54 | + ButterKnife.bind(this, layout); | 54 | 55 | _initializeCache(); | 55 | 56 | return layout; | 56 | 57 | } | |
|