當前位置: 首頁>>代碼示例>>Java>>正文


Java SwipeSelector類代碼示例

本文整理匯總了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;

}
 
開發者ID:pylapp,項目名稱:SmoothClicker,代碼行數:26,代碼來源:StandaloneModeDialog.java

示例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);
}
 
開發者ID:lidox,項目名稱:reaction-test,代碼行數:12,代碼來源:StartMenu.java

示例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);
}
 
開發者ID:lidox,項目名稱:reaction-test,代碼行數:10,代碼來源:StartGameSettings.java

示例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);
}
 
開發者ID:lidox,項目名稱:reaction-test,代碼行數:15,代碼來源:OperationModeView.java


注:本文中的com.roughike.swipeselector.SwipeSelector類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。