rename event item on day view and add End ellipsize
This commit is contained in:
parent
b00e6ed9b3
commit
521bcdc528
|
@ -12,7 +12,7 @@ import com.simplemobiletools.calendar.extensions.config
|
|||
import com.simplemobiletools.calendar.helpers.Formatter
|
||||
import com.simplemobiletools.calendar.models.Event
|
||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||
import kotlinx.android.synthetic.main.event_item.view.*
|
||||
import kotlinx.android.synthetic.main.event_item_day_view.view.*
|
||||
import java.util.*
|
||||
|
||||
class DayEventsAdapter(val activity: SimpleActivity, val mItems: List<Event>, val listener: ItemOperationsListener?, val itemClick: (Event) -> Unit) :
|
||||
|
@ -81,7 +81,7 @@ class DayEventsAdapter(val activity: SimpleActivity, val mItems: List<Event>, va
|
|||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): ViewHolder {
|
||||
val view = LayoutInflater.from(parent?.context).inflate(R.layout.event_item, parent, false)
|
||||
val view = LayoutInflater.from(parent?.context).inflate(R.layout.event_item_day_view, parent, false)
|
||||
return ViewHolder(activity, view, itemClick)
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import com.simplemobiletools.calendar.models.ListEvent
|
|||
import com.simplemobiletools.calendar.models.ListItem
|
||||
import com.simplemobiletools.calendar.models.ListSection
|
||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||
import kotlinx.android.synthetic.main.event_item.view.*
|
||||
import kotlinx.android.synthetic.main.event_item_day_view.view.*
|
||||
import java.util.*
|
||||
|
||||
class EventListAdapter(val activity: SimpleActivity, val mItems: List<ListItem>, val listener: EventListAdapter.ItemOperationsListener?, val itemClick: (Int) -> Unit) :
|
||||
|
|
|
@ -12,7 +12,7 @@ import com.simplemobiletools.calendar.helpers.Formatter
|
|||
import com.simplemobiletools.calendar.models.ListEvent
|
||||
import com.simplemobiletools.calendar.models.ListItem
|
||||
import com.simplemobiletools.calendar.models.ListSection
|
||||
import kotlinx.android.synthetic.main.event_item.view.*
|
||||
import kotlinx.android.synthetic.main.event_item_day_view.view.*
|
||||
|
||||
class EventListWidgetAdapterOld(val context: Context, val mEvents: List<ListItem>) : BaseAdapter() {
|
||||
val ITEM_EVENT = 0
|
||||
|
|
|
@ -35,7 +35,9 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/activity_margin"
|
||||
android:layout_toRightOf="@+id/event_item_start"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:paddingRight="@dimen/activity_margin"
|
||||
android:text="Event title"
|
||||
android:textSize="@dimen/day_text_size"/>
|
||||
|
||||
|
@ -47,7 +49,9 @@
|
|||
android:layout_marginLeft="@dimen/activity_margin"
|
||||
android:layout_toRightOf="@+id/event_item_start"
|
||||
android:alpha=".4"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:paddingRight="@dimen/activity_margin"
|
||||
android:text="Event description"
|
||||
android:textSize="@dimen/day_text_size"/>
|
||||
|
Loading…
Reference in New Issue