mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
adding some keyboard hiding
This commit is contained in:
@@ -1043,6 +1043,7 @@ class EventActivity : SimpleActivity() {
|
|||||||
|
|
||||||
private fun duplicateEvent() {
|
private fun duplicateEvent() {
|
||||||
// the activity has the singleTask launchMode to avoid some glitches, so finish it before relaunching
|
// the activity has the singleTask launchMode to avoid some glitches, so finish it before relaunching
|
||||||
|
hideKeyboard()
|
||||||
finish()
|
finish()
|
||||||
Intent(this, EventActivity::class.java).apply {
|
Intent(this, EventActivity::class.java).apply {
|
||||||
putExtra(EVENT_ID, mEvent.id)
|
putExtra(EVENT_ID, mEvent.id)
|
||||||
@@ -1402,6 +1403,7 @@ class EventActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setupTimeZone() {
|
private fun setupTimeZone() {
|
||||||
|
hideKeyboard()
|
||||||
Intent(this, SelectTimeZoneActivity::class.java).apply {
|
Intent(this, SelectTimeZoneActivity::class.java).apply {
|
||||||
putExtra(CURRENT_TIME_ZONE, mEvent.getTimeZoneString())
|
putExtra(CURRENT_TIME_ZONE, mEvent.getTimeZoneString())
|
||||||
startActivityForResult(this, SELECT_TIME_ZONE_INTENT)
|
startActivityForResult(this, SELECT_TIME_ZONE_INTENT)
|
||||||
|
@@ -92,6 +92,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||||||
checkWhatsNewDialog()
|
checkWhatsNewDialog()
|
||||||
calendar_fab.beVisibleIf(config.storedView != YEARLY_VIEW && config.storedView != WEEKLY_VIEW)
|
calendar_fab.beVisibleIf(config.storedView != YEARLY_VIEW && config.storedView != WEEKLY_VIEW)
|
||||||
calendar_fab.setOnClickListener {
|
calendar_fab.setOnClickListener {
|
||||||
|
hideKeyboard()
|
||||||
val lastFragment = currentFragments.last()
|
val lastFragment = currentFragments.last()
|
||||||
val allowChangingDay = lastFragment !is DayFragmentsHolder && lastFragment !is MonthDayFragmentsHolder
|
val allowChangingDay = lastFragment !is DayFragmentsHolder && lastFragment !is MonthDayFragmentsHolder
|
||||||
launchNewEventIntent(lastFragment.getNewEventDayCode(), allowChangingDay)
|
launchNewEventIntent(lastFragment.getNewEventDayCode(), allowChangingDay)
|
||||||
@@ -392,6 +393,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||||||
intent.removeExtra(EVENT_ID)
|
intent.removeExtra(EVENT_ID)
|
||||||
intent.removeExtra(EVENT_OCCURRENCE_TS)
|
intent.removeExtra(EVENT_OCCURRENCE_TS)
|
||||||
if (eventIdToOpen != 0L && eventOccurrenceToOpen != 0L) {
|
if (eventIdToOpen != 0L && eventOccurrenceToOpen != 0L) {
|
||||||
|
hideKeyboard()
|
||||||
Intent(this, EventActivity::class.java).apply {
|
Intent(this, EventActivity::class.java).apply {
|
||||||
putExtra(EVENT_ID, eventIdToOpen)
|
putExtra(EVENT_ID, eventIdToOpen)
|
||||||
putExtra(EVENT_OCCURRENCE_TS, eventOccurrenceToOpen)
|
putExtra(EVENT_OCCURRENCE_TS, eventOccurrenceToOpen)
|
||||||
@@ -412,6 +414,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||||||
val eventId = uri.lastPathSegment
|
val eventId = uri.lastPathSegment
|
||||||
val id = eventsDB.getEventIdWithLastImportId("%-$eventId")
|
val id = eventsDB.getEventIdWithLastImportId("%-$eventId")
|
||||||
if (id != null) {
|
if (id != null) {
|
||||||
|
hideKeyboard()
|
||||||
Intent(this, EventActivity::class.java).apply {
|
Intent(this, EventActivity::class.java).apply {
|
||||||
putExtra(EVENT_ID, id)
|
putExtra(EVENT_ID, id)
|
||||||
startActivity(this)
|
startActivity(this)
|
||||||
@@ -933,6 +936,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||||||
|
|
||||||
private fun tryImportEvents() {
|
private fun tryImportEvents() {
|
||||||
if (isQPlus()) {
|
if (isQPlus()) {
|
||||||
|
hideKeyboard()
|
||||||
Intent(Intent.ACTION_GET_CONTENT).apply {
|
Intent(Intent.ACTION_GET_CONTENT).apply {
|
||||||
addCategory(Intent.CATEGORY_OPENABLE)
|
addCategory(Intent.CATEGORY_OPENABLE)
|
||||||
type = "text/calendar"
|
type = "text/calendar"
|
||||||
@@ -991,6 +995,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||||||
if (isQPlus()) {
|
if (isQPlus()) {
|
||||||
ExportEventsDialog(this, config.lastExportPath, true) { file, eventTypes ->
|
ExportEventsDialog(this, config.lastExportPath, true) { file, eventTypes ->
|
||||||
eventTypesToExport = eventTypes
|
eventTypesToExport = eventTypes
|
||||||
|
hideKeyboard()
|
||||||
|
|
||||||
Intent(Intent.ACTION_CREATE_DOCUMENT).apply {
|
Intent(Intent.ACTION_CREATE_DOCUMENT).apply {
|
||||||
type = "text/calendar"
|
type = "text/calendar"
|
||||||
@@ -1033,6 +1038,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun launchSettings() {
|
private fun launchSettings() {
|
||||||
|
hideKeyboard()
|
||||||
startActivity(Intent(applicationContext, SettingsActivity::class.java))
|
startActivity(Intent(applicationContext, SettingsActivity::class.java))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -57,6 +57,7 @@ class EventListFragment : MyFragmentHolder(), RefreshRecyclerViewListener {
|
|||||||
setTextColor(context.getAdjustedPrimaryColor())
|
setTextColor(context.getAdjustedPrimaryColor())
|
||||||
underlineText()
|
underlineText()
|
||||||
setOnClickListener {
|
setOnClickListener {
|
||||||
|
activity?.hideKeyboard()
|
||||||
context.launchNewEventIntent(getNewEventDayCode())
|
context.launchNewEventIntent(getNewEventDayCode())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user