* String[] data = new String[] {"List Item 1", "List Item 2", "List Item 3", "List Item 4"}; * WearableListConfig config = new WearableListConfig.Builder(data) * .setCheckedIndex(1) // index starts from 0 * .setRequestCode(REQUEST_CODE_LIST_DIALOG) * .setIcon(R.drawable.ic_person_24dp) * .setCheckable(true) * .build(); * WearManager.getInstance().showWearableList(this, config); *
* 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())); * } else { * Log.d(TAG, "Another activity is returning a result here ..."); * } * } * } *