Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是 android 新手,我的问题是我选择了一些东西(图像或视频),现在我如何知道所选文件包含 android 中的图像或视频?请帮忙
if(item.endsWith(".jpg")) { //Image } if(item.endsWith(".3gpp")) { //video }
这也可以帮助你
String mpath ="a1.jpg"; if(mpath.contains(".jpg")){ }else{ }