From afd53d20531f79c5518daf1396eb9d346104ffa4 Mon Sep 17 00:00:00 2001 From: Felix Date: Sun, 12 Nov 2017 18:32:44 +0100 Subject: [PATCH] update package-structure --- touch/src/main/AndroidManifest.xml | 6 +++--- .../touch/{activities => }/SplashActivity.kt | 5 +++-- .../nicidienase/chaosflix/touch/ViewModelFactory.kt | 5 ++--- .../touch/{activities => browse}/BrowseActivity.java | 10 +++------- .../touch/{fragments => browse}/BrowseFragment.java | 3 +-- .../touch/{viewmodels => browse}/BrowseViewModel.kt | 2 +- .../ConferenceGroupFragment.java | 4 ++-- .../ConferencesTabBrowseFragment.java | 4 ++-- .../{fragments => browse}/EventDetailsFragment.kt | 4 ++-- .../{fragments => browse}/EventsListFragment.java | 4 ++-- .../adapters/ConferenceGroupsFragmentPager.java | 5 ++--- .../adapters/ConferenceRecyclerViewAdapter.kt | 7 ++----- .../{ => browse}/adapters/EventRecyclerViewAdapter.kt | 6 ++---- .../{ => browse}/adapters/ItemRecyclerViewAdapter.kt | 2 +- .../{fragments => playback}/ExoPlayerFragment.java | 9 +++------ .../{activities => playback}/PlayerActivity.java | 11 +---------- .../PlayerEventListener.java} | 9 ++++----- .../touch/{viewmodels => playback}/PlayerViewModel.kt | 2 +- touch/src/main/res/layout/fragment_exo_player.xml | 2 +- 19 files changed, 38 insertions(+), 62 deletions(-) rename touch/src/main/java/de/nicidienase/chaosflix/touch/{activities => }/SplashActivity.kt (62%) rename touch/src/main/java/de/nicidienase/chaosflix/touch/{activities => browse}/BrowseActivity.java (92%) rename touch/src/main/java/de/nicidienase/chaosflix/touch/{fragments => browse}/BrowseFragment.java (90%) rename touch/src/main/java/de/nicidienase/chaosflix/touch/{viewmodels => browse}/BrowseViewModel.kt (98%) rename touch/src/main/java/de/nicidienase/chaosflix/touch/{fragments => browse}/ConferenceGroupFragment.java (96%) rename touch/src/main/java/de/nicidienase/chaosflix/touch/{fragments => browse}/ConferencesTabBrowseFragment.java (95%) rename touch/src/main/java/de/nicidienase/chaosflix/touch/{fragments => browse}/EventDetailsFragment.kt (98%) rename touch/src/main/java/de/nicidienase/chaosflix/touch/{fragments => browse}/EventsListFragment.java (97%) rename touch/src/main/java/de/nicidienase/chaosflix/touch/{ => browse}/adapters/ConferenceGroupsFragmentPager.java (91%) rename touch/src/main/java/de/nicidienase/chaosflix/touch/{ => browse}/adapters/ConferenceRecyclerViewAdapter.kt (85%) rename touch/src/main/java/de/nicidienase/chaosflix/touch/{ => browse}/adapters/EventRecyclerViewAdapter.kt (93%) rename touch/src/main/java/de/nicidienase/chaosflix/touch/{ => browse}/adapters/ItemRecyclerViewAdapter.kt (98%) rename touch/src/main/java/de/nicidienase/chaosflix/touch/{fragments => playback}/ExoPlayerFragment.java (96%) rename touch/src/main/java/de/nicidienase/chaosflix/touch/{activities => playback}/PlayerActivity.java (71%) rename touch/src/main/java/de/nicidienase/chaosflix/touch/{fragments/MyListener.java => playback/PlayerEventListener.java} (87%) rename touch/src/main/java/de/nicidienase/chaosflix/touch/{viewmodels => playback}/PlayerViewModel.kt (96%) diff --git a/touch/src/main/AndroidManifest.xml b/touch/src/main/AndroidManifest.xml index c6d5df08..c69fb712 100644 --- a/touch/src/main/AndroidManifest.xml +++ b/touch/src/main/AndroidManifest.xml @@ -15,7 +15,7 @@ android:name=".touch.ChaosflixApplication" android:theme="@style/AppTheme"> @@ -23,14 +23,14 @@ - + - diff --git a/touch/src/main/java/de/nicidienase/chaosflix/touch/activities/SplashActivity.kt b/touch/src/main/java/de/nicidienase/chaosflix/touch/SplashActivity.kt similarity index 62% rename from touch/src/main/java/de/nicidienase/chaosflix/touch/activities/SplashActivity.kt rename to touch/src/main/java/de/nicidienase/chaosflix/touch/SplashActivity.kt index 6d858f01..ec9e225a 100644 --- a/touch/src/main/java/de/nicidienase/chaosflix/touch/activities/SplashActivity.kt +++ b/touch/src/main/java/de/nicidienase/chaosflix/touch/SplashActivity.kt @@ -1,15 +1,16 @@ -package de.nicidienase.chaosflix.touch.activities +package de.nicidienase.chaosflix.touch import android.content.Intent import android.os.Bundle import android.support.v7.app.AppCompatActivity +import de.nicidienase.chaosflix.touch.browse.BrowseActivity class SplashActivity: AppCompatActivity(){ override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - startActivity(Intent(this,BrowseActivity::class.java)) + startActivity(Intent(this, BrowseActivity::class.java)) finish() } } \ No newline at end of file diff --git a/touch/src/main/java/de/nicidienase/chaosflix/touch/ViewModelFactory.kt b/touch/src/main/java/de/nicidienase/chaosflix/touch/ViewModelFactory.kt index a3dd94e7..c53e4983 100644 --- a/touch/src/main/java/de/nicidienase/chaosflix/touch/ViewModelFactory.kt +++ b/touch/src/main/java/de/nicidienase/chaosflix/touch/ViewModelFactory.kt @@ -5,13 +5,12 @@ import android.arch.lifecycle.ViewModelProvider import android.arch.persistence.room.Room import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.module.kotlin.KotlinModule -import de.nicidienase.chaosflix.BuildConfig import de.nicidienase.chaosflix.R import de.nicidienase.chaosflix.common.entities.ChaosflixDatabase import de.nicidienase.chaosflix.common.network.RecordingService import de.nicidienase.chaosflix.common.network.StreamingService -import de.nicidienase.chaosflix.touch.viewmodels.PlayerViewModel -import de.nicidienase.chaosflix.touch.viewmodels.BrowseViewModel +import de.nicidienase.chaosflix.touch.playback.PlayerViewModel +import de.nicidienase.chaosflix.touch.browse.BrowseViewModel import okhttp3.OkHttpClient import retrofit2.Retrofit import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory diff --git a/touch/src/main/java/de/nicidienase/chaosflix/touch/activities/BrowseActivity.java b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/BrowseActivity.java similarity index 92% rename from touch/src/main/java/de/nicidienase/chaosflix/touch/activities/BrowseActivity.java rename to touch/src/main/java/de/nicidienase/chaosflix/touch/browse/BrowseActivity.java index 4d59ef2f..ef3fa00c 100644 --- a/touch/src/main/java/de/nicidienase/chaosflix/touch/activities/BrowseActivity.java +++ b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/BrowseActivity.java @@ -1,8 +1,6 @@ -package de.nicidienase.chaosflix.touch.activities; +package de.nicidienase.chaosflix.touch.browse; -import android.app.SearchManager; import android.arch.lifecycle.ViewModelProviders; -import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; @@ -23,10 +21,8 @@ import de.nicidienase.chaosflix.R; import de.nicidienase.chaosflix.common.entities.recording.persistence.PersistentEvent; import de.nicidienase.chaosflix.common.entities.recording.persistence.PersistentRecording; import de.nicidienase.chaosflix.touch.ViewModelFactory; -import de.nicidienase.chaosflix.touch.fragments.ConferencesTabBrowseFragment; -import de.nicidienase.chaosflix.touch.fragments.EventDetailsFragment; -import de.nicidienase.chaosflix.touch.fragments.EventsListFragment; -import de.nicidienase.chaosflix.touch.viewmodels.BrowseViewModel; +import de.nicidienase.chaosflix.touch.activities.AboutActivity; +import de.nicidienase.chaosflix.touch.playback.PlayerActivity; public class BrowseActivity extends AppCompatActivity implements ConferencesTabBrowseFragment.OnConferenceListFragmentInteractionListener, diff --git a/touch/src/main/java/de/nicidienase/chaosflix/touch/fragments/BrowseFragment.java b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/BrowseFragment.java similarity index 90% rename from touch/src/main/java/de/nicidienase/chaosflix/touch/fragments/BrowseFragment.java rename to touch/src/main/java/de/nicidienase/chaosflix/touch/browse/BrowseFragment.java index c72ef7e3..788651c3 100644 --- a/touch/src/main/java/de/nicidienase/chaosflix/touch/fragments/BrowseFragment.java +++ b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/BrowseFragment.java @@ -1,4 +1,4 @@ -package de.nicidienase.chaosflix.touch.fragments; +package de.nicidienase.chaosflix.touch.browse; import android.arch.lifecycle.ViewModelProviders; import android.os.Bundle; @@ -9,7 +9,6 @@ import android.view.View; import de.nicidienase.chaosflix.R; import de.nicidienase.chaosflix.touch.ViewModelFactory; -import de.nicidienase.chaosflix.touch.viewmodels.BrowseViewModel; public class BrowseFragment extends Fragment { diff --git a/touch/src/main/java/de/nicidienase/chaosflix/touch/viewmodels/BrowseViewModel.kt b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/BrowseViewModel.kt similarity index 98% rename from touch/src/main/java/de/nicidienase/chaosflix/touch/viewmodels/BrowseViewModel.kt rename to touch/src/main/java/de/nicidienase/chaosflix/touch/browse/BrowseViewModel.kt index 7e500e27..651d1f59 100644 --- a/touch/src/main/java/de/nicidienase/chaosflix/touch/viewmodels/BrowseViewModel.kt +++ b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/BrowseViewModel.kt @@ -1,4 +1,4 @@ -package de.nicidienase.chaosflix.touch.viewmodels +package de.nicidienase.chaosflix.touch.browse import android.arch.lifecycle.LiveData import android.arch.lifecycle.ViewModel diff --git a/touch/src/main/java/de/nicidienase/chaosflix/touch/fragments/ConferenceGroupFragment.java b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/ConferenceGroupFragment.java similarity index 96% rename from touch/src/main/java/de/nicidienase/chaosflix/touch/fragments/ConferenceGroupFragment.java rename to touch/src/main/java/de/nicidienase/chaosflix/touch/browse/ConferenceGroupFragment.java index d6a686d3..19d7831f 100644 --- a/touch/src/main/java/de/nicidienase/chaosflix/touch/fragments/ConferenceGroupFragment.java +++ b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/ConferenceGroupFragment.java @@ -1,4 +1,4 @@ -package de.nicidienase.chaosflix.touch.fragments; +package de.nicidienase.chaosflix.touch.browse; import android.content.Context; import android.os.Bundle; @@ -12,7 +12,7 @@ import android.view.ViewGroup; import de.nicidienase.chaosflix.R; import de.nicidienase.chaosflix.common.entities.recording.persistence.ConferenceGroup; -import de.nicidienase.chaosflix.touch.adapters.ConferenceRecyclerViewAdapter; +import de.nicidienase.chaosflix.touch.browse.adapters.ConferenceRecyclerViewAdapter; public class ConferenceGroupFragment extends BrowseFragment { diff --git a/touch/src/main/java/de/nicidienase/chaosflix/touch/fragments/ConferencesTabBrowseFragment.java b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/ConferencesTabBrowseFragment.java similarity index 95% rename from touch/src/main/java/de/nicidienase/chaosflix/touch/fragments/ConferencesTabBrowseFragment.java rename to touch/src/main/java/de/nicidienase/chaosflix/touch/browse/ConferencesTabBrowseFragment.java index bc0e5c3b..3f77c987 100644 --- a/touch/src/main/java/de/nicidienase/chaosflix/touch/fragments/ConferencesTabBrowseFragment.java +++ b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/ConferencesTabBrowseFragment.java @@ -1,4 +1,4 @@ -package de.nicidienase.chaosflix.touch.fragments; +package de.nicidienase.chaosflix.touch.browse; import android.content.Context; import android.os.Bundle; @@ -12,7 +12,7 @@ import android.view.View; import android.view.ViewGroup; import de.nicidienase.chaosflix.R; -import de.nicidienase.chaosflix.touch.adapters.ConferenceGroupsFragmentPager; +import de.nicidienase.chaosflix.touch.browse.adapters.ConferenceGroupsFragmentPager; public class ConferencesTabBrowseFragment extends BrowseFragment { diff --git a/touch/src/main/java/de/nicidienase/chaosflix/touch/fragments/EventDetailsFragment.kt b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/EventDetailsFragment.kt similarity index 98% rename from touch/src/main/java/de/nicidienase/chaosflix/touch/fragments/EventDetailsFragment.kt rename to touch/src/main/java/de/nicidienase/chaosflix/touch/browse/EventDetailsFragment.kt index c5fa2401..2a589731 100644 --- a/touch/src/main/java/de/nicidienase/chaosflix/touch/fragments/EventDetailsFragment.kt +++ b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/EventDetailsFragment.kt @@ -1,4 +1,4 @@ -package de.nicidienase.chaosflix.touch.fragments +package de.nicidienase.chaosflix.touch.browse import android.arch.lifecycle.Observer import android.content.Context @@ -17,7 +17,7 @@ import de.nicidienase.chaosflix.common.entities.recording.persistence.Persistent import de.nicidienase.chaosflix.common.entities.userdata.WatchlistItem import de.nicidienase.chaosflix.databinding.FragmentEventDetailsNewBinding import de.nicidienase.chaosflix.touch.Util -import de.nicidienase.chaosflix.touch.adapters.EventRecyclerViewAdapter +import de.nicidienase.chaosflix.touch.browse.adapters.EventRecyclerViewAdapter class EventDetailsFragment : BrowseFragment() { diff --git a/touch/src/main/java/de/nicidienase/chaosflix/touch/fragments/EventsListFragment.java b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/EventsListFragment.java similarity index 97% rename from touch/src/main/java/de/nicidienase/chaosflix/touch/fragments/EventsListFragment.java rename to touch/src/main/java/de/nicidienase/chaosflix/touch/browse/EventsListFragment.java index 56e76412..8f0e07e6 100644 --- a/touch/src/main/java/de/nicidienase/chaosflix/touch/fragments/EventsListFragment.java +++ b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/EventsListFragment.java @@ -1,4 +1,4 @@ -package de.nicidienase.chaosflix.touch.fragments; +package de.nicidienase.chaosflix.touch.browse; import android.app.Activity; import android.app.SearchManager; @@ -23,7 +23,7 @@ import java.util.List; import de.nicidienase.chaosflix.R; import de.nicidienase.chaosflix.common.entities.recording.persistence.PersistentEvent; -import de.nicidienase.chaosflix.touch.adapters.EventRecyclerViewAdapter; +import de.nicidienase.chaosflix.touch.browse.adapters.EventRecyclerViewAdapter; public class EventsListFragment extends BrowseFragment implements SearchView.OnQueryTextListener { diff --git a/touch/src/main/java/de/nicidienase/chaosflix/touch/adapters/ConferenceGroupsFragmentPager.java b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/adapters/ConferenceGroupsFragmentPager.java similarity index 91% rename from touch/src/main/java/de/nicidienase/chaosflix/touch/adapters/ConferenceGroupsFragmentPager.java rename to touch/src/main/java/de/nicidienase/chaosflix/touch/browse/adapters/ConferenceGroupsFragmentPager.java index 50b11fa1..af497e85 100644 --- a/touch/src/main/java/de/nicidienase/chaosflix/touch/adapters/ConferenceGroupsFragmentPager.java +++ b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/adapters/ConferenceGroupsFragmentPager.java @@ -1,10 +1,9 @@ -package de.nicidienase.chaosflix.touch.adapters; +package de.nicidienase.chaosflix.touch.browse.adapters; import android.content.Context; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; -import android.support.v4.app.FragmentStatePagerAdapter; import android.util.Log; import java.util.ArrayList; @@ -12,7 +11,7 @@ import java.util.List; import de.nicidienase.chaosflix.R; import de.nicidienase.chaosflix.common.entities.recording.persistence.ConferenceGroup; -import de.nicidienase.chaosflix.touch.fragments.ConferenceGroupFragment; +import de.nicidienase.chaosflix.touch.browse.ConferenceGroupFragment; public class ConferenceGroupsFragmentPager extends FragmentPagerAdapter { diff --git a/touch/src/main/java/de/nicidienase/chaosflix/touch/adapters/ConferenceRecyclerViewAdapter.kt b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/adapters/ConferenceRecyclerViewAdapter.kt similarity index 85% rename from touch/src/main/java/de/nicidienase/chaosflix/touch/adapters/ConferenceRecyclerViewAdapter.kt rename to touch/src/main/java/de/nicidienase/chaosflix/touch/browse/adapters/ConferenceRecyclerViewAdapter.kt index bf9583cb..bcf6ab4f 100644 --- a/touch/src/main/java/de/nicidienase/chaosflix/touch/adapters/ConferenceRecyclerViewAdapter.kt +++ b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/adapters/ConferenceRecyclerViewAdapter.kt @@ -1,13 +1,10 @@ -package de.nicidienase.chaosflix.touch.adapters +package de.nicidienase.chaosflix.touch.browse.adapters import com.squareup.picasso.Picasso -import java.util.ArrayList - import de.nicidienase.chaosflix.R -import de.nicidienase.chaosflix.common.entities.recording.Conference import de.nicidienase.chaosflix.common.entities.recording.persistence.PersistentConference -import de.nicidienase.chaosflix.touch.fragments.ConferencesTabBrowseFragment +import de.nicidienase.chaosflix.touch.browse.ConferencesTabBrowseFragment import java.util.Comparator class ConferenceRecyclerViewAdapter(private val mListener: ConferencesTabBrowseFragment.OnConferenceListFragmentInteractionListener?) : ItemRecyclerViewAdapter() { diff --git a/touch/src/main/java/de/nicidienase/chaosflix/touch/adapters/EventRecyclerViewAdapter.kt b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/adapters/EventRecyclerViewAdapter.kt similarity index 93% rename from touch/src/main/java/de/nicidienase/chaosflix/touch/adapters/EventRecyclerViewAdapter.kt rename to touch/src/main/java/de/nicidienase/chaosflix/touch/browse/adapters/EventRecyclerViewAdapter.kt index ee5b7fe3..22f70a92 100644 --- a/touch/src/main/java/de/nicidienase/chaosflix/touch/adapters/EventRecyclerViewAdapter.kt +++ b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/adapters/EventRecyclerViewAdapter.kt @@ -1,15 +1,13 @@ -package de.nicidienase.chaosflix.touch.adapters +package de.nicidienase.chaosflix.touch.browse.adapters import android.support.v4.view.ViewCompat import android.view.View import com.squareup.picasso.Picasso -import java.util.Collections - import de.nicidienase.chaosflix.R import de.nicidienase.chaosflix.common.entities.recording.persistence.PersistentEvent -import de.nicidienase.chaosflix.touch.fragments.EventsListFragment +import de.nicidienase.chaosflix.touch.browse.EventsListFragment import java.util.Comparator class EventRecyclerViewAdapter(val listener: EventsListFragment.OnEventsListFragmentInteractionListener) : diff --git a/touch/src/main/java/de/nicidienase/chaosflix/touch/adapters/ItemRecyclerViewAdapter.kt b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/adapters/ItemRecyclerViewAdapter.kt similarity index 98% rename from touch/src/main/java/de/nicidienase/chaosflix/touch/adapters/ItemRecyclerViewAdapter.kt rename to touch/src/main/java/de/nicidienase/chaosflix/touch/browse/adapters/ItemRecyclerViewAdapter.kt index d54a5820..7563339f 100644 --- a/touch/src/main/java/de/nicidienase/chaosflix/touch/adapters/ItemRecyclerViewAdapter.kt +++ b/touch/src/main/java/de/nicidienase/chaosflix/touch/browse/adapters/ItemRecyclerViewAdapter.kt @@ -1,4 +1,4 @@ -package de.nicidienase.chaosflix.touch.adapters +package de.nicidienase.chaosflix.touch.browse.adapters import android.support.v7.widget.RecyclerView import android.view.LayoutInflater diff --git a/touch/src/main/java/de/nicidienase/chaosflix/touch/fragments/ExoPlayerFragment.java b/touch/src/main/java/de/nicidienase/chaosflix/touch/playback/ExoPlayerFragment.java similarity index 96% rename from touch/src/main/java/de/nicidienase/chaosflix/touch/fragments/ExoPlayerFragment.java rename to touch/src/main/java/de/nicidienase/chaosflix/touch/playback/ExoPlayerFragment.java index c3822fc6..ead61638 100644 --- a/touch/src/main/java/de/nicidienase/chaosflix/touch/fragments/ExoPlayerFragment.java +++ b/touch/src/main/java/de/nicidienase/chaosflix/touch/playback/ExoPlayerFragment.java @@ -1,6 +1,5 @@ -package de.nicidienase.chaosflix.touch.fragments; +package de.nicidienase.chaosflix.touch.playback; -import android.arch.lifecycle.LiveData; import android.arch.lifecycle.ViewModelProviders; import android.content.Context; import android.net.Uri; @@ -48,11 +47,9 @@ import butterknife.ButterKnife; import de.nicidienase.chaosflix.R; import de.nicidienase.chaosflix.common.entities.recording.persistence.PersistentEvent; import de.nicidienase.chaosflix.common.entities.recording.persistence.PersistentRecording; -import de.nicidienase.chaosflix.common.entities.userdata.PlaybackProgress; import de.nicidienase.chaosflix.touch.ViewModelFactory; -import de.nicidienase.chaosflix.touch.viewmodels.PlayerViewModel; -public class ExoPlayerFragment extends Fragment implements MyListener.PlayerStateChangeListener { +public class ExoPlayerFragment extends Fragment implements PlayerEventListener.PlayerStateChangeListener { private static final String TAG = ExoPlayerFragment.class.getSimpleName(); public static final String PLAYBACK_STATE = "playback_state"; private static final String ARG_EVENT = "event"; @@ -188,7 +185,7 @@ public class ExoPlayerFragment extends Fragment implements MyListener.PlayerStat exoPlayer = ExoPlayerFactory.newSimpleInstance(renderersFactory, trackSelector, loadControl); - MyListener listener = new MyListener(exoPlayer, this); + PlayerEventListener listener = new PlayerEventListener(exoPlayer, this); exoPlayer.addVideoListener(listener); exoPlayer.addListener(listener); diff --git a/touch/src/main/java/de/nicidienase/chaosflix/touch/activities/PlayerActivity.java b/touch/src/main/java/de/nicidienase/chaosflix/touch/playback/PlayerActivity.java similarity index 71% rename from touch/src/main/java/de/nicidienase/chaosflix/touch/activities/PlayerActivity.java rename to touch/src/main/java/de/nicidienase/chaosflix/touch/playback/PlayerActivity.java index f0e0db17..d86b9030 100644 --- a/touch/src/main/java/de/nicidienase/chaosflix/touch/activities/PlayerActivity.java +++ b/touch/src/main/java/de/nicidienase/chaosflix/touch/playback/PlayerActivity.java @@ -1,8 +1,5 @@ -package de.nicidienase.chaosflix.touch.activities; +package de.nicidienase.chaosflix.touch.playback; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.ViewModelProviders; -import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; @@ -10,14 +7,8 @@ import android.support.v4.app.FragmentTransaction; import android.support.v7.app.AppCompatActivity; import de.nicidienase.chaosflix.R; -import de.nicidienase.chaosflix.common.entities.recording.Recording; import de.nicidienase.chaosflix.common.entities.recording.persistence.PersistentEvent; import de.nicidienase.chaosflix.common.entities.recording.persistence.PersistentRecording; -import de.nicidienase.chaosflix.common.entities.userdata.PlaybackProgress; -import de.nicidienase.chaosflix.touch.ViewModelFactory; -import de.nicidienase.chaosflix.touch.fragments.ExoPlayerFragment; -import de.nicidienase.chaosflix.touch.viewmodels.PlayerViewModel; -import io.reactivex.disposables.CompositeDisposable; public class PlayerActivity extends AppCompatActivity implements ExoPlayerFragment.OnMediaPlayerInteractionListener { public static final String EVENT_KEY = "event"; diff --git a/touch/src/main/java/de/nicidienase/chaosflix/touch/fragments/MyListener.java b/touch/src/main/java/de/nicidienase/chaosflix/touch/playback/PlayerEventListener.java similarity index 87% rename from touch/src/main/java/de/nicidienase/chaosflix/touch/fragments/MyListener.java rename to touch/src/main/java/de/nicidienase/chaosflix/touch/playback/PlayerEventListener.java index 4da3bda8..16eb1a72 100644 --- a/touch/src/main/java/de/nicidienase/chaosflix/touch/fragments/MyListener.java +++ b/touch/src/main/java/de/nicidienase/chaosflix/touch/playback/PlayerEventListener.java @@ -1,6 +1,5 @@ -package de.nicidienase.chaosflix.touch.fragments; +package de.nicidienase.chaosflix.touch.playback; -import android.support.design.widget.Snackbar; import android.util.Log; import com.google.android.exoplayer2.ExoPlaybackException; @@ -14,12 +13,12 @@ import com.google.android.exoplayer2.trackselection.TrackSelectionArray; /** * Created by felix on 27.09.17. */ -class MyListener implements Player.EventListener, SimpleExoPlayer.VideoListener { - private static final String TAG = MyListener.class.getSimpleName(); +class PlayerEventListener implements Player.EventListener, SimpleExoPlayer.VideoListener { + private static final String TAG = PlayerEventListener.class.getSimpleName(); private SimpleExoPlayer player; private PlayerStateChangeListener listener; - public MyListener(SimpleExoPlayer player, PlayerStateChangeListener listener) { + public PlayerEventListener(SimpleExoPlayer player, PlayerStateChangeListener listener) { this.player = player; this.listener = listener; } diff --git a/touch/src/main/java/de/nicidienase/chaosflix/touch/viewmodels/PlayerViewModel.kt b/touch/src/main/java/de/nicidienase/chaosflix/touch/playback/PlayerViewModel.kt similarity index 96% rename from touch/src/main/java/de/nicidienase/chaosflix/touch/viewmodels/PlayerViewModel.kt rename to touch/src/main/java/de/nicidienase/chaosflix/touch/playback/PlayerViewModel.kt index 1475895b..a082fe46 100644 --- a/touch/src/main/java/de/nicidienase/chaosflix/touch/viewmodels/PlayerViewModel.kt +++ b/touch/src/main/java/de/nicidienase/chaosflix/touch/playback/PlayerViewModel.kt @@ -1,4 +1,4 @@ -package de.nicidienase.chaosflix.touch.viewmodels +package de.nicidienase.chaosflix.touch.playback import android.arch.lifecycle.LiveData import android.arch.lifecycle.ViewModel diff --git a/touch/src/main/res/layout/fragment_exo_player.xml b/touch/src/main/res/layout/fragment_exo_player.xml index f06b7518..51065247 100644 --- a/touch/src/main/res/layout/fragment_exo_player.xml +++ b/touch/src/main/res/layout/fragment_exo_player.xml @@ -4,7 +4,7 @@ android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" android:background="@color/black" - tools:context="de.nicidienase.chaosflix.touch.fragments.ExoPlayerFragment"> + tools:context="de.nicidienase.chaosflix.touch.playback.ExoPlayerFragment">