zoukankan      html  css  js  c++  java
  • 正则表达式匹配字符串

                        if (mExt.matches("(dir)")) {
                            Bitmap dir = BitmapFactory.decodeResource(getResources(), R.drawable.netdisc_search_list_img);
                            mMySkydriveItem.setNetdiscListImgs(dir);
                        } else if (mExt.matches("(doc|docx)")) {
                            Bitmap doc = BitmapFactory.decodeResource(getResources(), R.drawable.netdisc_word_file);
                            mMySkydriveItem.setNetdiscListImgs(doc);
                        } else if (mExt.matches("(xls)")) {
                            Bitmap xls = BitmapFactory.decodeResource(getResources(), R.drawable.netdisc_excel_file);
                            mMySkydriveItem.setNetdiscListImgs(xls);
                        } else if (mExt.matches("(ppt)")) {
                            Bitmap ppt = BitmapFactory.decodeResource(getResources(), R.drawable.netdisc_ppt_file);
                            mMySkydriveItem.setNetdiscListImgs(ppt);
                        } else if (mExt.matches("(jpg|jpeg|png|gif|bmp)")) {
                            Bitmap jpg = BitmapFactory.decodeResource(getResources(), R.drawable.netdisc_img_file);
                            mMySkydriveItem.setNetdiscListImgs(jpg);
                        } else if (mExt.matches("(rar|zip|tar|jar|iso)")) {
                            Bitmap zip = BitmapFactory.decodeResource(getResources(), R.drawable.netdisc_zip_file);
                            mMySkydriveItem.setNetdiscListImgs(zip);
                        } else if (mExt.matches("(acm|aif|aifc|aiff|ans|asf|aifc|avi|asp|ram|mov)")) {
                            Bitmap zip = BitmapFactory.decodeResource(getResources(), R.drawable.netdisc_zip_file);
                            mMySkydriveItem.setNetdiscListImgs(zip);
                        } else {
    
                        }
  • 相关阅读:
    西门子S7-300 设置IP、子网掩码
    [WCF编程]9.性能与限流
    [WCF编程]8.服务实例的生命周期
    [WCF编程]7.实例上下文模式
    [WCF编程]6.绑定行为
    [WCF编程]5.绑定概述
    [WCF编程]4.契约概述
    [WCF编程]3.WCF基础
    [WCF编程]2.SOA概述
    [WCF实践]1.WCF使用net.tcp寄宿到IIS中
  • 原文地址:https://www.cnblogs.com/zhujiabin/p/5669004.html
Copyright © 2011-2022 走看看