forked from github/szkolny
[UI] Add legend in event details dialog.
This commit is contained in:
parent
ec765c9070
commit
db598af28a
@ -104,6 +104,12 @@ class EventDetailsDialog(
|
|||||||
}
|
}
|
||||||
catch (_: Exception) {}
|
catch (_: Exception) {}
|
||||||
|
|
||||||
|
b.legend.text = listOfNotNull(
|
||||||
|
if (event.addedManually) R.string.legend_event_added_manually else null,
|
||||||
|
if (event.isDone) R.string.legend_event_is_done else null
|
||||||
|
).map { activity.getString(it) }.join("\n")
|
||||||
|
b.legend.isVisible = b.legend.text.isNotBlank()
|
||||||
|
|
||||||
b.typeColor.background?.setTintColor(event.eventColor)
|
b.typeColor.background?.setTintColor(event.eventColor)
|
||||||
|
|
||||||
b.details = mutableListOf(
|
b.details = mutableListOf(
|
||||||
|
@ -105,9 +105,23 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<com.mikepenz.iconics.view.IconicsTextView
|
||||||
|
android:id="@+id/legend"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="@style/NavView.TextView.Helper"
|
||||||
|
tools:text="[!] wydarzenie dodane ręcznie\n[V] oznaczono jako wykonane" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:background="@drawable/divider"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
android:textAppearance="@style/NavView.TextView.Helper"
|
android:textAppearance="@style/NavView.TextView.Helper"
|
||||||
android:text="@string/dialog_event_details_teacher"
|
android:text="@string/dialog_event_details_teacher"
|
||||||
android:visibility="@{event.teacherName != null ? View.VISIBLE : View.GONE}"/>
|
android:visibility="@{event.teacherName != null ? View.VISIBLE : View.GONE}"/>
|
||||||
|
@ -1439,4 +1439,6 @@
|
|||||||
<string name="agenda_config_elearning_mark">Ustaw wydarzenia jako lekcje on-line</string>
|
<string name="agenda_config_elearning_mark">Ustaw wydarzenia jako lekcje on-line</string>
|
||||||
<string name="agenda_config_elearning_type">Wybierz rodzaj wydarzeń</string>
|
<string name="agenda_config_elearning_type">Wybierz rodzaj wydarzeń</string>
|
||||||
<string name="agenda_config_elearning_group">Grupuj lekcje on-line na liście</string>
|
<string name="agenda_config_elearning_group">Grupuj lekcje on-line na liście</string>
|
||||||
|
<string name="legend_event_added_manually">{cmd-clipboard-edit-outline} wydarzenie dodane ręcznie</string>
|
||||||
|
<string name="legend_event_is_done">{cmd-check} oznaczono jako wykonane</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user