/** * Helper function to build a list dialog box that has a search function * Dialog lists has a cancel button. * * @param hint hint that displays in the EditText search box * @param itemClickListener OnClickListener for when the user selects one * of the units in the dialog list */ private void createSearchDialog(CharSequence hint, AdapterView.OnItemClickListener itemClickListener) { Context context = getActivity(); mSearchDialogBuilder = new UnitSearchDialogBuilder(mUnitType); CalcActivity ca = (CalcActivity) getActivity(); //TODO not sure if the idleResource should be accessed this way... mSearchDialogBuilder.buildDialog(context, hint, ca.getIdlingResource(), itemClickListener); }
@Before public void setUpTest() { mPagerIdle = getPagerIdle(mActivityTestRule); mSimpleIdle = mActivityTestRule.getActivity().getIdlingResource(); registerIdlingResources(mPagerIdle, mSimpleIdle); }