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


Java YesNoDialog類代碼示例

本文整理匯總了Java中com.playuav.android.dialogs.YesNoDialog的典型用法代碼示例。如果您正苦於以下問題:Java YesNoDialog類的具體用法?Java YesNoDialog怎麽用?Java YesNoDialog使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


YesNoDialog類屬於com.playuav.android.dialogs包,在下文中一共展示了YesNoDialog類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getDronieConfirmation

import com.playuav.android.dialogs.YesNoDialog; //導入依賴的package包/類
private void getDronieConfirmation() {
    YesNoWithPrefsDialog ynd = YesNoWithPrefsDialog.newInstance(getActivity()
            .getApplicationContext(), getString(R.string.pref_dronie_creation_title),
            getString(R.string.pref_dronie_creation_message), new YesNoDialog.Listener() {
        @Override
        public void onYes() {
            missionProxy.makeAndUploadDronie(getDrone());
        }

        @Override
        public void onNo() {
        }
    }, getString(R.string.pref_warn_on_dronie_creation_key));

    if(ynd != null){
        ynd.show(getChildFragmentManager(), "Confirm dronie creation");
    }
}
 
開發者ID:jiaminghan,項目名稱:droidplanner-master,代碼行數:19,代碼來源:CopterFlightActionsFragment.java

示例2: getTakeOffInAutoConfirmation

import com.playuav.android.dialogs.YesNoDialog; //導入依賴的package包/類
private void getTakeOffInAutoConfirmation() {
    YesNoWithPrefsDialog ynd = YesNoWithPrefsDialog.newInstance(getActivity()
                    .getApplicationContext(), getString(R.string.dialog_confirm_take_off_in_auto_title),
            getString(R.string.dialog_confirm_take_off_in_auto_msg), new YesNoDialog.Listener() {
                @Override
                public void onYes() {
                    Drone drone = getDrone();
                    drone.doGuidedTakeoff(TAKEOFF_ALTITUDE);
                    drone.changeVehicleMode(VehicleMode.COPTER_AUTO);
                }

                @Override
                public void onNo() {
                }
            }, getString(R.string.pref_warn_on_takeoff_in_auto_key));

    if(ynd != null){
        ynd.show(getChildFragmentManager(), "Confirm take off in auto");
    }
}
 
開發者ID:jiaminghan,項目名稱:droidplanner-master,代碼行數:21,代碼來源:CopterFlightActionsFragment.java

示例3: getArmingConfirmation

import com.playuav.android.dialogs.YesNoDialog; //導入依賴的package包/類
private void getArmingConfirmation() {
    YesNoWithPrefsDialog ynd = YesNoWithPrefsDialog.newInstance(getActivity().getApplicationContext(),
            getString(R.string.dialog_confirm_arming_title),
            getString(R.string.dialog_confirm_arming_msg), new YesNoDialog.Listener() {
                @Override
                public void onYes() {
                    getDrone().arm(true);
                }

                @Override
                public void onNo() {}
            }, getString(R.string.pref_warn_on_arm_key));

    if(ynd != null) {
        ynd.show(getChildFragmentManager(), "Confirm arming");
    }
}
 
開發者ID:jiaminghan,項目名稱:droidplanner-master,代碼行數:18,代碼來源:CopterFlightActionsFragment.java

示例4: doClearMissionConfirmation

import com.playuav.android.dialogs.YesNoDialog; //導入依賴的package包/類
private void doClearMissionConfirmation() {
	YesNoDialog ynd = YesNoDialog.newInstance(getApplicationContext(), getString(R.string
                       .dlg_clear_mission_title),
               getString(R.string.dlg_clear_mission_confirm), new YesNoDialog.Listener() {
                   @Override
                   public void onYes() {
                       if(missionProxy != null) {
                           missionProxy.clear();
                           missionProxy.addTakeoff();
                       }
                   }

                   @Override
                   public void onNo() {}
               });

       if(ynd != null) {
           ynd.show(getSupportFragmentManager(), "clearMission");
       }
}
 
開發者ID:jiaminghan,項目名稱:droidplanner-master,代碼行數:21,代碼來源:EditorActivity.java

示例5: onOptionsItemSelected

import com.playuav.android.dialogs.YesNoDialog; //導入依賴的package包/類
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    final Drone dpApi = dpApp.getDrone();

    switch (item.getItemId()) {
        case R.id.menu_connect:
            toggleDroneConnection();
            return true;

        case R.id.menu_send_mission: {
            final MissionProxy missionProxy = dpApp.getMissionProxy();
            if (missionProxy.getItems().isEmpty() || missionProxy.hasTakeoffAndLandOrRTL()) {
                missionProxy.sendMissionToAPM(dpApi);
            } else {
                YesNoWithPrefsDialog dialog = YesNoWithPrefsDialog.newInstance(
                        getApplicationContext(), "Mission Upload",
                        "Do you want to append a Takeoff and RTL to your " + "mission?", "Ok",
                        "Skip", new YesNoDialog.Listener() {

                            @Override
                            public void onYes() {
                                missionProxy.addTakeOffAndRTL();
                                missionProxy.sendMissionToAPM(dpApi);
                            }

                            @Override
                            public void onNo() {
                                missionProxy.sendMissionToAPM(dpApi);
                            }
                        }, getString(R.string.pref_auto_insert_mission_takeoff_rtl_land_key));

                if (dialog != null) {
                    dialog.show(getSupportFragmentManager(), "Mission Upload check.");
                }
            }
            return true;
        }

        case R.id.menu_load_mission:
            dpApi.loadWaypoints();
            return true;
        case R.id.menu_triggerCamera:
            dpApi.triggerCamera();
            return true;
        case R.id.menu_epm_grab:
            dpApi.epmCommand(false);
            return true;
        case R.id.menu_epm_release:
            dpApi.epmCommand(true);
            return true;

        case android.R.id.home:
            NavUtils.navigateUpFromSameTask(this);
            return true;

        default:
            return super.onOptionsItemSelected(item);
    }
}
 
開發者ID:jiaminghan,項目名稱:droidplanner-master,代碼行數:60,代碼來源:SuperUI.java


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