Some NonNull annotations
This commit is contained in:
parent
8bbdfaa34a
commit
f98222c372
24 changed files with 65 additions and 52 deletions
|
|
@ -2,6 +2,7 @@ package com.kabouzeid.gramophone;
|
|||
|
||||
import android.app.Application;
|
||||
import android.os.Build;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
import com.anjlab.android.iab.v3.BillingProcessor;
|
||||
import com.anjlab.android.iab.v3.TransactionDetails;
|
||||
|
|
@ -42,7 +43,7 @@ public class App extends Application {
|
|||
// automatically restores purchases
|
||||
billingProcessor = new BillingProcessor(this, App.GOOGLE_PLAY_LICENSE_KEY, new BillingProcessor.IBillingHandler() {
|
||||
@Override
|
||||
public void onProductPurchased(String productId, TransactionDetails details) {
|
||||
public void onProductPurchased(@NonNull String productId, TransactionDetails details) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.kabouzeid.gramophone.adapter;
|
|||
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.view.LayoutInflater;
|
||||
|
|
@ -49,6 +50,7 @@ public class AlbumCoverPagerAdapter extends CustomFragmentStatePagerAdapter {
|
|||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public Object instantiateItem(ViewGroup container, int position) {
|
||||
Object o = super.instantiateItem(container, position);
|
||||
if (currentColorReceiver != null && currentColorReceiverPosition == position) {
|
||||
|
|
@ -101,15 +103,14 @@ public class AlbumCoverPagerAdapter extends CustomFragmentStatePagerAdapter {
|
|||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_album_cover, container, false);
|
||||
unbinder = ButterKnife.bind(this, view);
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
forceSquareAlbumCover(false);
|
||||
// TODO
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.kabouzeid.gramophone.adapter;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.helper.ItemTouchHelper;
|
||||
import android.view.LayoutInflater;
|
||||
|
|
@ -28,14 +29,15 @@ public class CategoryInfoAdapter extends RecyclerView.Adapter<CategoryInfoAdapte
|
|||
}
|
||||
|
||||
@Override
|
||||
public CategoryInfoAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
@NonNull
|
||||
public CategoryInfoAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.preference_dialog_library_categories_listitem, parent, false);
|
||||
return new ViewHolder(view);
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
@Override
|
||||
public void onBindViewHolder(CategoryInfoAdapter.ViewHolder holder, int position) {
|
||||
public void onBindViewHolder(@NonNull CategoryInfoAdapter.ViewHolder holder, int position) {
|
||||
CategoryInfo categoryInfo = categoryInfos.get(position);
|
||||
|
||||
holder.checkBox.setChecked(categoryInfo.visible);
|
||||
|
|
@ -64,7 +66,6 @@ public class CategoryInfoAdapter extends RecyclerView.Adapter<CategoryInfoAdapte
|
|||
return categoryInfos.size();
|
||||
}
|
||||
|
||||
|
||||
public void setCategoryInfos(ArrayList<CategoryInfo> categoryInfos) {
|
||||
this.categoryInfos = categoryInfos;
|
||||
notifyDataSetChanged();
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class GenreAdapter extends RecyclerView.Adapter<GenreAdapter.ViewHolder>
|
|||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(activity).inflate(itemLayoutRes, parent, false);
|
||||
return new ViewHolder(view);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,9 +73,9 @@ public class PlaylistAdapter extends AbsMultiSelectAdapter<PlaylistAdapter.ViewH
|
|||
return dataSet.get(position).id;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
@NonNull
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(activity).inflate(itemLayoutRes, parent, false);
|
||||
return createViewHolder(view, viewType);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,9 +57,9 @@ public class SearchAdapter extends RecyclerView.Adapter<SearchAdapter.ViewHolder
|
|||
return HEADER;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
@NonNull
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
if (viewType == HEADER)
|
||||
return new ViewHolder(LayoutInflater.from(activity).inflate(R.layout.sub_header, parent, false), viewType);
|
||||
return new ViewHolder(LayoutInflater.from(activity).inflate(R.layout.item_list, parent, false), viewType);
|
||||
|
|
|
|||
|
|
@ -64,12 +64,13 @@ public class SongFileAdapter extends AbsMultiSelectAdapter<SongFileAdapter.ViewH
|
|||
}
|
||||
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
@NonNull
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new ViewHolder(LayoutInflater.from(activity).inflate(itemLayoutRes, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(final ViewHolder holder, int index) {
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, int index) {
|
||||
final File file = dataSet.get(index);
|
||||
|
||||
holder.itemView.setActivated(isChecked(file));
|
||||
|
|
@ -207,4 +208,4 @@ public class SongFileAdapter extends AbsMultiSelectAdapter<SongFileAdapter.ViewH
|
|||
|
||||
void onMultipleItemAction(MenuItem item, ArrayList<File> files);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,9 +68,9 @@ public class AlbumAdapter extends AbsMultiSelectAdapter<AlbumAdapter.ViewHolder,
|
|||
return dataSet;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
@NonNull
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(activity).inflate(itemLayoutRes, parent, false);
|
||||
return createViewHolder(view, viewType);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,8 @@ public class ArtistAdapter extends AbsMultiSelectAdapter<ArtistAdapter.ViewHolde
|
|||
}
|
||||
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
@NonNull
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(activity).inflate(itemLayoutRes, parent, false);
|
||||
return createViewHolder(view);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,9 +59,9 @@ public class ArtistSongAdapter extends ArrayAdapter<Song> implements MaterialCab
|
|||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View getView(final int position, @Nullable View convertView, ViewGroup parent) {
|
||||
@NonNull
|
||||
public View getView(final int position, View convertView, @NonNull ViewGroup parent) {
|
||||
final Song song = getItem(position);
|
||||
if (convertView == null) {
|
||||
convertView = LayoutInflater.from(getContext()).inflate(R.layout.item_list, parent, false);
|
||||
|
|
|
|||
|
|
@ -79,9 +79,9 @@ public class SongAdapter extends AbsMultiSelectAdapter<SongAdapter.ViewHolder, S
|
|||
return dataSet.get(position).id;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
@NonNull
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(activity).inflate(itemLayoutRes, parent, false);
|
||||
return createViewHolder(view);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ public class DonationsDialog extends DialogFragment implements BillingProcessor.
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onProductPurchased(String productId, TransactionDetails details) {
|
||||
public void onProductPurchased(@NonNull String productId, TransactionDetails details) {
|
||||
loadSkuDetails();
|
||||
Toast.makeText(getContext(), R.string.thank_you, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
|
@ -183,7 +183,8 @@ public class DonationsDialog extends DialogFragment implements BillingProcessor.
|
|||
}
|
||||
|
||||
@Override
|
||||
public View getView(final int position, View convertView, ViewGroup parent) {
|
||||
@NonNull
|
||||
public View getView(final int position, View convertView, @NonNull ViewGroup parent) {
|
||||
if (convertView == null) {
|
||||
convertView = LayoutInflater.from(getContext()).inflate(LAYOUT_RES_ID, parent, false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,8 @@ public class NowPlayingScreenPreferenceDialog extends DialogFragment implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public Object instantiateItem(ViewGroup collection, int position) {
|
||||
@NonNull
|
||||
public Object instantiateItem(@NonNull ViewGroup collection, int position) {
|
||||
NowPlayingScreen nowPlayingScreen = NowPlayingScreen.values()[position];
|
||||
|
||||
LayoutInflater inflater = LayoutInflater.from(context);
|
||||
|
|
@ -111,7 +112,7 @@ public class NowPlayingScreenPreferenceDialog extends DialogFragment implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public void destroyItem(ViewGroup collection, int position, Object view) {
|
||||
public void destroyItem(@NonNull ViewGroup collection, int position, @NonNull Object view) {
|
||||
collection.removeView((View) view);
|
||||
}
|
||||
|
||||
|
|
@ -121,7 +122,7 @@ public class NowPlayingScreenPreferenceDialog extends DialogFragment implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isViewFromObject(View view, Object object) {
|
||||
public boolean isViewFromObject(@NonNull View view, @NonNull Object object) {
|
||||
return view == object;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ public class MultiPlayer implements Playback, MediaPlayer.OnErrorListener, Media
|
|||
* @param callbacks The callbacks to use
|
||||
*/
|
||||
@Override
|
||||
public void setCallbacks(final Playback.PlaybackCallbacks callbacks) {
|
||||
public void setCallbacks(@Nullable Playback.PlaybackCallbacks callbacks) {
|
||||
this.callbacks = callbacks;
|
||||
}
|
||||
|
||||
|
|
@ -329,4 +329,4 @@ public class MultiPlayer implements Playback, MediaPlayer.OnErrorListener, Media
|
|||
callbacks.onTrackEnded();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -173,18 +173,19 @@ public class GenreDetailActivity extends AbsSlidingMusicPanelActivity implements
|
|||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public Loader<ArrayList<Song>> onCreateLoader(int id, Bundle args) {
|
||||
return new GenreDetailActivity.AsyncGenreSongLoader(this, genre);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFinished(Loader<ArrayList<Song>> loader, ArrayList<Song> data) {
|
||||
public void onLoadFinished(@NonNull Loader<ArrayList<Song>> loader, ArrayList<Song> data) {
|
||||
if (adapter != null)
|
||||
adapter.swapDataSet(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoaderReset(Loader<ArrayList<Song>> loader) {
|
||||
public void onLoaderReset(@NonNull Loader<ArrayList<Song>> loader) {
|
||||
if (adapter != null)
|
||||
adapter.swapDataSet(new ArrayList<>());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.kabouzeid.gramophone.ui.fragments;
|
|||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.View;
|
||||
|
||||
|
|
@ -31,7 +32,7 @@ public class AbsMusicServiceFragment extends Fragment implements MusicServiceEve
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
activity.addMusicServiceEventListener(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements MainActi
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
public void onSaveInstanceState(@NonNull Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
outState.putParcelable(CRUMBS, breadCrumbs.getStateWrapper());
|
||||
}
|
||||
|
|
@ -147,14 +147,14 @@ public class FoldersFragment extends AbsMainActivityFragment implements MainActi
|
|||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_folder, container, false);
|
||||
unbinder = ButterKnife.bind(this, view);
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
getMainActivity().setStatusbarColorAuto();
|
||||
getMainActivity().setNavigationbarColorAuto();
|
||||
getMainActivity().setTaskDescriptionColorAuto();
|
||||
|
|
@ -466,12 +466,12 @@ public class FoldersFragment extends AbsMainActivityFragment implements MainActi
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFinished(Loader<List<File>> loader, List<File> data) {
|
||||
public void onLoadFinished(@NonNull Loader<List<File>> loader, List<File> data) {
|
||||
updateAdapter(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoaderReset(Loader<List<File>> loader) {
|
||||
public void onLoaderReset(@NonNull Loader<List<File>> loader) {
|
||||
updateAdapter(new LinkedList<>());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,17 +50,18 @@ public class GenresFragment extends AbsLibraryPagerRecyclerViewFragment<GenreAda
|
|||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public Loader<ArrayList<Genre>> onCreateLoader(int id, Bundle args) {
|
||||
return new GenresFragment.AsyncGenreLoader(getActivity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFinished(Loader<ArrayList<Genre>> loader, ArrayList<Genre> data) {
|
||||
public void onLoadFinished(@NonNull Loader<ArrayList<Genre>> loader, ArrayList<Genre> data) {
|
||||
getAdapter().swapDataSet(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoaderReset(Loader<ArrayList<Genre>> loader) {
|
||||
public void onLoaderReset(@NonNull Loader<ArrayList<Genre>> loader) {
|
||||
getAdapter().swapDataSet(new ArrayList<>());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import android.content.Context;
|
|||
import android.content.res.ColorStateList;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.view.GestureDetector;
|
||||
import android.view.LayoutInflater;
|
||||
|
|
@ -53,7 +54,7 @@ public class MiniPlayerFragment extends AbsMusicServiceFragment implements Music
|
|||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.fragment_mini_player, container, false);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.kabouzeid.gramophone.ui.fragments.player;
|
|||
|
||||
import android.animation.Animator;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.view.GestureDetector;
|
||||
import android.view.LayoutInflater;
|
||||
|
|
@ -57,15 +58,14 @@ public class PlayerAlbumCoverFragment extends AbsMusicServiceFragment implements
|
|||
private MusicProgressViewUpdateHelper progressViewUpdateHelper;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_player_album_cover, container, false);
|
||||
unbinder = ButterKnife.bind(this, view);
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
viewPager.addOnPageChangeListener(this);
|
||||
viewPager.setOnTouchListener(new View.OnTouchListener() {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import android.os.AsyncTask;
|
|||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.ColorInt;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.CardView;
|
||||
|
|
@ -98,7 +99,7 @@ public class CardPlayerFragment extends AbsPlayerFragment implements PlayerAlbum
|
|||
private Impl impl;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
if (Util.isLandscape(getResources())) {
|
||||
impl = new LandscapeImpl(this);
|
||||
} else {
|
||||
|
|
@ -111,7 +112,7 @@ public class CardPlayerFragment extends AbsPlayerFragment implements PlayerAlbum
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(final View view, Bundle savedInstanceState) {
|
||||
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
impl.init();
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.kabouzeid.gramophone.ui.fragments.player.card;
|
|||
import android.graphics.Color;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
|
@ -68,8 +69,7 @@ public class CardPlayerPlaybackControlsFragment extends AbsMusicServiceFragment
|
|||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.fragment_card_player_playback_controls, container, false);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import android.graphics.drawable.Drawable;
|
|||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.ColorInt;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
|
|
@ -94,7 +95,7 @@ public class FlatPlayerFragment extends AbsPlayerFragment implements PlayerAlbum
|
|||
private Impl impl;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
if (Util.isLandscape(getResources())) {
|
||||
impl = new LandscapeImpl(this);
|
||||
} else {
|
||||
|
|
@ -107,7 +108,7 @@ public class FlatPlayerFragment extends AbsPlayerFragment implements PlayerAlbum
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(final View view, Bundle savedInstanceState) {
|
||||
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
impl.init();
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import android.animation.TimeInterpolator;
|
|||
import android.graphics.Color;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.view.animation.FastOutSlowInInterpolator;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
|
@ -76,13 +77,12 @@ public class FlatPlayerPlaybackControlsFragment extends AbsMusicServiceFragment
|
|||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.fragment_flat_player_playback_controls, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
unbinder = ButterKnife.bind(this, view);
|
||||
setUpMusicControllers();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue