fix DexMergerException caused by duplicate databinding-classes

This commit is contained in:
Felix 2018-12-11 00:43:49 +01:00
parent 897f1f35e4
commit 216415249a
40 changed files with 94 additions and 104 deletions

View file

@ -1,4 +1,4 @@
package de.nicidienase.chaosflix.touch package de.nicidienase.chaosflix
import android.app.Application import android.app.Application
import android.content.Context import android.content.Context

View file

@ -0,0 +1,5 @@
package de.nicidienase.chaosflix
import android.app.Application
class ChaosflixApplication : Application() {}

View file

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip

View file

@ -13,7 +13,7 @@ android {
// odd for touch, even for leanback // odd for touch, even for leanback
versionCode 12 versionCode 12
versionName "0.3" versionName "0.3"
multiDexEnabled true // multiDexEnabled true
} }
buildTypes { buildTypes {
debug { debug {
@ -49,6 +49,7 @@ android {
dataBinding { dataBinding {
enabled = true enabled = true
} }
buildToolsVersion rootProject.ext.buildToolsVersion
} }

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest package="de.nicidienase.chaosflix" <manifest package="de.nicidienase.chaosflix.leanback"
xmlns:android="http://schemas.android.com/apk/res/android"> xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
@ -16,10 +16,10 @@
android:icon="@drawable/icon_notext_144x144" android:icon="@drawable/icon_notext_144x144"
android:label="@string/app_name" android:label="@string/app_name"
android:supportsRtl="true" android:supportsRtl="true"
android:name=".touch.ChaosflixApplication" android:name="de.nicidienase.chaosflix.ChaosflixApplication"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
<activity <activity
android:name=".leanback.activities.ConferencesActivity" android:name=".activities.ConferencesActivity"
android:banner="@drawable/banner" android:banner="@drawable/banner"
android:icon="@drawable/icon" android:icon="@drawable/icon"
android:label="@string/app_name" android:label="@string/app_name"
@ -31,9 +31,9 @@
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".leanback.activities.EventsActivity" <activity android:name=".activities.EventsActivity"
android:exported="true"/> android:exported="true"/>
<activity android:name=".leanback.activities.DetailsActivity" <activity android:name=".activities.DetailsActivity"
android:exported="true"/> android:exported="true"/>
</application> </application>

View file

@ -25,7 +25,7 @@ import android.widget.ImageView;
import com.bumptech.glide.Glide; import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions; import com.bumptech.glide.request.RequestOptions;
import de.nicidienase.chaosflix.R; import de.nicidienase.chaosflix.leanback.R;
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentConference; import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentConference;
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent; import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent;
import de.nicidienase.chaosflix.common.mediadata.entities.streaming.LiveConference; import de.nicidienase.chaosflix.common.mediadata.entities.streaming.LiveConference;

View file

@ -9,7 +9,7 @@ import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent
import de.nicidienase.chaosflix.common.mediadata.entities.streaming.Room import de.nicidienase.chaosflix.common.mediadata.entities.streaming.Room
import de.nicidienase.chaosflix.databinding.DetailViewBinding import de.nicidienase.chaosflix.leanback.databinding.DetailViewBinding
class EventDetailsDescriptionPresenter(private val context: Context) : Presenter() { class EventDetailsDescriptionPresenter(private val context: Context) : Presenter() {

View file

@ -13,7 +13,7 @@ import android.view.ViewGroup;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import de.nicidienase.chaosflix.R; import de.nicidienase.chaosflix.leanback.R;
/** /**
* Created by felix on 16.04.17. * Created by felix on 16.04.17.

View file

@ -2,7 +2,7 @@ package de.nicidienase.chaosflix.leanback.activities
import android.os.Bundle import android.os.Bundle
import android.support.v4.app.FragmentActivity import android.support.v4.app.FragmentActivity
import de.nicidienase.chaosflix.R import de.nicidienase.chaosflix.leanback.R
class ConferencesActivity : FragmentActivity() { class ConferencesActivity : FragmentActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {

View file

@ -7,9 +7,9 @@ import android.support.v4.app.FragmentActivity
import android.support.v7.app.AppCompatActivity import android.support.v7.app.AppCompatActivity
import android.view.WindowManager import android.view.WindowManager
import de.nicidienase.chaosflix.R
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent
import de.nicidienase.chaosflix.common.mediadata.entities.streaming.Room import de.nicidienase.chaosflix.common.mediadata.entities.streaming.Room
import de.nicidienase.chaosflix.leanback.R
/* /*
* Details activity class that loads LeanbackDetailsFragment class * Details activity class that loads LeanbackDetailsFragment class

View file

@ -4,8 +4,8 @@ import android.content.Context
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.support.v4.app.FragmentActivity import android.support.v4.app.FragmentActivity
import de.nicidienase.chaosflix.R
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentConference import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentConference
import de.nicidienase.chaosflix.leanback.R
class EventsActivity : FragmentActivity() { class EventsActivity : FragmentActivity() {

View file

@ -13,7 +13,7 @@ import android.view.ViewGroup;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import de.nicidienase.chaosflix.R; import de.nicidienase.chaosflix.leanback.R;
public class BrowseErrorFragment extends ErrorSupportFragment { public class BrowseErrorFragment extends ErrorSupportFragment {

View file

@ -20,7 +20,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import de.nicidienase.chaosflix.BuildConfig; import de.nicidienase.chaosflix.BuildConfig;
import de.nicidienase.chaosflix.R; import de.nicidienase.chaosflix.leanback.R;
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.ConferenceGroup; import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.ConferenceGroup;
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentConference; import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentConference;
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent; import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent;

View file

@ -6,7 +6,7 @@ import android.support.v17.leanback.app.VerticalGridSupportFragment;
import android.support.v17.leanback.widget.ArrayObjectAdapter; import android.support.v17.leanback.widget.ArrayObjectAdapter;
import android.support.v17.leanback.widget.VerticalGridPresenter; import android.support.v17.leanback.widget.VerticalGridPresenter;
import de.nicidienase.chaosflix.R; import de.nicidienase.chaosflix.leanback.R;
import de.nicidienase.chaosflix.leanback.CardPresenter; import de.nicidienase.chaosflix.leanback.CardPresenter;
import de.nicidienase.chaosflix.leanback.ItemViewClickedListener; import de.nicidienase.chaosflix.leanback.ItemViewClickedListener;

View file

@ -49,7 +49,7 @@ import com.google.android.exoplayer2.upstream.DefaultHttpDataSource
import com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory import com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory
import com.google.android.exoplayer2.upstream.HttpDataSource import com.google.android.exoplayer2.upstream.HttpDataSource
import com.google.android.exoplayer2.util.Util import com.google.android.exoplayer2.util.Util
import de.nicidienase.chaosflix.R import de.nicidienase.chaosflix.leanback.R
import de.nicidienase.chaosflix.common.ChaosflixUtil import de.nicidienase.chaosflix.common.ChaosflixUtil
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent
import de.nicidienase.chaosflix.common.mediadata.entities.streaming.Room import de.nicidienase.chaosflix.common.mediadata.entities.streaming.Room

View file

@ -23,7 +23,6 @@ import com.bumptech.glide.Glide
import com.bumptech.glide.request.RequestOptions import com.bumptech.glide.request.RequestOptions
import com.bumptech.glide.request.target.SimpleTarget import com.bumptech.glide.request.target.SimpleTarget
import com.bumptech.glide.request.transition.Transition import com.bumptech.glide.request.transition.Transition
import de.nicidienase.chaosflix.R
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentConference import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentConference
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent
import de.nicidienase.chaosflix.common.mediadata.sync.Downloader import de.nicidienase.chaosflix.common.mediadata.sync.Downloader
@ -31,6 +30,7 @@ import de.nicidienase.chaosflix.common.viewmodel.BrowseViewModel
import de.nicidienase.chaosflix.common.viewmodel.ViewModelFactory import de.nicidienase.chaosflix.common.viewmodel.ViewModelFactory
import de.nicidienase.chaosflix.leanback.CardPresenter import de.nicidienase.chaosflix.leanback.CardPresenter
import de.nicidienase.chaosflix.leanback.ItemViewClickedListener import de.nicidienase.chaosflix.leanback.ItemViewClickedListener
import de.nicidienase.chaosflix.leanback.R
import de.nicidienase.chaosflix.leanback.activities.EventsActivity import de.nicidienase.chaosflix.leanback.activities.EventsActivity
import java.net.URI import java.net.URI
import java.net.URISyntaxException import java.net.URISyntaxException

View file

@ -13,7 +13,7 @@ android {
// odd for touch, even for leanback // odd for touch, even for leanback
versionCode 27 versionCode 27
versionName "0.3.0" versionName "0.3.0"
multiDexEnabled true // multiDexEnabled true
} }
buildTypes { buildTypes {
debug { debug {
@ -76,7 +76,7 @@ dependencies {
implementation 'net.opacapp:multiline-collapsingtoolbar:27.1.0' implementation 'net.opacapp:multiline-collapsingtoolbar:27.1.0'
implementation 'net.rdrei.android.dirchooser:library:3.2@aar' implementation 'net.rdrei.android.dirchooser:library:3.2@aar'
// implementation 'com.gu:option:1.3' // implementation 'com.gu:option:1.3'
implementation 'com.github.guardian:Option:-SNAPSHOT'
testImplementation 'org.mockito:mockito-core:2.11.0' testImplementation 'org.mockito:mockito-core:2.11.0'
androidTestImplementation('com.android.support.test:rules:0.5') { androidTestImplementation('com.android.support.test:rules:0.5') {
@ -91,15 +91,3 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations' exclude group: 'com.android.support', module: 'support-annotations'
} }
} }
//repositories {
// mavenCentral()
// maven { url 'http://guardian.github.com/maven/repo-releases' }
// mavenLocal()
//}

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="de.nicidienase.chaosflix" package="de.nicidienase.chaosflix.touch"
tools:ignore="MissingLeanbackLauncher"> tools:ignore="MissingLeanbackLauncher">
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
@ -11,7 +11,7 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<application <application
android:name=".touch.ChaosflixApplication" android:name="de.nicidienase.chaosflix.ChaosflixApplication"
android:allowBackup="true" android:allowBackup="true"
android:icon="@drawable/icon_notext" android:icon="@drawable/icon_notext"
android:label="@string/app_name" android:label="@string/app_name"
@ -19,7 +19,7 @@
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
tools:replace="android:theme"> tools:replace="android:theme">
<activity <activity
android:name=".touch.SplashActivity" android:name=".SplashActivity"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/SplashTheme"> android:theme="@style/SplashTheme">
<intent-filter> <intent-filter>
@ -27,38 +27,38 @@
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".touch.browse.BrowseActivity"> <activity android:name=".browse.BrowseActivity">
<meta-data <meta-data
android:name="android.app.searchable" android:name="android.app.searchable"
android:resource="@xml/searchable"/> android:resource="@xml/searchable"/>
</activity> </activity>
<activity <activity
android:name=".touch.browse.eventslist.EventsListActivity" android:name=".browse.eventslist.EventsListActivity"
android:parentActivityName=".touch.browse.BrowseActivity"/> android:parentActivityName=".browse.BrowseActivity"/>
<activity <activity
android:name=".touch.eventdetails.EventDetailsActivity" android:name=".eventdetails.EventDetailsActivity"
android:parentActivityName="de.nicidienase.chaosflix.touch.browse.eventslist.EventsListActivity"/> android:parentActivityName="de.nicidienase.chaosflix.touch.browse.eventslist.EventsListActivity"/>
<activity <activity
android:name=".touch.about.AboutActivity" android:name=".about.AboutActivity"
android:parentActivityName=".touch.browse.BrowseActivity"/> android:parentActivityName=".browse.BrowseActivity"/>
<activity <activity
android:name=".touch.playback.PlayerActivity" android:name=".playback.PlayerActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:launchMode="singleTop" android:launchMode="singleTop"
android:parentActivityName=".touch.eventdetails.EventDetailsActivity"/> android:parentActivityName=".eventdetails.EventDetailsActivity"/>
<activity <activity
android:name=".touch.settings.SettingsActivity" android:name=".settings.SettingsActivity"
android:parentActivityName=".touch.browse.BrowseActivity"/> android:parentActivityName=".browse.BrowseActivity"/>
<activity android:name="net.rdrei.android.dirchooser.DirectoryChooserActivity" /> <activity android:name="net.rdrei.android.dirchooser.DirectoryChooserActivity" />
<service <service
android:name=".touch.sync.DownloadJobService" android:name="de.nicidienase.chaosflix.common.mediadata.sync.DownloadJobService"
android:permission="android.permission.BIND_JOB_SERVICE"/> android:permission="android.permission.BIND_JOB_SERVICE"/>
</application> </application>

View file

@ -6,7 +6,7 @@ import android.view.animation.Animation
import android.view.animation.LinearInterpolator import android.view.animation.LinearInterpolator
import android.view.animation.RotateAnimation import android.view.animation.RotateAnimation
import android.widget.ImageView import android.widget.ImageView
import de.nicidienase.chaosflix.R import de.nicidienase.chaosflix.touch.R
class ChaosflixLoadingSpinner(context: Context, attributeSet: AttributeSet) : ImageView(context, attributeSet) { class ChaosflixLoadingSpinner(context: Context, attributeSet: AttributeSet) : ImageView(context, attributeSet) {
init { init {

View file

@ -5,8 +5,8 @@ import android.databinding.DataBindingUtil
import android.os.Bundle import android.os.Bundle
import android.support.v7.app.AppCompatActivity import android.support.v7.app.AppCompatActivity
import android.view.View import android.view.View
import de.nicidienase.chaosflix.R import de.nicidienase.chaosflix.touch.R
import de.nicidienase.chaosflix.databinding.ActivityAboutBinding import de.nicidienase.chaosflix.touch.databinding.ActivityAboutBinding
import mehdi.sakout.aboutpage.AboutPage import mehdi.sakout.aboutpage.AboutPage
import mehdi.sakout.aboutpage.Element import mehdi.sakout.aboutpage.Element

View file

@ -7,7 +7,7 @@ import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import com.mikepenz.aboutlibraries.LibsBuilder import com.mikepenz.aboutlibraries.LibsBuilder
import com.mikepenz.aboutlibraries.ui.LibsSupportFragment import com.mikepenz.aboutlibraries.ui.LibsSupportFragment
import de.nicidienase.chaosflix.R import de.nicidienase.chaosflix.touch.R
class LibsFragment: DialogFragment(){ class LibsFragment: DialogFragment(){
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {

View file

@ -7,7 +7,6 @@ import android.content.res.Configuration
import android.databinding.DataBindingUtil import android.databinding.DataBindingUtil
import android.os.Bundle import android.os.Bundle
import android.os.PersistableBundle import android.os.PersistableBundle
import android.preference.PreferenceManager
import android.support.design.widget.NavigationView import android.support.design.widget.NavigationView
import android.support.design.widget.Snackbar import android.support.design.widget.Snackbar
import android.support.v4.app.Fragment import android.support.v4.app.Fragment
@ -20,15 +19,14 @@ import android.transition.TransitionInflater
import android.view.MenuItem import android.view.MenuItem
import android.view.View import android.view.View
import android.widget.Toast import android.widget.Toast
import de.nicidienase.chaosflix.R import de.nicidienase.chaosflix.touch.R
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentConference import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentConference
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent
import de.nicidienase.chaosflix.common.mediadata.entities.streaming.StreamUrl import de.nicidienase.chaosflix.common.mediadata.entities.streaming.StreamUrl
import de.nicidienase.chaosflix.databinding.ActivityBrowseBinding
import de.nicidienase.chaosflix.touch.OnEventSelectedListener
import de.nicidienase.chaosflix.common.PreferencesManager
import de.nicidienase.chaosflix.common.viewmodel.BrowseViewModel import de.nicidienase.chaosflix.common.viewmodel.BrowseViewModel
import de.nicidienase.chaosflix.common.viewmodel.ViewModelFactory import de.nicidienase.chaosflix.common.viewmodel.ViewModelFactory
import de.nicidienase.chaosflix.touch.databinding.ActivityBrowseBinding
import de.nicidienase.chaosflix.touch.OnEventSelectedListener
import de.nicidienase.chaosflix.touch.about.AboutActivity import de.nicidienase.chaosflix.touch.about.AboutActivity
import de.nicidienase.chaosflix.touch.browse.download.DownloadsListFragment import de.nicidienase.chaosflix.touch.browse.download.DownloadsListFragment
import de.nicidienase.chaosflix.touch.browse.eventslist.EventsListActivity import de.nicidienase.chaosflix.touch.browse.eventslist.EventsListActivity
@ -244,8 +242,8 @@ class BrowseActivity : AppCompatActivity(),
} }
companion object { companion object {
fun launch(context: Context){ fun launch(context: Context) {
context.startActivity(Intent(context,BrowseActivity::class.java)) context.startActivity(Intent(context, BrowseActivity::class.java))
} }
} }
} }

View file

@ -10,7 +10,7 @@ import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import de.nicidienase.chaosflix.R; import de.nicidienase.chaosflix.touch.R;
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.ConferenceGroup; import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.ConferenceGroup;
import de.nicidienase.chaosflix.touch.browse.adapters.ConferenceRecyclerViewAdapter; import de.nicidienase.chaosflix.touch.browse.adapters.ConferenceRecyclerViewAdapter;

View file

@ -12,7 +12,7 @@ import org.jetbrains.annotations.NotNull;
import de.nicidienase.chaosflix.R; import de.nicidienase.chaosflix.R;
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentConference; import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentConference;
import de.nicidienase.chaosflix.databinding.FragmentTabPagerLayoutBinding; import de.nicidienase.chaosflix.touch.databinding.FragmentTabPagerLayoutBinding;
import de.nicidienase.chaosflix.touch.browse.adapters.ConferenceGroupsFragmentPager; import de.nicidienase.chaosflix.touch.browse.adapters.ConferenceGroupsFragmentPager;

View file

@ -9,7 +9,7 @@ import android.util.Log;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import de.nicidienase.chaosflix.R; import de.nicidienase.chaosflix.touch.R;
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.ConferenceGroup; import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.ConferenceGroup;
import de.nicidienase.chaosflix.touch.browse.ConferenceGroupFragment; import de.nicidienase.chaosflix.touch.browse.ConferenceGroupFragment;

View file

@ -1,8 +1,8 @@
package de.nicidienase.chaosflix.touch.browse.adapters package de.nicidienase.chaosflix.touch.browse.adapters
import com.squareup.picasso.Picasso import com.squareup.picasso.Picasso
import de.nicidienase.chaosflix.R
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentConference import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentConference
import de.nicidienase.chaosflix.touch.R
import de.nicidienase.chaosflix.touch.browse.ConferencesTabBrowseFragment import de.nicidienase.chaosflix.touch.browse.ConferencesTabBrowseFragment
import java.util.* import java.util.*

View file

@ -3,7 +3,7 @@ package de.nicidienase.chaosflix.touch.browse.adapters
import android.support.v4.view.ViewCompat import android.support.v4.view.ViewCompat
import android.view.View import android.view.View
import com.squareup.picasso.Picasso import com.squareup.picasso.Picasso
import de.nicidienase.chaosflix.R import de.nicidienase.chaosflix.touch.R
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent
import de.nicidienase.chaosflix.touch.OnEventSelectedListener import de.nicidienase.chaosflix.touch.OnEventSelectedListener
import java.util.* import java.util.*

View file

@ -8,7 +8,7 @@ import android.widget.Filter
import android.widget.Filterable import android.widget.Filterable
import android.widget.ImageView import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import de.nicidienase.chaosflix.R import de.nicidienase.chaosflix.touch.R
import java.util.* import java.util.*
abstract class ItemRecyclerViewAdapter<T>() abstract class ItemRecyclerViewAdapter<T>()

View file

@ -9,11 +9,10 @@ import android.support.v7.widget.LinearLayoutManager
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import de.nicidienase.chaosflix.R
import de.nicidienase.chaosflix.common.userdata.entities.download.OfflineEvent
import de.nicidienase.chaosflix.databinding.FragmentDownloadsBinding
import de.nicidienase.chaosflix.touch.OnEventSelectedListener import de.nicidienase.chaosflix.touch.OnEventSelectedListener
import de.nicidienase.chaosflix.touch.R
import de.nicidienase.chaosflix.touch.browse.BrowseFragment import de.nicidienase.chaosflix.touch.browse.BrowseFragment
import de.nicidienase.chaosflix.touch.databinding.FragmentDownloadsBinding
class DownloadsListFragment : BrowseFragment() { class DownloadsListFragment : BrowseFragment() {
@ -51,7 +50,7 @@ class DownloadsListFragment : BrowseFragment() {
binding.list.layoutManager = GridLayoutManager(context, columnCount - 1) binding.list.layoutManager = GridLayoutManager(context, columnCount - 1)
} }
viewModel.getOfflineEvents().observe(this, Observer { events -> viewModel.getOfflineEvents().observe(this, Observer { events ->
if(events != null){ if (events != null) {
offlineEventAdapter.items = events offlineEventAdapter.items = events
offlineEventAdapter.notifyDataSetChanged() offlineEventAdapter.notifyDataSetChanged()
setLoadingOverlayVisibility(false) setLoadingOverlayVisibility(false)
@ -64,7 +63,7 @@ class DownloadsListFragment : BrowseFragment() {
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
updateRunnable = object: Runnable { updateRunnable = object : Runnable {
override fun run() { override fun run() {
viewModel.updateDownloadStatus() viewModel.updateDownloadStatus()
handler.postDelayed(this, UPDATE_DELAY) handler.postDelayed(this, UPDATE_DELAY)
@ -86,7 +85,7 @@ class DownloadsListFragment : BrowseFragment() {
companion object { companion object {
private val ARG_COLUMN_COUNT = "column_count" private val ARG_COLUMN_COUNT = "column_count"
fun getInstance(columnCount: Int = 1): DownloadsListFragment{ fun getInstance(columnCount: Int = 1): DownloadsListFragment {
val fragment = DownloadsListFragment() val fragment = DownloadsListFragment()
val args = Bundle() val args = Bundle()
args.putInt(ARG_COLUMN_COUNT, columnCount) args.putInt(ARG_COLUMN_COUNT, columnCount)
@ -95,6 +94,6 @@ class DownloadsListFragment : BrowseFragment() {
} }
} }
interface InteractionListener: OnEventSelectedListener { interface InteractionListener : OnEventSelectedListener {
} }
} }

View file

@ -6,10 +6,10 @@ import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import com.squareup.picasso.Picasso import com.squareup.picasso.Picasso
import de.nicidienase.chaosflix.R import de.nicidienase.chaosflix.touch.R
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent
import de.nicidienase.chaosflix.common.userdata.entities.download.OfflineEvent import de.nicidienase.chaosflix.common.userdata.entities.download.OfflineEvent
import de.nicidienase.chaosflix.databinding.ItemOfflineEventBinding import de.nicidienase.chaosflix.touch.databinding.ItemOfflineEventBinding
import de.nicidienase.chaosflix.touch.OnEventSelectedListener import de.nicidienase.chaosflix.touch.OnEventSelectedListener
import de.nicidienase.chaosflix.common.viewmodel.BrowseViewModel import de.nicidienase.chaosflix.common.viewmodel.BrowseViewModel

View file

@ -4,7 +4,7 @@ import android.content.Context
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.support.v7.app.AppCompatActivity import android.support.v7.app.AppCompatActivity
import de.nicidienase.chaosflix.R import de.nicidienase.chaosflix.touch.R
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentConference import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentConference
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent
import de.nicidienase.chaosflix.touch.OnEventSelectedListener import de.nicidienase.chaosflix.touch.OnEventSelectedListener

View file

@ -3,7 +3,6 @@ package de.nicidienase.chaosflix.touch.browse.eventslist;
import android.app.SearchManager; import android.app.SearchManager;
import android.arch.lifecycle.Observer; import android.arch.lifecycle.Observer;
import android.content.Context; import android.content.Context;
import android.content.res.Resources;
import android.os.Bundle; import android.os.Bundle;
import android.os.Parcelable; import android.os.Parcelable;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
@ -21,14 +20,14 @@ import android.widget.SearchView;
import java.util.List; import java.util.List;
import de.nicidienase.chaosflix.R; import de.nicidienase.chaosflix.touch.R;
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentConference; import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentConference;
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent; import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent;
import de.nicidienase.chaosflix.common.mediadata.sync.Downloader; import de.nicidienase.chaosflix.common.mediadata.sync.Downloader;
import de.nicidienase.chaosflix.databinding.FragmentEventsListBinding;
import de.nicidienase.chaosflix.touch.OnEventSelectedListener; import de.nicidienase.chaosflix.touch.OnEventSelectedListener;
import de.nicidienase.chaosflix.touch.browse.BrowseFragment; import de.nicidienase.chaosflix.touch.browse.BrowseFragment;
import de.nicidienase.chaosflix.touch.browse.adapters.EventRecyclerViewAdapter; import de.nicidienase.chaosflix.touch.browse.adapters.EventRecyclerViewAdapter;
import de.nicidienase.chaosflix.touch.databinding.FragmentEventsListBinding;
public class EventsListFragment extends BrowseFragment implements SearchView.OnQueryTextListener { public class EventsListFragment extends BrowseFragment implements SearchView.OnQueryTextListener {
@ -102,7 +101,7 @@ public class EventsListFragment extends BrowseFragment implements SearchView.OnQ
binding.list.setAdapter(eventAdapter); binding.list.setAdapter(eventAdapter);
Observer<List<PersistentEvent>> listObserver = persistentEvents -> { Observer<List<PersistentEvent>> listObserver = persistentEvents -> {
if(persistentEvents != null){ if (persistentEvents != null) {
setEvents(persistentEvents); setEvents(persistentEvents);
if (persistentEvents.size() > 0) { if (persistentEvents.size() > 0) {
setLoadingOverlayVisibility(false); setLoadingOverlayVisibility(false);
@ -125,7 +124,7 @@ public class EventsListFragment extends BrowseFragment implements SearchView.OnQ
getViewModel().getEventsforConference(conference).observe(this, listObserver); getViewModel().getEventsforConference(conference).observe(this, listObserver);
getViewModel().updateEventsForConference(conference).observe(this, state -> { getViewModel().updateEventsForConference(conference).observe(this, state -> {
Downloader.DownloaderState downloaderState = state.getState(); Downloader.DownloaderState downloaderState = state.getState();
switch (downloaderState){ switch (downloaderState) {
case RUNNING: case RUNNING:
setLoadingOverlayVisibility(true); setLoadingOverlayVisibility(true);
break; break;
@ -133,7 +132,7 @@ public class EventsListFragment extends BrowseFragment implements SearchView.OnQ
setLoadingOverlayVisibility(false); setLoadingOverlayVisibility(false);
break; break;
} }
if(state.getError() != null){ if (state.getError() != null) {
showSnackbar(state.getError()); showSnackbar(state.getError());
} }
}); });
@ -143,7 +142,7 @@ public class EventsListFragment extends BrowseFragment implements SearchView.OnQ
} }
private void showSnackbar(String message) { private void showSnackbar(String message) {
if(snackbar!= null){ if (snackbar != null) {
snackbar.dismiss(); snackbar.dismiss();
} }
snackbar = Snackbar.make(getView(), message, Snackbar.LENGTH_LONG); snackbar = Snackbar.make(getView(), message, Snackbar.LENGTH_LONG);

View file

@ -8,7 +8,7 @@ import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import com.squareup.picasso.Picasso import com.squareup.picasso.Picasso
import de.nicidienase.chaosflix.common.mediadata.entities.streaming.LiveConference import de.nicidienase.chaosflix.common.mediadata.entities.streaming.LiveConference
import de.nicidienase.chaosflix.databinding.ItemLiveeventCardviewBinding import de.nicidienase.chaosflix.touch.databinding.ItemLiveeventCardviewBinding
class LivestreamAdapter(val listener: LivestreamListFragment.InteractionListener , liveConferences: List<LiveConference> = emptyList()) : RecyclerView.Adapter<LivestreamAdapter.ViewHolder>(){ class LivestreamAdapter(val listener: LivestreamListFragment.InteractionListener , liveConferences: List<LiveConference> = emptyList()) : RecyclerView.Adapter<LivestreamAdapter.ViewHolder>(){

View file

@ -10,9 +10,9 @@ import android.util.Log
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import de.nicidienase.chaosflix.R import de.nicidienase.chaosflix.touch.R
import de.nicidienase.chaosflix.databinding.FragmentLivestreamsBinding
import de.nicidienase.chaosflix.touch.browse.BrowseFragment import de.nicidienase.chaosflix.touch.browse.BrowseFragment
import de.nicidienase.chaosflix.touch.databinding.FragmentLivestreamsBinding
class LivestreamListFragment : BrowseFragment() { class LivestreamListFragment : BrowseFragment() {
@ -52,7 +52,7 @@ class LivestreamListFragment : BrowseFragment() {
binding.swipeRefreshLayout.setOnRefreshListener { binding.swipeRefreshLayout.setOnRefreshListener {
updateList() updateList()
} }
snackbar = Snackbar.make(binding.root,R.string.no_livestreams,Snackbar.LENGTH_INDEFINITE) snackbar = Snackbar.make(binding.root, R.string.no_livestreams, Snackbar.LENGTH_INDEFINITE)
.setAction(R.string.reload, View.OnClickListener { this.updateList() }) .setAction(R.string.reload, View.OnClickListener { this.updateList() })
return binding.root return binding.root
} }
@ -69,11 +69,11 @@ class LivestreamListFragment : BrowseFragment() {
// binding.swipeRefreshLayout.isRefreshing = true // binding.swipeRefreshLayout.isRefreshing = true
// }, 500) // }, 500)
binding.swipeRefreshLayout.isRefreshing = true binding.swipeRefreshLayout.isRefreshing = true
Log.d(TAG,"Refresh starting") Log.d(TAG, "Refresh starting")
viewModel.getLivestreams().observe(this, Observer { viewModel.getLivestreams().observe(this, Observer {
it?.let { adapter.setContent(it) } it?.let { adapter.setContent(it) }
binding.swipeRefreshLayout.isRefreshing = false binding.swipeRefreshLayout.isRefreshing = false
if(it?.size == 0 && !snackbar.isShown){ if (it?.size == 0 && !snackbar.isShown) {
snackbar.show() snackbar.show()
} else { } else {
snackbar.dismiss() snackbar.dismiss()

View file

@ -9,7 +9,7 @@ import android.net.Uri
import android.os.Bundle import android.os.Bundle
import android.support.v4.app.ActivityCompat import android.support.v4.app.ActivityCompat
import android.support.v7.app.AppCompatActivity import android.support.v7.app.AppCompatActivity
import de.nicidienase.chaosflix.R import de.nicidienase.chaosflix.touch.R
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentRecording import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentRecording
import de.nicidienase.chaosflix.common.viewmodel.DetailsViewModel import de.nicidienase.chaosflix.common.viewmodel.DetailsViewModel

View file

@ -22,13 +22,13 @@ import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import com.squareup.picasso.Callback import com.squareup.picasso.Callback
import com.squareup.picasso.Picasso import com.squareup.picasso.Picasso
import de.nicidienase.chaosflix.R import de.nicidienase.chaosflix.touch.R
import de.nicidienase.chaosflix.common.ChaosflixUtil import de.nicidienase.chaosflix.common.ChaosflixUtil
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentRecording import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentRecording
import de.nicidienase.chaosflix.common.userdata.entities.watchlist.WatchlistItem import de.nicidienase.chaosflix.common.userdata.entities.watchlist.WatchlistItem
import de.nicidienase.chaosflix.common.viewmodel.DetailsViewModel import de.nicidienase.chaosflix.common.viewmodel.DetailsViewModel
import de.nicidienase.chaosflix.databinding.FragmentEventDetailsBinding import de.nicidienase.chaosflix.touch.databinding.FragmentEventDetailsBinding
import de.nicidienase.chaosflix.touch.OnEventSelectedListener import de.nicidienase.chaosflix.touch.OnEventSelectedListener
import de.nicidienase.chaosflix.common.viewmodel.ViewModelFactory import de.nicidienase.chaosflix.common.viewmodel.ViewModelFactory
import de.nicidienase.chaosflix.touch.browse.adapters.EventRecyclerViewAdapter import de.nicidienase.chaosflix.touch.browse.adapters.EventRecyclerViewAdapter

View file

@ -1,6 +1,6 @@
package de.nicidienase.chaosflix.touch.eventdetails package de.nicidienase.chaosflix.touch.eventdetails
import de.nicidienase.chaosflix.R import de.nicidienase.chaosflix.touch.R
import de.nicidienase.chaosflix.touch.OnEventSelectedListener import de.nicidienase.chaosflix.touch.OnEventSelectedListener
import de.nicidienase.chaosflix.touch.browse.adapters.EventRecyclerViewAdapter import de.nicidienase.chaosflix.touch.browse.adapters.EventRecyclerViewAdapter

View file

@ -46,9 +46,9 @@ import com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory;
import com.google.android.exoplayer2.upstream.HttpDataSource; import com.google.android.exoplayer2.upstream.HttpDataSource;
import com.google.android.exoplayer2.util.Util; import com.google.android.exoplayer2.util.Util;
import de.nicidienase.chaosflix.R; import de.nicidienase.chaosflix.touch.R;
import de.nicidienase.chaosflix.common.viewmodel.PlayerViewModel; import de.nicidienase.chaosflix.common.viewmodel.PlayerViewModel;
import de.nicidienase.chaosflix.databinding.FragmentExoPlayerBinding; import de.nicidienase.chaosflix.touch.databinding.FragmentExoPlayerBinding;
import de.nicidienase.chaosflix.common.viewmodel.ViewModelFactory; import de.nicidienase.chaosflix.common.viewmodel.ViewModelFactory;
public class ExoPlayerFragment extends Fragment implements PlayerEventListener.PlayerStateChangeListener { public class ExoPlayerFragment extends Fragment implements PlayerEventListener.PlayerStateChangeListener {

View file

@ -5,7 +5,7 @@ import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.support.v7.app.AppCompatActivity import android.support.v7.app.AppCompatActivity
import android.view.MenuItem import android.view.MenuItem
import de.nicidienase.chaosflix.R import de.nicidienase.chaosflix.touch.R
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentRecording import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentRecording
import de.nicidienase.chaosflix.common.mediadata.entities.streaming.StreamUrl import de.nicidienase.chaosflix.common.mediadata.entities.streaming.StreamUrl

View file

@ -3,8 +3,8 @@ package de.nicidienase.chaosflix.touch.settings
import android.databinding.DataBindingUtil import android.databinding.DataBindingUtil
import android.os.Bundle import android.os.Bundle
import android.support.v7.app.AppCompatActivity import android.support.v7.app.AppCompatActivity
import de.nicidienase.chaosflix.R import de.nicidienase.chaosflix.touch.R
import de.nicidienase.chaosflix.databinding.ActivitySettingsBinding import de.nicidienase.chaosflix.touch.databinding.ActivitySettingsBinding
class SettingsActivity: AppCompatActivity(){ class SettingsActivity: AppCompatActivity(){
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {