mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
show event title at the grid
This commit is contained in:
@@ -32,7 +32,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'com.simplemobiletools:commons:2.4.1'
|
compile 'com.simplemobiletools:commons:2.4.2'
|
||||||
compile 'joda-time:joda-time:2.9.1'
|
compile 'joda-time:joda-time:2.9.1'
|
||||||
compile 'com.facebook.stetho:stetho:1.4.1'
|
compile 'com.facebook.stetho:stetho:1.4.1'
|
||||||
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
||||||
|
@@ -92,7 +92,6 @@ class WeekFragment : Fragment(), WeeklyCalendar {
|
|||||||
(0..6).map { getColumnWithId(it) }
|
(0..6).map { getColumnWithId(it) }
|
||||||
.forEach { activity.runOnUiThread { it.removeAllViews() } }
|
.forEach { activity.runOnUiThread { it.removeAllViews() } }
|
||||||
|
|
||||||
|
|
||||||
val sorted = events.sortedWith(compareBy({ it.startTS }, { it.endTS }, { it.title }, { it.description }))
|
val sorted = events.sortedWith(compareBy({ it.startTS }, { it.endTS }, { it.title }, { it.description }))
|
||||||
for (event in sorted) {
|
for (event in sorted) {
|
||||||
val startDateTime = Formatter.getDateTimeFromTS(event.startTS)
|
val startDateTime = Formatter.getDateTimeFromTS(event.startTS)
|
||||||
@@ -103,8 +102,9 @@ class WeekFragment : Fragment(), WeeklyCalendar {
|
|||||||
val startMinutes = startDateTime.minuteOfDay
|
val startMinutes = startDateTime.minuteOfDay
|
||||||
val duration = endDateTime.minuteOfDay - startMinutes
|
val duration = endDateTime.minuteOfDay - startMinutes
|
||||||
|
|
||||||
LayoutInflater.from(context).inflate(R.layout.week_event_marker, null, false).apply {
|
(LayoutInflater.from(context).inflate(R.layout.week_event_marker, null, false) as TextView).apply {
|
||||||
background = ColorDrawable(eventColor)
|
background = ColorDrawable(eventColor)
|
||||||
|
text = event.title
|
||||||
activity.runOnUiThread {
|
activity.runOnUiThread {
|
||||||
layout.addView(this)
|
layout.addView(this)
|
||||||
(layoutParams as RelativeLayout.LayoutParams).apply {
|
(layoutParams as RelativeLayout.LayoutParams).apply {
|
||||||
|
@@ -2,4 +2,10 @@
|
|||||||
<TextView
|
<TextView
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="2"
|
||||||
|
android:paddingLeft="@dimen/tiny_margin"
|
||||||
|
android:paddingRight="@dimen/tiny_margin"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="@dimen/small_text_size"/>
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<dimen name="weekly_view_row_minus_one_height">59dp</dimen>
|
<dimen name="weekly_view_row_minus_one_height">59dp</dimen>
|
||||||
<dimen name="weekly_view_events_height">1440dp</dimen> <!-- weekly_view_row_height * 24 hours -->
|
<dimen name="weekly_view_events_height">1440dp</dimen> <!-- weekly_view_row_height * 24 hours -->
|
||||||
<dimen name="weekly_view_day_letters_height">40dp</dimen>
|
<dimen name="weekly_view_day_letters_height">40dp</dimen>
|
||||||
<dimen name="weekly_view_minimal_event_height">10dp</dimen>
|
<dimen name="weekly_view_minimal_event_height">20dp</dimen>
|
||||||
|
|
||||||
<dimen name="min_widget_width">250dp</dimen>
|
<dimen name="min_widget_width">250dp</dimen>
|
||||||
<dimen name="min_widget_height">250dp</dimen>
|
<dimen name="min_widget_height">250dp</dimen>
|
||||||
|
Reference in New Issue
Block a user