|
|
@ -20,6 +20,7 @@
|
|
|
|
package org.isoron.uhabits.activities.common.dialogs
|
|
|
|
package org.isoron.uhabits.activities.common.dialogs
|
|
|
|
|
|
|
|
|
|
|
|
import android.content.Context
|
|
|
|
import android.content.Context
|
|
|
|
|
|
|
|
import android.text.InputType
|
|
|
|
import android.view.Gravity
|
|
|
|
import android.view.Gravity
|
|
|
|
import android.view.KeyEvent.KEYCODE_ENTER
|
|
|
|
import android.view.KeyEvent.KEYCODE_ENTER
|
|
|
|
import android.view.LayoutInflater
|
|
|
|
import android.view.LayoutInflater
|
|
|
@ -28,6 +29,7 @@ import android.view.View
|
|
|
|
import android.view.View.GONE
|
|
|
|
import android.view.View.GONE
|
|
|
|
import android.view.View.VISIBLE
|
|
|
|
import android.view.View.VISIBLE
|
|
|
|
import android.widget.PopupWindow
|
|
|
|
import android.widget.PopupWindow
|
|
|
|
|
|
|
|
import kotlinx.android.synthetic.main.checkmark_popup.view.*
|
|
|
|
import org.isoron.uhabits.core.models.Entry
|
|
|
|
import org.isoron.uhabits.core.models.Entry
|
|
|
|
import org.isoron.uhabits.core.preferences.Preferences
|
|
|
|
import org.isoron.uhabits.core.preferences.Preferences
|
|
|
|
import org.isoron.uhabits.databinding.CheckmarkPopupBinding
|
|
|
|
import org.isoron.uhabits.databinding.CheckmarkPopupBinding
|
|
|
@ -49,6 +51,10 @@ class NumberPopup(
|
|
|
|
private val view = CheckmarkPopupBinding.inflate(LayoutInflater.from(context)).apply {
|
|
|
|
private val view = CheckmarkPopupBinding.inflate(LayoutInflater.from(context)).apply {
|
|
|
|
// Required for round corners
|
|
|
|
// Required for round corners
|
|
|
|
container.clipToOutline = true
|
|
|
|
container.clipToOutline = true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Android bugfix: Allowing suggestions in a popup causes a crash.
|
|
|
|
|
|
|
|
// stackoverflow.com/questions/4829718
|
|
|
|
|
|
|
|
container.notes.inputType = InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
init {
|
|
|
|
init {
|
|
|
|