* WearableListConfig config = new WearableListConfig.Builder(elements) * .setIcon(ICON_RES_ID) * .setHeader("My Header") // comment out if you don't want any header * .setCheckedIcon(CHECKED_ICON_RES_ID) * .setCheckedIndex(mSelectedIndex) * .setRequestCode(REQUEST_CODE) * .build(); * WearManager.getInstance().showWearableList(activity, config); *
* WearableListConfig config = new WearableListConfig.Builder(elements) * .setIcon(ICON_RES_ID) * .setCheckedIcon(CHECKED_ICON_RES_ID) * .setCheckedIndex(mSelectedIndex) * .setRequestCode(REQUEST_CODE) * .build(); *
* protected void onActivityResult(int requestCode, int resultCode, Intent data) { * if(resultCode == RESULT_OK){ * WearableListConfig.WearableListResult result * = new WearableListConfig.WearableListResult(data, requestCode); * if (result.isHandled()) { * Log.d(TAG, String.format("Position: %d, Value: %s", result.getSelectedIndex(), * result.getSelectedValue())); * // do as needed with the selections made * } else { * // Some other activity is returning a result here ... * } * } * * } *