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 {
    
                        }
  • 相关阅读:
    JS对象
    常见简单算法的实现
    JavaScript基础
    CSS3 边框 border-image
    HTTP消息头详解
    apache安装
    常见访问错误整理
    apache虚拟主机配置
    apache配置项
    Windows下使用ssh-add报错 Error connecting to agent: No such file or directory
  • 原文地址:https://www.cnblogs.com/zhujiabin/p/5669004.html
Copyright © 2011-2022 走看看