mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-17 20:30:58 +01:00
correcting some view IDs
This commit is contained in:
parent
fc28e3a976
commit
24f594954e
@ -24,6 +24,7 @@ import com.simplemobiletools.commons.extensions.beInvisibleIf
|
||||
import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
|
||||
import com.simplemobiletools.commons.views.MyRecyclerView
|
||||
import kotlinx.android.synthetic.main.event_list_item.view.*
|
||||
import kotlinx.android.synthetic.main.event_list_section.view.*
|
||||
import java.util.*
|
||||
|
||||
class EventListAdapter(activity: SimpleActivity, var listItems: ArrayList<ListItem>, val allowLongClick: Boolean, val listener: RefreshRecyclerViewListener?,
|
||||
@ -131,7 +132,7 @@ class EventListAdapter(activity: SimpleActivity, var listItems: ArrayList<ListIt
|
||||
|
||||
private fun setupListEvent(view: View, listEvent: ListEvent) {
|
||||
view.apply {
|
||||
event_section_title.text = listEvent.title
|
||||
event_item_title.text = listEvent.title
|
||||
event_item_description?.text = if (replaceDescription) listEvent.location else listEvent.description
|
||||
event_item_start.text = if (listEvent.isAllDay) allDayString else Formatter.getTimeFromTS(context, listEvent.startTS)
|
||||
event_item_end?.beInvisibleIf(listEvent.startTS == listEvent.endTS)
|
||||
@ -172,7 +173,7 @@ class EventListAdapter(activity: SimpleActivity, var listItems: ArrayList<ListIt
|
||||
|
||||
event_item_start.setTextColor(startTextColor)
|
||||
event_item_end?.setTextColor(endTextColor)
|
||||
event_section_title.setTextColor(startTextColor)
|
||||
event_item_title.setTextColor(startTextColor)
|
||||
event_item_description?.setTextColor(startTextColor)
|
||||
}
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ class EventListWidgetAdapter(val context: Context) : RemoteViewsService.RemoteVi
|
||||
private fun setupListEvent(remoteView: RemoteViews, item: ListEvent) {
|
||||
var curTextColor = textColor
|
||||
remoteView.apply {
|
||||
setText(R.id.event_section_title, item.title)
|
||||
setText(R.id.event_item_title, item.title)
|
||||
setText(R.id.event_item_description, if (replaceDescription) item.location else item.description)
|
||||
setText(R.id.event_item_start, if (item.isAllDay) allDayString else Formatter.getTimeFromTS(context, item.startTS))
|
||||
setImageViewBitmap(R.id.event_item_color, context.resources.getColoredBitmap(R.drawable.monthly_event_dot, item.color))
|
||||
@ -85,12 +85,12 @@ class EventListWidgetAdapter(val context: Context) : RemoteViewsService.RemoteVi
|
||||
curTextColor = weakTextColor
|
||||
}
|
||||
|
||||
setTextColor(R.id.event_section_title, curTextColor)
|
||||
setTextColor(R.id.event_item_title, curTextColor)
|
||||
setTextColor(R.id.event_item_description, curTextColor)
|
||||
setTextColor(R.id.event_item_start, curTextColor)
|
||||
setTextColor(R.id.event_item_end, curTextColor)
|
||||
|
||||
setTextSize(R.id.event_section_title, mediumFontSize)
|
||||
setTextSize(R.id.event_item_title, mediumFontSize)
|
||||
setTextSize(R.id.event_item_description, mediumFontSize)
|
||||
setTextSize(R.id.event_item_start, mediumFontSize)
|
||||
setTextSize(R.id.event_item_end, mediumFontSize)
|
||||
|
@ -37,7 +37,7 @@
|
||||
android:textSize="@dimen/day_text_size"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/event_section_title"
|
||||
android:id="@+id/event_item_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/activity_margin"
|
||||
@ -53,7 +53,7 @@
|
||||
android:id="@+id/event_item_description"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/event_section_title"
|
||||
android:layout_below="@+id/event_item_title"
|
||||
android:layout_marginLeft="@dimen/activity_margin"
|
||||
android:layout_toLeftOf="@+id/event_item_color"
|
||||
android:layout_toRightOf="@+id/event_item_end"
|
||||
|
@ -28,7 +28,7 @@
|
||||
tools:text="13:00"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/event_section_title"
|
||||
android:id="@+id/event_item_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/activity_margin"
|
||||
|
@ -26,7 +26,7 @@
|
||||
android:textSize="@dimen/day_text_size"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/event_section_title"
|
||||
android:id="@+id/event_item_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/normal_margin"
|
||||
@ -42,7 +42,7 @@
|
||||
android:id="@+id/event_item_description"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/event_section_title"
|
||||
android:layout_below="@+id/event_item_title"
|
||||
android:layout_marginLeft="@dimen/normal_margin"
|
||||
android:layout_toLeftOf="@+id/event_item_color"
|
||||
android:layout_toRightOf="@+id/event_item_end"
|
||||
@ -57,10 +57,10 @@
|
||||
android:id="@+id/event_item_color"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignBottom="@+id/event_section_title"
|
||||
android:layout_alignBottom="@+id/event_item_title"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignTop="@+id/event_section_title"
|
||||
android:layout_alignTop="@+id/event_item_title"
|
||||
android:paddingRight="@dimen/medium_margin"
|
||||
android:src="@drawable/monthly_event_dot"/>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
tools:text="13:00"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/event_section_title"
|
||||
android:id="@+id/event_item_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/normal_margin"
|
||||
@ -32,10 +32,10 @@
|
||||
android:id="@+id/event_item_color"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignBottom="@+id/event_section_title"
|
||||
android:layout_alignBottom="@+id/event_item_title"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignTop="@+id/event_section_title"
|
||||
android:layout_alignTop="@+id/event_item_title"
|
||||
android:paddingRight="@dimen/medium_margin"
|
||||
android:src="@drawable/monthly_event_dot"/>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user