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();
    }

    }

  • 相关阅读:
    bzoj2438
    bzoj3040
    [AHOI2009]维护序列
    [JSOI2008]最大数
    洛谷3378堆模板
    洛谷1439
    洛谷2756
    bzoj1016
    洛谷1875
    [模板] 强连通分量
  • 原文地址:https://www.cnblogs.com/xingmeng/p/2637727.html
Copyright © 2011-2022 走看看