Skip to content
This repository was archived by the owner on Oct 27, 2024. It is now read-only.

Commit 6c4a090

Browse files
author
Ashwini Kumar
committed
Updated butterknife
1 parent d40f62b commit 6c4a090

File tree

5 files changed

+32
-25
lines changed

5 files changed

+32
-25
lines changed

app/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'com.neenbedankt.android-apt'
33
apply plugin: 'me.tatarka.retrolambda'
4+
apply plugin: 'android-apt'
45

56
android {
67
compileSdkVersion 24
@@ -63,7 +64,8 @@ dependencies {
6364

6465
// Other
6566
compile 'net.jcip:jcip-annotations:1.0'
66-
compile 'com.jakewharton:butterknife:7.0.1'
67+
compile 'com.jakewharton:butterknife:8.4.0'
68+
apt 'com.jakewharton:butterknife-compiler:8.4.0'
6769
compile 'com.github.franmontiel:PersistentCookieJar:v1.0.0'
6870

6971
// Square

app/src/main/java/com/esoxjem/movieguide/details/MovieDetailsFragment.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
import javax.inject.Inject;
3434

35-
import butterknife.Bind;
35+
import butterknife.BindView;
3636
import butterknife.ButterKnife;
3737
import butterknife.OnClick;
3838

@@ -46,31 +46,31 @@ public class MovieDetailsFragment extends Fragment implements IMovieDetailsView,
4646
@Inject
4747
IMovieDetailsPresenter movieDetailsPresenter;
4848

49-
@Bind(R.id.movie_poster)
49+
@BindView(R.id.movie_poster)
5050
ImageView poster;
51-
@Bind(R.id.movie_name)
51+
@BindView(R.id.movie_name)
5252
TextView title;
53-
@Bind(R.id.movie_year)
53+
@BindView(R.id.movie_year)
5454
TextView releaseDate;
55-
@Bind(R.id.movie_rating)
55+
@BindView(R.id.movie_rating)
5656
TextView rating;
57-
@Bind(R.id.movie_description)
57+
@BindView(R.id.movie_description)
5858
TextView overview;
59-
@Bind(trailers_label)
59+
@BindView(trailers_label)
6060
TextView label;
61-
@Bind(R.id.trailers_container)
61+
@BindView(R.id.trailers_container)
6262
HorizontalScrollView horizontalScrollView;
63-
@Bind(R.id.trailers)
63+
@BindView(R.id.trailers)
6464
LinearLayout trailers;
65-
@Bind(R.id.reviews_label)
65+
@BindView(R.id.reviews_label)
6666
TextView reviews;
67-
@Bind(R.id.reviews)
67+
@BindView(R.id.reviews)
6868
LinearLayout reviewsContainer;
69-
@Bind(R.id.favorite)
69+
@BindView(R.id.favorite)
7070
FloatingActionButton favorite;
71-
@Bind(R.id.toolbar)
71+
@BindView(R.id.toolbar)
7272
Toolbar toolbar;
73-
@Bind(R.id.collapsing_toolbar)
73+
@BindView(R.id.collapsing_toolbar)
7474
CollapsingToolbarLayout collapsingToolbarLayout;
7575

7676
Movie movie;

app/src/main/java/com/esoxjem/movieguide/listing/MovieListingHolder.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,20 @@
1010
import com.esoxjem.movieguide.R;
1111
import com.google.auto.factory.AutoFactory;
1212

13+
import butterknife.BindView;
14+
1315
/**
1416
* @author Ashwini Kumar.
1517
*/
1618
@AutoFactory(implementing = MovieListingViewHolderFactory.class)
1719
public class MovieListingHolder extends RecyclerView.ViewHolder
1820
{
19-
public TextView name;
20-
public ImageView poster;
21-
public View titleBackground;
21+
@BindView(R.id.movie_name)
22+
TextView name;
23+
@BindView(R.id.movie_poster)
24+
ImageView poster;
25+
@BindView(R.id.title_background)
26+
View titleBackground;
2227

2328
public MovieListingHolder(ViewGroup parent)
2429
{

app/src/main/java/com/esoxjem/movieguide/listing/MoviesListingActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
import com.esoxjem.movieguide.details.MovieDetailsActivity;
1212
import com.esoxjem.movieguide.details.MovieDetailsFragment;
1313

14-
import butterknife.Bind;
14+
import butterknife.BindView;
1515
import butterknife.ButterKnife;
1616

1717
public class MoviesListingActivity extends AppCompatActivity implements MoviesListingFragment.Callback
1818
{
1919
public static final String DETAILS_FRAGMENT = "DetailsFragment";
2020
private boolean twoPaneMode;
2121

22-
@Bind(R.id.toolbar)
22+
@BindView(R.id.toolbar)
2323
Toolbar toolbar;
2424

2525
@Override

app/src/main/java/com/esoxjem/movieguide/sorting/SortingDialogFragment.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import javax.inject.Inject;
1919

20-
import butterknife.Bind;
20+
import butterknife.BindView;
2121
import butterknife.ButterKnife;
2222

2323
/**
@@ -28,13 +28,13 @@ public class SortingDialogFragment extends DialogFragment implements ISortingDia
2828
@Inject
2929
ISortingDialogPresenter sortingDialogPresenter;
3030

31-
@Bind(R.id.most_popular)
31+
@BindView(R.id.most_popular)
3232
RadioButton mostPopular;
33-
@Bind(R.id.highest_rated)
33+
@BindView(R.id.highest_rated)
3434
RadioButton highestRated;
35-
@Bind(R.id.favorites)
35+
@BindView(R.id.favorites)
3636
RadioButton favorites;
37-
@Bind(R.id.sorting_group)
37+
@BindView(R.id.sorting_group)
3838
RadioGroup sortingOptionsGroup;
3939

4040
private static IMoviesListingPresenter moviesListingPresenter;

0 commit comments

Comments
 (0)