formatting and reenable toolbar in player

This commit is contained in:
Felix 2020-04-17 18:20:25 +02:00
parent f4efbdd4ae
commit 209854bddd
5 changed files with 19 additions and 20 deletions

View file

@ -43,7 +43,6 @@ class AboutFragment : Fragment() {
} }
} }
val version = "${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})" val version = "${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})"
val versionElement = Element() val versionElement = Element()
var clickCounter = 0 var clickCounter = 0
@ -59,7 +58,6 @@ class AboutFragment : Fragment() {
} }
} }
return AboutPage(requireContext()) return AboutPage(requireContext())
.setImage(R.drawable.icon_primary_background) .setImage(R.drawable.icon_primary_background)
.setDescription(resources.getString(R.string.about_description)) .setDescription(resources.getString(R.string.about_description))

View file

@ -9,6 +9,8 @@ import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.view.WindowManager import android.view.WindowManager
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.Toolbar
import androidx.databinding.DataBindingUtil import androidx.databinding.DataBindingUtil
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import androidx.lifecycle.Observer import androidx.lifecycle.Observer
@ -66,15 +68,15 @@ class ExoPlayerFragment : Fragment(), PlayerStateChangeListener {
val binding: FragmentExoPlayerBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_exo_player, container, false) val binding: FragmentExoPlayerBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_exo_player, container, false)
viewModel = ViewModelProvider(this, ViewModelFactory.getInstance(requireContext())).get(PlayerViewModel::class.java) viewModel = ViewModelProvider(this, ViewModelFactory.getInstance(requireContext())).get(PlayerViewModel::class.java)
viewModel.setEvent(args.playbackItem.eventGuid) viewModel.setEvent(args.playbackItem.eventGuid)
// val toolbar: Toolbar = binding.getRoot().findViewById(R.id.toolbar) val toolbar: Toolbar = binding.root.findViewById(R.id.toolbar)
// toolbar.title = args.playbackItem.title toolbar.title = args.playbackItem.title
// toolbar.subtitle = args.playbackItem.subtitle toolbar.subtitle = args.playbackItem.subtitle
// val activity = activity as AppCompatActivity? val activity = activity as AppCompatActivity?
// if (activity != null) { if (activity != null) {
// activity.setSupportActionBar(toolbar) activity.setSupportActionBar(toolbar)
// val actionBar = activity.supportActionBar val actionBar = activity.supportActionBar
// actionBar?.setDisplayHomeAsUpEnabled(true) actionBar?.setDisplayHomeAsUpEnabled(true)
// } }
this.binding = binding this.binding = binding
return binding.root return binding.root
} }

View file

@ -201,6 +201,5 @@ class SettingsFragment : PreferenceFragmentCompat(), SharedPreferences.OnSharedP
fragment.arguments = args fragment.arguments = args
return fragment return fragment
} }
} }
} }