Updated to butterknife 8.
This commit is contained in:
parent
816d8676fd
commit
e73feb48af
27 changed files with 209 additions and 174 deletions
|
|
@ -19,8 +19,9 @@ import com.kabouzeid.gramophone.util.PreferenceUtil;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import butterknife.Bind;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
|
||||
/**
|
||||
* @author Karim Abou Zeid (kabouzeid)
|
||||
|
|
@ -75,7 +76,9 @@ public class AlbumCoverPagerAdapter extends CustomFragmentStatePagerAdapter {
|
|||
public static class AlbumCoverFragment extends Fragment implements SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
private static final String SONG_ARG = "song";
|
||||
|
||||
@Bind(R.id.player_image)
|
||||
private Unbinder unbinder;
|
||||
|
||||
@BindView(R.id.player_image)
|
||||
ImageView albumCover;
|
||||
|
||||
private boolean isColorReady;
|
||||
|
|
@ -102,7 +105,7 @@ public class AlbumCoverPagerAdapter extends CustomFragmentStatePagerAdapter {
|
|||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_album_cover, container, false);
|
||||
ButterKnife.bind(this, view);
|
||||
unbinder = ButterKnife.bind(this, view);
|
||||
return view;
|
||||
}
|
||||
|
||||
|
|
@ -120,7 +123,7 @@ public class AlbumCoverPagerAdapter extends CustomFragmentStatePagerAdapter {
|
|||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
PreferenceUtil.getInstance(getActivity()).unregisterOnSharedPreferenceChangedListener(this);
|
||||
ButterKnife.unbind(this);
|
||||
unbinder.unbind();
|
||||
colorReceiver = null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import android.widget.TextView;
|
|||
|
||||
import com.kabouzeid.gramophone.R;
|
||||
|
||||
import butterknife.Bind;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
/**
|
||||
|
|
@ -18,39 +18,39 @@ import butterknife.ButterKnife;
|
|||
*/
|
||||
public class MediaEntryViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
|
||||
@Nullable
|
||||
@Bind(R.id.image)
|
||||
@BindView(R.id.image)
|
||||
public ImageView image;
|
||||
|
||||
@Nullable
|
||||
@Bind(R.id.image_text)
|
||||
@BindView(R.id.image_text)
|
||||
public TextView imageText;
|
||||
|
||||
@Nullable
|
||||
@Bind(R.id.title)
|
||||
@BindView(R.id.title)
|
||||
public TextView title;
|
||||
|
||||
@Nullable
|
||||
@Bind(R.id.text)
|
||||
@BindView(R.id.text)
|
||||
public TextView text;
|
||||
|
||||
@Nullable
|
||||
@Bind(R.id.menu)
|
||||
@BindView(R.id.menu)
|
||||
public View menu;
|
||||
|
||||
@Nullable
|
||||
@Bind(R.id.separator)
|
||||
@BindView(R.id.separator)
|
||||
public View separator;
|
||||
|
||||
@Nullable
|
||||
@Bind(R.id.short_separator)
|
||||
@BindView(R.id.short_separator)
|
||||
public View shortSeparator;
|
||||
|
||||
@Nullable
|
||||
@Bind(R.id.drag_view)
|
||||
@BindView(R.id.drag_view)
|
||||
public View dragView;
|
||||
|
||||
@Nullable
|
||||
@Bind(R.id.palette_color_container)
|
||||
@BindView(R.id.palette_color_container)
|
||||
public View paletteColorContainer;
|
||||
|
||||
public MediaEntryViewHolder(View itemView) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue