Compare commits
1 Commits
f8bd760f7a
...
c52a74c7e3
| Author | SHA1 | Date | |
|---|---|---|---|
| c52a74c7e3 |
@@ -78,7 +78,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
progressIndicator = findViewById(R.id.progress_indicator)
|
progressIndicator = findViewById(R.id.progress_indicator)
|
||||||
buttonsContainer = findViewById(R.id.buttons_container)
|
buttonsContainer = findViewById(R.id.buttons_container)
|
||||||
recyclerView = findViewById(R.id.list_events)
|
recyclerView = findViewById(R.id.list_events)
|
||||||
recyclerView.setLayoutManager(LinearLayoutManager(applicationContext))
|
recyclerView.setLayoutManager(LinearLayoutManager(this))
|
||||||
|
|
||||||
// Set listeners
|
// Set listeners
|
||||||
findViewById<View>(R.id.logbooks_add_button).setOnClickListener {
|
findViewById<View>(R.id.logbooks_add_button).setOnClickListener {
|
||||||
@@ -637,8 +637,8 @@ class MainActivity : AppCompatActivity() {
|
|||||||
val previousTextView = dialogView.findViewById<TextView>(R.id.dialog_event_previous)
|
val previousTextView = dialogView.findViewById<TextView>(R.id.dialog_event_previous)
|
||||||
val previousEvent = getPreviousSameEvent(event, allEvents)
|
val previousEvent = getPreviousSameEvent(event, allEvents)
|
||||||
if (previousEvent != null) {
|
if (previousEvent != null) {
|
||||||
val emoji = previousEvent.getTypeEmoji(applicationContext)
|
val emoji = previousEvent.getTypeEmoji(this)
|
||||||
val time = DateUtils.formatTimeDuration(applicationContext, event.time - previousEvent.time)
|
val time = DateUtils.formatTimeDuration(this, event.time - previousEvent.time)
|
||||||
previousTextView.text = String.format("⬅️ %s %s", emoji, time)
|
previousTextView.text = String.format("⬅️ %s %s", emoji, time)
|
||||||
previousTextView.setOnClickListener {
|
previousTextView.setOnClickListener {
|
||||||
alertDialog.cancel()
|
alertDialog.cancel()
|
||||||
@@ -652,8 +652,8 @@ class MainActivity : AppCompatActivity() {
|
|||||||
val nextTextView = dialogView.findViewById<TextView>(R.id.dialog_event_next)
|
val nextTextView = dialogView.findViewById<TextView>(R.id.dialog_event_next)
|
||||||
val nextEvent = getNextSameEvent(event, allEvents)
|
val nextEvent = getNextSameEvent(event, allEvents)
|
||||||
if (nextEvent != null) {
|
if (nextEvent != null) {
|
||||||
val emoji = nextEvent.getTypeEmoji(applicationContext)
|
val emoji = nextEvent.getTypeEmoji(this)
|
||||||
val time = DateUtils.formatTimeDuration(applicationContext, nextEvent.time - event.time)
|
val time = DateUtils.formatTimeDuration(this, nextEvent.time - event.time)
|
||||||
nextTextView.text = String.format("%s %s ➡️", time, emoji)
|
nextTextView.text = String.format("%s %s ➡️", time, emoji)
|
||||||
nextTextView.setOnClickListener {
|
nextTextView.setOnClickListener {
|
||||||
alertDialog.cancel()
|
alertDialog.cancel()
|
||||||
|
|||||||
Reference in New Issue
Block a user