update package-structure

This commit is contained in:
Felix 2017-11-12 18:32:44 +01:00
parent a00e019020
commit afd53d2053
19 changed files with 38 additions and 62 deletions

View file

@ -15,7 +15,7 @@
android:name=".touch.ChaosflixApplication"
android:theme="@style/AppTheme">
<activity
android:name=".touch.activities.SplashActivity"
android:name=".touch.SplashActivity"
android:label="@string/app_name"
android:theme="@style/SplashTheme">
<intent-filter>
@ -23,14 +23,14 @@
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".touch.activities.BrowseActivity">
<activity android:name=".touch.browse.BrowseActivity">
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable"/>
</activity>
<activity android:name=".touch.activities.AboutActivity"/>
<activity android:name=".touch.activities.PlayerActivity"
<activity android:name=".touch.playback.PlayerActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:launchMode="singleTop"/>

View file

@ -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()
}
}

View file

@ -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

View file

@ -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,

View file

@ -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 {

View file

@ -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

View file

@ -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 {

View file

@ -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 {

View file

@ -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() {

View file

@ -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 {

View file

@ -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 {

View file

@ -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<PersistentConference>() {

View file

@ -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) :

View file

@ -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

View file

@ -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);

View file

@ -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";

View file

@ -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;
}

View file

@ -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

View file

@ -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">
<com.google.android.exoplayer2.ui.SimpleExoPlayerView
android:id="@+id/video_view"