FeedbackFragment

class FeedbackFragment : Fragment, GarbageView

Fragment that lets the user send feedback to a feedback server.

TODO: Deploy a real feedback server, currently this fragment does not actually send feedback to a server.

Constructors

FeedbackFragment
Link copied to clipboard
fun FeedbackFragment()

Functions

clearGarbage
Link copied to clipboard
open override fun clearGarbage()

Set all listeners, ViewModels and shared references to null.

dismissKeyboard
Link copied to clipboard
private fun dismissKeyboard()

Dismisses the virtual keyboard.

getInputTextFieldText
Link copied to clipboard
private fun getInputTextFieldText(): String

Returns the text in mTextInputField.

initViews
Link copied to clipboard
private fun initViews()

Initializes the views of this fragment and sets their listeners.

isKeyboardActive
Link copied to clipboard
private fun isKeyboardActive(): Boolean

Whether or not the virtual keyboard is visible.

onCreate
Link copied to clipboard
open override fun onCreate(savedInstanceState: Bundle?)

Called when the fragment is created, sets the match result id and the matching server url.

onCreateView
Link copied to clipboard
open override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View?

Called on view creation, returns an inflated view of this fragment.

onFeedbackPosted
Link copied to clipboard
fun onFeedbackPosted()

Callback for when feedback has been sent to the server.

onViewCreated
Link copied to clipboard
open override fun onViewCreated(view: View, savedInstanceState: Bundle?)

Called when the view of this fragment is created, calls initViews.

removeThisFragment
Link copied to clipboard
private fun removeThisFragment()

Removes this fragment.

Properties

captureViewModel
Link copied to clipboard
private var captureViewModel: CaptureViewModel? = null

The CaptureViewModel, used to access the server url and match id of the last match request

containerView
Link copied to clipboard
private var containerView: FrameLayout? = null

The container view holding this fragment

layout
Link copied to clipboard
private lateinit var layout: LinearLayout

The layout of the fragment

mFragmentBackground
Link copied to clipboard
private var mFragmentBackground: FrameLayout? = null

The dark background behind the fragment, calls removeThisFragment on click

mSendFeedbackButton
Link copied to clipboard
private lateinit var mSendFeedbackButton: Button

Send feedback button, sends the feedback to the feedback server on click

mTextInputField
Link copied to clipboard
private lateinit var mTextInputField: EditText

The text input field for the user to enter feedback