add a map button to the location field
This commit is contained in:
parent
62294150bb
commit
1bf5e223fa
|
@ -80,6 +80,7 @@ class EventActivity : SimpleActivity() {
|
||||||
updateCalDAVCalendar()
|
updateCalDAVCalendar()
|
||||||
updateLocation()
|
updateLocation()
|
||||||
|
|
||||||
|
event_location_button.setOnClickListener { setupLocation() }
|
||||||
event_start_date.setOnClickListener { setupStartDate() }
|
event_start_date.setOnClickListener { setupStartDate() }
|
||||||
event_start_time.setOnClickListener { setupStartTime() }
|
event_start_time.setOnClickListener { setupStartTime() }
|
||||||
event_end_date.setOnClickListener { setupEndDate() }
|
event_end_date.setOnClickListener { setupEndDate() }
|
||||||
|
@ -650,6 +651,10 @@ class EventActivity : SimpleActivity() {
|
||||||
event_end_time.setTextColor(textColor)
|
event_end_time.setTextColor(textColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun setupLocation() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
private fun setupStartDate() {
|
private fun setupStartDate() {
|
||||||
hideKeyboard()
|
hideKeyboard()
|
||||||
|
@ -750,5 +755,6 @@ class EventActivity : SimpleActivity() {
|
||||||
event_reminder_image.applyColorFilter(textColor)
|
event_reminder_image.applyColorFilter(textColor)
|
||||||
event_type_image.applyColorFilter(textColor)
|
event_type_image.applyColorFilter(textColor)
|
||||||
event_caldav_calendar_image.applyColorFilter(textColor)
|
event_caldav_calendar_image.applyColorFilter(textColor)
|
||||||
|
event_location_button.applyColorFilter(config.primaryColor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 437 B |
Binary file not shown.
After Width: | Height: | Size: 528 B |
Binary file not shown.
After Width: | Height: | Size: 781 B |
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyEditText
|
<com.simplemobiletools.commons.views.MyEditText
|
||||||
android:id="@+id/event_title"
|
android:id="@+id/event_title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/activity_margin"
|
android:layout_marginLeft="@dimen/activity_margin"
|
||||||
android:layout_marginRight="@dimen/activity_margin"
|
android:layout_marginRight="@dimen/activity_margin"
|
||||||
|
@ -29,12 +29,12 @@
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyEditText
|
<com.simplemobiletools.commons.views.MyEditText
|
||||||
android:id="@+id/event_location"
|
android:id="@+id/event_location"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/event_title"
|
android:layout_below="@+id/event_title"
|
||||||
android:layout_marginLeft="@dimen/activity_margin"
|
android:layout_marginLeft="@dimen/activity_margin"
|
||||||
android:layout_marginRight="@dimen/activity_margin"
|
|
||||||
android:layout_marginTop="@dimen/activity_margin"
|
android:layout_marginTop="@dimen/activity_margin"
|
||||||
|
android:layout_toLeftOf="@+id/event_location_button"
|
||||||
android:hint="@string/location"
|
android:hint="@string/location"
|
||||||
android:inputType="textCapWords"
|
android:inputType="textCapWords"
|
||||||
android:maxLength="80"
|
android:maxLength="80"
|
||||||
|
@ -43,9 +43,24 @@
|
||||||
android:textCursorDrawable="@null"
|
android:textCursorDrawable="@null"
|
||||||
android:textSize="@dimen/day_text_size"/>
|
android:textSize="@dimen/day_text_size"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/event_location_button"
|
||||||
|
style="@style/MyBorderlessBackgroundStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_alignBottom="@+id/event_location"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_alignTop="@+id/event_location"
|
||||||
|
android:layout_marginEnd="@dimen/activity_margin"
|
||||||
|
android:layout_marginRight="@dimen/activity_margin"
|
||||||
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
|
android:paddingRight="@dimen/medium_margin"
|
||||||
|
android:src="@drawable/ic_map"/>
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyEditText
|
<com.simplemobiletools.commons.views.MyEditText
|
||||||
android:id="@+id/event_description"
|
android:id="@+id/event_description"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/event_location"
|
android:layout_below="@+id/event_location"
|
||||||
android:layout_marginLeft="@dimen/activity_margin"
|
android:layout_marginLeft="@dimen/activity_margin"
|
||||||
|
|
Loading…
Reference in New Issue