zoukankan      html  css  js  c++  java
  • AlertDialog中的样式设置

    实例:

    AlertDialog.Builder builder = new AlertDialog.Builder(this);
    builder.setTitle("选择货币类型");
    QuitApp quitApp = new QuitApp("currency");
    builder.setItems((String[]) currencyName
    .toArray(new String[currencyName.size()]), quitApp);
    AlertDialog dialog = builder.create();
    dialog.show();

    private class QuitApp implements
    android.content.DialogInterface.OnClickListener {

    String qtype;

    public QuitApp(String type) {
    qtype = type;
    }

    @Override
    public void onClick(DialogInterface dialog, int which) {
    if (qtype == "currency") {
    currency_code = ((String[]) currencyCode
    .toArray(new String[currencyCode.size()]))[which];
    } else if (qtype == "region") {
    REGION_CODE = ((String[]) regionCode
    .toArray(new String[regionCode.size()]))[which];
    }
    removeAllSubNavItem();
    MainActivity.this.onResume();
    }

    }

  • 相关阅读:
    docker
    协程 gevent
    vue
    数据
    elk 配置
    iOS下架
    综合练习:词频统计
    组合数据类型综合练习
    Python基础综合练习
    熟悉常用的Linux操作
  • 原文地址:https://www.cnblogs.com/xingmeng/p/2637727.html
Copyright © 2011-2022 走看看