mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-27 06:30:29 +00:00
formatting and reenable toolbar in player
This commit is contained in:
parent
f4efbdd4ae
commit
209854bddd
5 changed files with 19 additions and 20 deletions
|
@ -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))
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -201,6 +201,5 @@ class SettingsFragment : PreferenceFragmentCompat(), SharedPreferences.OnSharedP
|
||||||
fragment.arguments = args
|
fragment.arguments = args
|
||||||
return fragment
|
return fragment
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue