当前位置: 首页>>代码示例>>Java>>正文


Java YesNoWithPrefsDialog.show方法代码示例

本文整理汇总了Java中com.playuav.android.dialogs.YesNoWithPrefsDialog.show方法的典型用法代码示例。如果您正苦于以下问题:Java YesNoWithPrefsDialog.show方法的具体用法?Java YesNoWithPrefsDialog.show怎么用?Java YesNoWithPrefsDialog.show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.playuav.android.dialogs.YesNoWithPrefsDialog的用法示例。


在下文中一共展示了YesNoWithPrefsDialog.show方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getDronieConfirmation

import com.playuav.android.dialogs.YesNoWithPrefsDialog; //导入方法依赖的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.YesNoWithPrefsDialog; //导入方法依赖的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.YesNoWithPrefsDialog; //导入方法依赖的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: onOptionsItemSelected

import com.playuav.android.dialogs.YesNoWithPrefsDialog; //导入方法依赖的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.YesNoWithPrefsDialog.show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。