adding some views to the stopwatch fragment

This commit is contained in:
tibbi
2018-03-07 19:56:28 +01:00
parent 75277a1fc4
commit a54fe11821
6 changed files with 73 additions and 14 deletions

View File

@ -25,8 +25,21 @@ class StopwatchFragment : Fragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
view = (inflater.inflate(R.layout.fragment_stopwatch, container, false) as ViewGroup).apply {
stopwatch_time.setOnClickListener { togglePlayPause() }
stopwatch_play_pause.setOnClickListener { togglePlayPause() }
stopwatch_time.setOnClickListener {
togglePlayPause()
}
stopwatch_play_pause.setOnClickListener {
togglePlayPause()
}
stopwatch_reset.setOnClickListener {
}
stopwatch_lap.setOnClickListener {
}
}
return view
}
@ -45,8 +58,8 @@ class StopwatchFragment : Fragment() {
context!!.apply {
updateTextColors(view.stopwatch_fragment)
view.stopwatch_play_pause.background = resources.getColoredDrawableWithColor(R.drawable.circle_background_filled, getAdjustedPrimaryColor())
updatePlayPauseIcon()
}
updatePlayPauseIcon()
}
private fun updatePlayPauseIcon() {