app / sg.edu.ntu.scse.cz2006.gymbuddies.ui.bdsearch / BuddySearchFragment

BuddySearchFragment

open class BuddySearchFragment : Fragment

The fragment display search options for gym buddies

Author
Chia Yu

Since
2019-09-06

Constructors

<init>

The fragment display search options for gym buddies

BuddySearchFragment()

Properties

btnSearch

View reference to search button

var btnSearch: Button!

buddySearchViewModel

view model to separate data from activity life cycle

var buddySearchViewModel: BuddySearchViewModel!

llPrefDays

view reference to view group of preferred workout days

var llPrefDays: LinearLayout!

rgBuddyGender

view reference to radio group of gender

var rgBuddyGender: RadioGroup!

rgPrefTime

view reference to radio group of preferred workout time

var rgPrefTime: RadioGroup!

spPrefLocation

view reference to drop down list of location

var spPrefLocation: Spinner!

Functions

getPrefDays

convert preferred workout days to int[], where index denote the days, and value(0/1) denote the selection of the day

open fun getPrefDays(): IntArray!

getRadioText

helper method to retrieve selecte radio button text base on radio group provided

open fun getRadioText(rg: RadioGroup!): String!

onCreateView

Android framework lifecycle

open fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View?