show event title at the grid
This commit is contained in:
parent
4e82c5f4a3
commit
d7b027c492
|
@ -32,7 +32,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.simplemobiletools:commons:2.4.1'
|
||||
compile 'com.simplemobiletools:commons:2.4.2'
|
||||
compile 'joda-time:joda-time:2.9.1'
|
||||
compile 'com.facebook.stetho:stetho:1.4.1'
|
||||
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
||||
|
|
|
@ -92,7 +92,6 @@ class WeekFragment : Fragment(), WeeklyCalendar {
|
|||
(0..6).map { getColumnWithId(it) }
|
||||
.forEach { activity.runOnUiThread { it.removeAllViews() } }
|
||||
|
||||
|
||||
val sorted = events.sortedWith(compareBy({ it.startTS }, { it.endTS }, { it.title }, { it.description }))
|
||||
for (event in sorted) {
|
||||
val startDateTime = Formatter.getDateTimeFromTS(event.startTS)
|
||||
|
@ -103,8 +102,9 @@ class WeekFragment : Fragment(), WeeklyCalendar {
|
|||
val startMinutes = startDateTime.minuteOfDay
|
||||
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)
|
||||
text = event.title
|
||||
activity.runOnUiThread {
|
||||
layout.addView(this)
|
||||
(layoutParams as RelativeLayout.LayoutParams).apply {
|
||||
|
|
|
@ -2,4 +2,10 @@
|
|||
<TextView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
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_events_height">1440dp</dimen> <!-- weekly_view_row_height * 24 hours -->
|
||||
<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_height">250dp</dimen>
|
||||
|
|
Loading…
Reference in New Issue