本文整理汇总了Java中com.roughike.swipeselector.SwipeSelector类的典型用法代码示例。如果您正苦于以下问题:Java SwipeSelector类的具体用法?Java SwipeSelector怎么用?Java SwipeSelector使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SwipeSelector类属于com.roughike.swipeselector包,在下文中一共展示了SwipeSelector类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSelection
import com.roughike.swipeselector.SwipeSelector; //导入依赖的package包/类
/**
* Gets the selection of the user
*
* @return StandaloneMode -
*/
private StandaloneActivity.StandaloneMode getSelection(){
SwipeSelector swipeSelector = (SwipeSelector) findViewById(R.id.ssStandaloneModeSelector);
SwipeItem selectedItem = swipeSelector.getSelectedItem();
int value = (Integer) selectedItem.value;
// Refer to values/arrays.xml
final int ALL_POINTS = 0;
final int ALL_POINTS_ACCORDING_SCREEN = 1;
switch ( value ){
case ALL_POINTS:
return StandaloneActivity.StandaloneMode.ALL_POINTS_WITH_CONFIG;
case ALL_POINTS_ACCORDING_SCREEN:
return StandaloneActivity.StandaloneMode.ALL_POINTS_WITH_CONFIG_ACCORDING_SCREEN;
}
return StandaloneActivity.StandaloneMode.ALL_POINTS_WITH_CONFIG;
}
示例2: initGuiElements
import com.roughike.swipeselector.SwipeSelector; //导入依赖的package包/类
/**
* Initializes UI elements
*/
private void initGuiElements() {
medicalUserSpinner = (Spinner) findViewById(R.id.start_game_settings_medicalid_spinner);
operationIssueSpinner = (Spinner) findViewById(R.id.start_game_settings_operation_issue_spinner);
testTypeSelector = (SwipeSelector) findViewById(R.id.test_type_swipe_selector);
gameTypeSelector = (SwipeSelector) findViewById(R.id.game_type_swipe_selector);
if(navigationView!= null)
selectedUserView = (TextView) navigationView.getHeaderView(0).findViewById(R.id.settings_selected_user);
}
示例3: initGuiElements
import com.roughike.swipeselector.SwipeSelector; //导入依赖的package包/类
/**
* Initializes UI elements
*/
private void initGuiElements() {
medicalUserSpinner = (Spinner) findViewById(R.id.start_game_settings_medicalid_spinner);
operationIssueSpinner = (Spinner) findViewById(R.id.start_game_settings_operation_issue_spinner);
testTypeSelector = (SwipeSelector) findViewById(R.id.test_type_swipe_selector);
gameTypeSelector = (SwipeSelector) findViewById(R.id.game_type_swipe_selector);
}
示例4: initEventTypeSwipeSelector
import com.roughike.swipeselector.SwipeSelector; //导入依赖的package包/类
private void initEventTypeSwipeSelector(MaterialDialog dialog, Activity activity) {
eventTypeSwipeSelector = (SwipeSelector) dialog.getCustomView().findViewById(R.id.event_type_swipe_selector);
swipeList = new SwipeItem[6];
swipeList[0] = new SwipeItem(0, activity.getResources().getString(R.string.note), activity.getResources().getString(R.string.add_note_description));
swipeList[1] = new SwipeItem(1, activity.getResources().getString(R.string.intubation), activity.getResources().getString(R.string.intubation_description));
swipeList[2] = new SwipeItem(2, activity.getResources().getString(R.string.wakeup), activity.getResources().getString(R.string.wakeup_time_description));
swipeList[3] = new SwipeItem(3, activity.getResources().getString(R.string.cramp), activity.getResources().getString(R.string.cramp_description));
swipeList[4] = new SwipeItem(4, activity.getResources().getString(R.string.narcosis_stop), activity.getResources().getString(R.string.norcosis_stop_description));
//swipeList[2] = new SwipeItem(2, activity.getResources().getString(R.string.extubation), activity.getResources().getString(R.string.extubation_description));
//swipeList[3] = new SwipeItem(3, activity.getResources().getString(R.string.sedation), activity.getResources().getString(R.string.sedation_description));
//Add new event "cramp" (krampf) and "narcosis stop"
swipeList[5] = new SwipeItem(5, activity.getResources().getString(R.string.operation_finished), activity.getResources().getString(R.string.operation_finished_description));
eventTypeSwipeSelector.setItems(swipeList);
}