diff options
author | TacoTheDank <SkytkRSfan3895@gmail.com> | 2021-09-25 01:10:59 +0000 |
---|---|---|
committer | TacoTheDank <SkytkRSfan3895@gmail.com> | 2021-09-25 01:10:59 +0000 |
commit | 2b17931628a4d1612d344e9359fbb630c118efff (patch) | |
tree | 0b255d8460cffef1fa9069e5a273d99eaea04576 /app | |
parent | 92c76f2e12c414f8607068f9d91d47c53473b463 (diff) | |
download | infinity-for-reddit-2b17931628a4d1612d344e9359fbb630c118efff.tar infinity-for-reddit-2b17931628a4d1612d344e9359fbb630c118efff.tar.gz infinity-for-reddit-2b17931628a4d1612d344e9359fbb630c118efff.tar.bz2 infinity-for-reddit-2b17931628a4d1612d344e9359fbb630c118efff.tar.lz infinity-for-reddit-2b17931628a4d1612d344e9359fbb630c118efff.tar.xz infinity-for-reddit-2b17931628a4d1612d344e9359fbb630c118efff.tar.zst infinity-for-reddit-2b17931628a4d1612d344e9359fbb630c118efff.zip |
Use some empty implementations of listeners
Diffstat (limited to 'app')
5 files changed, 9 insertions, 107 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchActivity.java index c7cbf120..eab43461 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchActivity.java @@ -20,7 +20,9 @@ import androidx.coordinatorlayout.widget.CoordinatorLayout; import androidx.lifecycle.ViewModelProvider; import androidx.recyclerview.widget.RecyclerView; +import com.ferfalk.simplesearchview.SimpleOnQueryTextListener; import com.ferfalk.simplesearchview.SimpleSearchView; +import com.ferfalk.simplesearchview.SimpleSearchViewListener; import com.google.android.material.appbar.AppBarLayout; import com.r0adkll.slidr.Slidr; @@ -154,26 +156,11 @@ public class SearchActivity extends BaseActivity { simpleSearchView.setHint(getText(R.string.search_only_users_hint)); } - simpleSearchView.setOnSearchViewListener(new SimpleSearchView.SearchViewListener() { - @Override - public void onSearchViewShown() { - - } - + simpleSearchView.setOnSearchViewListener(new SimpleSearchViewListener() { @Override public void onSearchViewClosed() { finish(); } - - @Override - public void onSearchViewShownAnimation() { - - } - - @Override - public void onSearchViewClosedAnimation() { - - } }); mAccountName = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_NAME, null); @@ -201,7 +188,7 @@ public class SearchActivity extends BaseActivity { finish(); }); - simpleSearchView.setOnQueryTextListener(new SimpleSearchView.OnQueryTextListener() { + simpleSearchView.setOnQueryTextListener(new SimpleOnQueryTextListener() { @Override public boolean onQueryTextSubmit(@NonNull String query) { search(query); @@ -244,11 +231,6 @@ public class SearchActivity extends BaseActivity { } return false; } - - @Override - public boolean onQueryTextCleared() { - return false; - } }); if (savedInstanceState != null) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImageOrGifActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImageOrGifActivity.java index 9602da8b..e2d10e55 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImageOrGifActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImageOrGifActivity.java @@ -266,12 +266,7 @@ public class ViewImageOrGifActivity extends AppCompatActivity implements SetAsWa final SubsamplingScaleImageView view = mImageView.getSSIV(); if (view != null) { - view.setOnImageEventListener(new SubsamplingScaleImageView.OnImageEventListener() { - @Override - public void onReady() { - - } - + view.setOnImageEventListener(new SubsamplingScaleImageView.DefaultOnImageEventListener() { @Override public void onImageLoaded() { view.setMinimumDpi(80); @@ -280,26 +275,6 @@ public class ViewImageOrGifActivity extends AppCompatActivity implements SetAsWa view.setQuickScaleEnabled(true); view.resetScaleAndCenter(); } - - @Override - public void onPreviewLoadError(Exception e) { - - } - - @Override - public void onImageLoadError(Exception e) { - - } - - @Override - public void onTileLoadError(Exception e) { - - } - - @Override - public void onPreviewReleased() { - - } }); } } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java index e7a673cc..4c3ee7e3 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java @@ -1727,7 +1727,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler } if (helper == null) { helper = new ExoPlayerViewHelper(this, mediaUri, null, mExoCreator); - helper.addEventListener(new Playable.EventListener() { + helper.addEventListener(new Playable.DefaultEventListener() { @Override public void onTracksChanged(TrackGroupArray trackGroups, TrackSelectionArray trackSelections) { if (!trackGroups.isEmpty()) { @@ -1750,16 +1750,6 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler } @Override - public void onMetadata(Metadata metadata) { - - } - - @Override - public void onCues(List<Cue> cues) { - - } - - @Override public void onRenderedFirstFrame() { mGlide.clear(previewImageView); previewImageView.setVisibility(View.GONE); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java index 93a4ef30..6bc1ec30 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java @@ -2758,7 +2758,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie } if (helper == null) { helper = new ExoPlayerViewHelper(this, mediaUri, null, mExoCreator); - helper.addEventListener(new Playable.EventListener() { + helper.addEventListener(new Playable.DefaultEventListener() { @Override public void onTracksChanged(TrackGroupArray trackGroups, TrackSelectionArray trackSelections) { if (!trackGroups.isEmpty()) { @@ -2784,16 +2784,6 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie } @Override - public void onMetadata(Metadata metadata) { - - } - - @Override - public void onCues(List<Cue> cues) { - - } - - @Override public void onRenderedFirstFrame() { mGlide.clear(previewImageView); previewImageView.setVisibility(View.GONE); @@ -3987,7 +3977,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie } if (helper == null) { helper = new ExoPlayerViewHelper(this, mediaUri, null, mExoCreator); - helper.addEventListener(new Playable.EventListener() { + helper.addEventListener(new Playable.DefaultEventListener() { @Override public void onTracksChanged(TrackGroupArray trackGroups, TrackSelectionArray trackSelections) { if (!trackGroups.isEmpty()) { @@ -4013,16 +4003,6 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie } @Override - public void onMetadata(Metadata metadata) { - - } - - @Override - public void onCues(List<Cue> cues) { - - } - - @Override public void onRenderedFirstFrame() { mGlide.clear(previewImageView); previewImageView.setVisibility(View.GONE); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java index cee6d404..05f0ab7a 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java @@ -153,12 +153,7 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment { final SubsamplingScaleImageView view = imageView.getSSIV(); if (view != null) { - view.setOnImageEventListener(new SubsamplingScaleImageView.OnImageEventListener() { - @Override - public void onReady() { - - } - + view.setOnImageEventListener(new SubsamplingScaleImageView.DefaultOnImageEventListener() { @Override public void onImageLoaded() { view.setMinimumDpi(80); @@ -167,26 +162,6 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment { view.setQuickScaleEnabled(true); view.resetScaleAndCenter(); } - - @Override - public void onPreviewLoadError(Exception e) { - - } - - @Override - public void onImageLoadError(Exception e) { - - } - - @Override - public void onTileLoadError(Exception e) { - - } - - @Override - public void onPreviewReleased() { - - } }); } } |