mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-22 12:23:06 +00:00
fix DexMergerException caused by duplicate databinding-classes
This commit is contained in:
parent
897f1f35e4
commit
216415249a
40 changed files with 94 additions and 104 deletions
|
@ -1,4 +1,4 @@
|
|||
package de.nicidienase.chaosflix.touch
|
||||
package de.nicidienase.chaosflix
|
||||
|
||||
import android.app.Application
|
||||
import android.content.Context
|
|
@ -0,0 +1,5 @@
|
|||
package de.nicidienase.chaosflix
|
||||
|
||||
import android.app.Application
|
||||
|
||||
class ChaosflixApplication : Application() {}
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
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
|
||||
|
|
|
@ -13,7 +13,7 @@ android {
|
|||
// odd for touch, even for leanback
|
||||
versionCode 12
|
||||
versionName "0.3"
|
||||
multiDexEnabled true
|
||||
// multiDexEnabled true
|
||||
}
|
||||
buildTypes {
|
||||
debug {
|
||||
|
@ -49,6 +49,7 @@ android {
|
|||
dataBinding {
|
||||
enabled = true
|
||||
}
|
||||
buildToolsVersion rootProject.ext.buildToolsVersion
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?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">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
@ -16,10 +16,10 @@
|
|||
android:icon="@drawable/icon_notext_144x144"
|
||||
android:label="@string/app_name"
|
||||
android:supportsRtl="true"
|
||||
android:name=".touch.ChaosflixApplication"
|
||||
android:name="de.nicidienase.chaosflix.ChaosflixApplication"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name=".leanback.activities.ConferencesActivity"
|
||||
android:name=".activities.ConferencesActivity"
|
||||
android:banner="@drawable/banner"
|
||||
android:icon="@drawable/icon"
|
||||
android:label="@string/app_name"
|
||||
|
@ -31,9 +31,9 @@
|
|||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:name=".leanback.activities.EventsActivity"
|
||||
<activity android:name=".activities.EventsActivity"
|
||||
android:exported="true"/>
|
||||
<activity android:name=".leanback.activities.DetailsActivity"
|
||||
<activity android:name=".activities.DetailsActivity"
|
||||
android:exported="true"/>
|
||||
</application>
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ import android.widget.ImageView;
|
|||
import com.bumptech.glide.Glide;
|
||||
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.PersistentEvent;
|
||||
import de.nicidienase.chaosflix.common.mediadata.entities.streaming.LiveConference;
|
||||
|
|
|
@ -9,7 +9,7 @@ import android.view.View
|
|||
import android.view.ViewGroup
|
||||
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent
|
||||
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() {
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import android.view.ViewGroup;
|
|||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import de.nicidienase.chaosflix.R;
|
||||
import de.nicidienase.chaosflix.leanback.R;
|
||||
|
||||
/**
|
||||
* Created by felix on 16.04.17.
|
||||
|
|
|
@ -2,7 +2,7 @@ package de.nicidienase.chaosflix.leanback.activities
|
|||
|
||||
import android.os.Bundle
|
||||
import android.support.v4.app.FragmentActivity
|
||||
import de.nicidienase.chaosflix.R
|
||||
import de.nicidienase.chaosflix.leanback.R
|
||||
|
||||
class ConferencesActivity : FragmentActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
|
|
|
@ -7,9 +7,9 @@ import android.support.v4.app.FragmentActivity
|
|||
import android.support.v7.app.AppCompatActivity
|
||||
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.streaming.Room
|
||||
import de.nicidienase.chaosflix.leanback.R
|
||||
|
||||
/*
|
||||
* Details activity class that loads LeanbackDetailsFragment class
|
||||
|
|
|
@ -4,8 +4,8 @@ import android.content.Context
|
|||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
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.leanback.R
|
||||
|
||||
class EventsActivity : FragmentActivity() {
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import android.view.ViewGroup;
|
|||
import android.widget.FrameLayout;
|
||||
import android.widget.ProgressBar;
|
||||
|
||||
import de.nicidienase.chaosflix.R;
|
||||
import de.nicidienase.chaosflix.leanback.R;
|
||||
|
||||
public class BrowseErrorFragment extends ErrorSupportFragment {
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
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.PersistentConference;
|
||||
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentEvent;
|
||||
|
|
|
@ -6,7 +6,7 @@ import android.support.v17.leanback.app.VerticalGridSupportFragment;
|
|||
import android.support.v17.leanback.widget.ArrayObjectAdapter;
|
||||
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.ItemViewClickedListener;
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ import com.google.android.exoplayer2.upstream.DefaultHttpDataSource
|
|||
import com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory
|
||||
import com.google.android.exoplayer2.upstream.HttpDataSource
|
||||
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.mediadata.entities.recording.persistence.PersistentEvent
|
||||
import de.nicidienase.chaosflix.common.mediadata.entities.streaming.Room
|
||||
|
|
|
@ -23,7 +23,6 @@ import com.bumptech.glide.Glide
|
|||
import com.bumptech.glide.request.RequestOptions
|
||||
import com.bumptech.glide.request.target.SimpleTarget
|
||||
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.PersistentEvent
|
||||
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.leanback.CardPresenter
|
||||
import de.nicidienase.chaosflix.leanback.ItemViewClickedListener
|
||||
import de.nicidienase.chaosflix.leanback.R
|
||||
import de.nicidienase.chaosflix.leanback.activities.EventsActivity
|
||||
import java.net.URI
|
||||
import java.net.URISyntaxException
|
||||
|
|
|
@ -13,7 +13,7 @@ android {
|
|||
// odd for touch, even for leanback
|
||||
versionCode 27
|
||||
versionName "0.3.0"
|
||||
multiDexEnabled true
|
||||
// multiDexEnabled true
|
||||
}
|
||||
buildTypes {
|
||||
debug {
|
||||
|
@ -76,7 +76,7 @@ dependencies {
|
|||
implementation 'net.opacapp:multiline-collapsingtoolbar:27.1.0'
|
||||
implementation 'net.rdrei.android.dirchooser:library:3.2@aar'
|
||||
// implementation 'com.gu:option:1.3'
|
||||
|
||||
implementation 'com.github.guardian:Option:-SNAPSHOT'
|
||||
|
||||
testImplementation 'org.mockito:mockito-core:2.11.0'
|
||||
androidTestImplementation('com.android.support.test:rules:0.5') {
|
||||
|
@ -90,16 +90,4 @@ dependencies {
|
|||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
}
|
||||
}
|
||||
|
||||
//repositories {
|
||||
// mavenCentral()
|
||||
// maven { url 'http://guardian.github.com/maven/repo-releases' }
|
||||
// mavenLocal()
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="de.nicidienase.chaosflix"
|
||||
package="de.nicidienase.chaosflix.touch"
|
||||
tools:ignore="MissingLeanbackLauncher">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
@ -11,7 +11,7 @@
|
|||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||
|
||||
<application
|
||||
android:name=".touch.ChaosflixApplication"
|
||||
android:name="de.nicidienase.chaosflix.ChaosflixApplication"
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/icon_notext"
|
||||
android:label="@string/app_name"
|
||||
|
@ -19,7 +19,7 @@
|
|||
android:theme="@style/AppTheme"
|
||||
tools:replace="android:theme">
|
||||
<activity
|
||||
android:name=".touch.SplashActivity"
|
||||
android:name=".SplashActivity"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/SplashTheme">
|
||||
<intent-filter>
|
||||
|
@ -27,38 +27,38 @@
|
|||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".touch.browse.BrowseActivity">
|
||||
<activity android:name=".browse.BrowseActivity">
|
||||
<meta-data
|
||||
android:name="android.app.searchable"
|
||||
android:resource="@xml/searchable"/>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".touch.browse.eventslist.EventsListActivity"
|
||||
android:parentActivityName=".touch.browse.BrowseActivity"/>
|
||||
android:name=".browse.eventslist.EventsListActivity"
|
||||
android:parentActivityName=".browse.BrowseActivity"/>
|
||||
|
||||
<activity
|
||||
android:name=".touch.eventdetails.EventDetailsActivity"
|
||||
android:name=".eventdetails.EventDetailsActivity"
|
||||
android:parentActivityName="de.nicidienase.chaosflix.touch.browse.eventslist.EventsListActivity"/>
|
||||
|
||||
<activity
|
||||
android:name=".touch.about.AboutActivity"
|
||||
android:parentActivityName=".touch.browse.BrowseActivity"/>
|
||||
android:name=".about.AboutActivity"
|
||||
android:parentActivityName=".browse.BrowseActivity"/>
|
||||
|
||||
<activity
|
||||
android:name=".touch.playback.PlayerActivity"
|
||||
android:name=".playback.PlayerActivity"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
|
||||
android:launchMode="singleTop"
|
||||
android:parentActivityName=".touch.eventdetails.EventDetailsActivity"/>
|
||||
android:parentActivityName=".eventdetails.EventDetailsActivity"/>
|
||||
|
||||
<activity
|
||||
android:name=".touch.settings.SettingsActivity"
|
||||
android:parentActivityName=".touch.browse.BrowseActivity"/>
|
||||
android:name=".settings.SettingsActivity"
|
||||
android:parentActivityName=".browse.BrowseActivity"/>
|
||||
|
||||
<activity android:name="net.rdrei.android.dirchooser.DirectoryChooserActivity" />
|
||||
|
||||
<service
|
||||
android:name=".touch.sync.DownloadJobService"
|
||||
android:name="de.nicidienase.chaosflix.common.mediadata.sync.DownloadJobService"
|
||||
android:permission="android.permission.BIND_JOB_SERVICE"/>
|
||||
|
||||
</application>
|
||||
|
|
|
@ -6,7 +6,7 @@ import android.view.animation.Animation
|
|||
import android.view.animation.LinearInterpolator
|
||||
import android.view.animation.RotateAnimation
|
||||
import android.widget.ImageView
|
||||
import de.nicidienase.chaosflix.R
|
||||
import de.nicidienase.chaosflix.touch.R
|
||||
|
||||
class ChaosflixLoadingSpinner(context: Context, attributeSet: AttributeSet) : ImageView(context, attributeSet) {
|
||||
init {
|
||||
|
|
|
@ -5,8 +5,8 @@ import android.databinding.DataBindingUtil
|
|||
import android.os.Bundle
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.view.View
|
||||
import de.nicidienase.chaosflix.R
|
||||
import de.nicidienase.chaosflix.databinding.ActivityAboutBinding
|
||||
import de.nicidienase.chaosflix.touch.R
|
||||
import de.nicidienase.chaosflix.touch.databinding.ActivityAboutBinding
|
||||
import mehdi.sakout.aboutpage.AboutPage
|
||||
import mehdi.sakout.aboutpage.Element
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import android.view.View
|
|||
import android.view.ViewGroup
|
||||
import com.mikepenz.aboutlibraries.LibsBuilder
|
||||
import com.mikepenz.aboutlibraries.ui.LibsSupportFragment
|
||||
import de.nicidienase.chaosflix.R
|
||||
import de.nicidienase.chaosflix.touch.R
|
||||
|
||||
class LibsFragment: DialogFragment(){
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
|
|
|
@ -7,7 +7,6 @@ import android.content.res.Configuration
|
|||
import android.databinding.DataBindingUtil
|
||||
import android.os.Bundle
|
||||
import android.os.PersistableBundle
|
||||
import android.preference.PreferenceManager
|
||||
import android.support.design.widget.NavigationView
|
||||
import android.support.design.widget.Snackbar
|
||||
import android.support.v4.app.Fragment
|
||||
|
@ -20,15 +19,14 @@ import android.transition.TransitionInflater
|
|||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
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.PersistentEvent
|
||||
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.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.browse.download.DownloadsListFragment
|
||||
import de.nicidienase.chaosflix.touch.browse.eventslist.EventsListActivity
|
||||
|
@ -145,7 +143,7 @@ class BrowseActivity : AppCompatActivity(),
|
|||
playStream(streamingItem.conference.conference,
|
||||
streamingItem.room.display,
|
||||
dashStreams.first().urls["dash"]
|
||||
)
|
||||
)
|
||||
} else {
|
||||
streamingItem.room.streams.flatMap { stream ->
|
||||
stream.urls.map { entry ->
|
||||
|
@ -244,8 +242,8 @@ class BrowseActivity : AppCompatActivity(),
|
|||
}
|
||||
|
||||
companion object {
|
||||
fun launch(context: Context){
|
||||
context.startActivity(Intent(context,BrowseActivity::class.java))
|
||||
fun launch(context: Context) {
|
||||
context.startActivity(Intent(context, BrowseActivity::class.java))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import android.view.LayoutInflater;
|
|||
import android.view.View;
|
||||
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.touch.browse.adapters.ConferenceRecyclerViewAdapter;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import org.jetbrains.annotations.NotNull;
|
|||
|
||||
import de.nicidienase.chaosflix.R;
|
||||
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;
|
||||
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import android.util.Log;
|
|||
import java.util.ArrayList;
|
||||
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.touch.browse.ConferenceGroupFragment;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package de.nicidienase.chaosflix.touch.browse.adapters
|
||||
|
||||
import com.squareup.picasso.Picasso
|
||||
import de.nicidienase.chaosflix.R
|
||||
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentConference
|
||||
import de.nicidienase.chaosflix.touch.R
|
||||
import de.nicidienase.chaosflix.touch.browse.ConferencesTabBrowseFragment
|
||||
import java.util.*
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package de.nicidienase.chaosflix.touch.browse.adapters
|
|||
import android.support.v4.view.ViewCompat
|
||||
import android.view.View
|
||||
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.touch.OnEventSelectedListener
|
||||
import java.util.*
|
||||
|
|
|
@ -8,7 +8,7 @@ import android.widget.Filter
|
|||
import android.widget.Filterable
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import de.nicidienase.chaosflix.R
|
||||
import de.nicidienase.chaosflix.touch.R
|
||||
import java.util.*
|
||||
|
||||
abstract class ItemRecyclerViewAdapter<T>()
|
||||
|
|
|
@ -9,11 +9,10 @@ import android.support.v7.widget.LinearLayoutManager
|
|||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
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.R
|
||||
import de.nicidienase.chaosflix.touch.browse.BrowseFragment
|
||||
import de.nicidienase.chaosflix.touch.databinding.FragmentDownloadsBinding
|
||||
|
||||
class DownloadsListFragment : BrowseFragment() {
|
||||
|
||||
|
@ -51,7 +50,7 @@ class DownloadsListFragment : BrowseFragment() {
|
|||
binding.list.layoutManager = GridLayoutManager(context, columnCount - 1)
|
||||
}
|
||||
viewModel.getOfflineEvents().observe(this, Observer { events ->
|
||||
if(events != null){
|
||||
if (events != null) {
|
||||
offlineEventAdapter.items = events
|
||||
offlineEventAdapter.notifyDataSetChanged()
|
||||
setLoadingOverlayVisibility(false)
|
||||
|
@ -64,7 +63,7 @@ class DownloadsListFragment : BrowseFragment() {
|
|||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
updateRunnable = object: Runnable {
|
||||
updateRunnable = object : Runnable {
|
||||
override fun run() {
|
||||
viewModel.updateDownloadStatus()
|
||||
handler.postDelayed(this, UPDATE_DELAY)
|
||||
|
@ -86,7 +85,7 @@ class DownloadsListFragment : BrowseFragment() {
|
|||
companion object {
|
||||
private val ARG_COLUMN_COUNT = "column_count"
|
||||
|
||||
fun getInstance(columnCount: Int = 1): DownloadsListFragment{
|
||||
fun getInstance(columnCount: Int = 1): DownloadsListFragment {
|
||||
val fragment = DownloadsListFragment()
|
||||
val args = Bundle()
|
||||
args.putInt(ARG_COLUMN_COUNT, columnCount)
|
||||
|
@ -95,6 +94,6 @@ class DownloadsListFragment : BrowseFragment() {
|
|||
}
|
||||
}
|
||||
|
||||
interface InteractionListener: OnEventSelectedListener {
|
||||
interface InteractionListener : OnEventSelectedListener {
|
||||
}
|
||||
}
|
|
@ -6,10 +6,10 @@ import android.view.LayoutInflater
|
|||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
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.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.common.viewmodel.BrowseViewModel
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import android.content.Context
|
|||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
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.PersistentEvent
|
||||
import de.nicidienase.chaosflix.touch.OnEventSelectedListener
|
||||
|
|
|
@ -3,7 +3,6 @@ package de.nicidienase.chaosflix.touch.browse.eventslist;
|
|||
import android.app.SearchManager;
|
||||
import android.arch.lifecycle.Observer;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.NonNull;
|
||||
|
@ -21,14 +20,14 @@ import android.widget.SearchView;
|
|||
|
||||
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.PersistentEvent;
|
||||
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.browse.BrowseFragment;
|
||||
import de.nicidienase.chaosflix.touch.browse.adapters.EventRecyclerViewAdapter;
|
||||
import de.nicidienase.chaosflix.touch.databinding.FragmentEventsListBinding;
|
||||
|
||||
public class EventsListFragment extends BrowseFragment implements SearchView.OnQueryTextListener {
|
||||
|
||||
|
@ -42,15 +41,15 @@ public class EventsListFragment extends BrowseFragment implements SearchView.OnQ
|
|||
public static final int TYPE_BOOKMARKS = 1;
|
||||
public static final int TYPE_IN_PROGRESS = 2;
|
||||
|
||||
private int columnCount = 1;
|
||||
private int columnCount = 1;
|
||||
private OnEventSelectedListener listener;
|
||||
|
||||
private EventRecyclerViewAdapter eventAdapter;
|
||||
private PersistentConference conference;
|
||||
private PersistentConference conference;
|
||||
|
||||
private LinearLayoutManager layoutManager;
|
||||
private Snackbar snackbar;
|
||||
private int type;
|
||||
private LinearLayoutManager layoutManager;
|
||||
private Snackbar snackbar;
|
||||
private int type;
|
||||
|
||||
public static EventsListFragment newInstance(int type, PersistentConference conference, int columnCount) {
|
||||
EventsListFragment fragment = new EventsListFragment();
|
||||
|
@ -102,7 +101,7 @@ public class EventsListFragment extends BrowseFragment implements SearchView.OnQ
|
|||
binding.list.setAdapter(eventAdapter);
|
||||
|
||||
Observer<List<PersistentEvent>> listObserver = persistentEvents -> {
|
||||
if(persistentEvents != null){
|
||||
if (persistentEvents != null) {
|
||||
setEvents(persistentEvents);
|
||||
if (persistentEvents.size() > 0) {
|
||||
setLoadingOverlayVisibility(false);
|
||||
|
@ -125,7 +124,7 @@ public class EventsListFragment extends BrowseFragment implements SearchView.OnQ
|
|||
getViewModel().getEventsforConference(conference).observe(this, listObserver);
|
||||
getViewModel().updateEventsForConference(conference).observe(this, state -> {
|
||||
Downloader.DownloaderState downloaderState = state.getState();
|
||||
switch (downloaderState){
|
||||
switch (downloaderState) {
|
||||
case RUNNING:
|
||||
setLoadingOverlayVisibility(true);
|
||||
break;
|
||||
|
@ -133,7 +132,7 @@ public class EventsListFragment extends BrowseFragment implements SearchView.OnQ
|
|||
setLoadingOverlayVisibility(false);
|
||||
break;
|
||||
}
|
||||
if(state.getError() != null){
|
||||
if (state.getError() != null) {
|
||||
showSnackbar(state.getError());
|
||||
}
|
||||
});
|
||||
|
@ -143,7 +142,7 @@ public class EventsListFragment extends BrowseFragment implements SearchView.OnQ
|
|||
}
|
||||
|
||||
private void showSnackbar(String message) {
|
||||
if(snackbar!= null){
|
||||
if (snackbar != null) {
|
||||
snackbar.dismiss();
|
||||
}
|
||||
snackbar = Snackbar.make(getView(), message, Snackbar.LENGTH_LONG);
|
||||
|
@ -174,7 +173,7 @@ public class EventsListFragment extends BrowseFragment implements SearchView.OnQ
|
|||
SearchManager searchManager = (SearchManager) getActivity().getSystemService(Context.SEARCH_SERVICE);
|
||||
|
||||
searchView.setSearchableInfo(searchManager.
|
||||
getSearchableInfo(getActivity().getComponentName()));
|
||||
getSearchableInfo(getActivity().getComponentName()));
|
||||
searchView.setSubmitButtonEnabled(true);
|
||||
searchView.setIconified(false);
|
||||
searchView.setOnQueryTextListener(this);
|
||||
|
|
|
@ -8,7 +8,7 @@ import android.view.View
|
|||
import android.view.ViewGroup
|
||||
import com.squareup.picasso.Picasso
|
||||
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>(){
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@ import android.util.Log
|
|||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import de.nicidienase.chaosflix.R
|
||||
import de.nicidienase.chaosflix.databinding.FragmentLivestreamsBinding
|
||||
import de.nicidienase.chaosflix.touch.R
|
||||
import de.nicidienase.chaosflix.touch.browse.BrowseFragment
|
||||
import de.nicidienase.chaosflix.touch.databinding.FragmentLivestreamsBinding
|
||||
|
||||
class LivestreamListFragment : BrowseFragment() {
|
||||
|
||||
|
@ -52,7 +52,7 @@ class LivestreamListFragment : BrowseFragment() {
|
|||
binding.swipeRefreshLayout.setOnRefreshListener {
|
||||
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() })
|
||||
return binding.root
|
||||
}
|
||||
|
@ -69,11 +69,11 @@ class LivestreamListFragment : BrowseFragment() {
|
|||
// binding.swipeRefreshLayout.isRefreshing = true
|
||||
// }, 500)
|
||||
binding.swipeRefreshLayout.isRefreshing = true
|
||||
Log.d(TAG,"Refresh starting")
|
||||
Log.d(TAG, "Refresh starting")
|
||||
viewModel.getLivestreams().observe(this, Observer {
|
||||
it?.let { adapter.setContent(it) }
|
||||
binding.swipeRefreshLayout.isRefreshing = false
|
||||
if(it?.size == 0 && !snackbar.isShown){
|
||||
if (it?.size == 0 && !snackbar.isShown) {
|
||||
snackbar.show()
|
||||
} else {
|
||||
snackbar.dismiss()
|
||||
|
|
|
@ -9,7 +9,7 @@ import android.net.Uri
|
|||
import android.os.Bundle
|
||||
import android.support.v4.app.ActivityCompat
|
||||
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.PersistentRecording
|
||||
import de.nicidienase.chaosflix.common.viewmodel.DetailsViewModel
|
||||
|
|
|
@ -22,13 +22,13 @@ import android.view.View
|
|||
import android.view.ViewGroup
|
||||
import com.squareup.picasso.Callback
|
||||
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.mediadata.entities.recording.persistence.PersistentEvent
|
||||
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.PersistentRecording
|
||||
import de.nicidienase.chaosflix.common.userdata.entities.watchlist.WatchlistItem
|
||||
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.common.viewmodel.ViewModelFactory
|
||||
import de.nicidienase.chaosflix.touch.browse.adapters.EventRecyclerViewAdapter
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
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.browse.adapters.EventRecyclerViewAdapter
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ import com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory;
|
|||
import com.google.android.exoplayer2.upstream.HttpDataSource;
|
||||
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.databinding.FragmentExoPlayerBinding;
|
||||
import de.nicidienase.chaosflix.touch.databinding.FragmentExoPlayerBinding;
|
||||
import de.nicidienase.chaosflix.common.viewmodel.ViewModelFactory;
|
||||
|
||||
public class ExoPlayerFragment extends Fragment implements PlayerEventListener.PlayerStateChangeListener {
|
||||
|
|
|
@ -5,7 +5,7 @@ import android.content.Intent
|
|||
import android.os.Bundle
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
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.PersistentRecording
|
||||
import de.nicidienase.chaosflix.common.mediadata.entities.streaming.StreamUrl
|
||||
|
|
|
@ -3,8 +3,8 @@ package de.nicidienase.chaosflix.touch.settings
|
|||
import android.databinding.DataBindingUtil
|
||||
import android.os.Bundle
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import de.nicidienase.chaosflix.R
|
||||
import de.nicidienase.chaosflix.databinding.ActivitySettingsBinding
|
||||
import de.nicidienase.chaosflix.touch.R
|
||||
import de.nicidienase.chaosflix.touch.databinding.ActivitySettingsBinding
|
||||
|
||||
class SettingsActivity: AppCompatActivity(){
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
|
|
Loading…
Reference in a new issue