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