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平台上构建一个文件管理器。我希望我的用户能够在长按一个文件时选择多个文件。怎么做?(在列表视图中)提前致谢。
假设您正在使用 a ListView,我相信您正在寻找android:choiceMode="multipleChoiceModal"或setChoiceMode(ListView.CHOICE_MODE_MULTIPLE_MODAL)
ListView
android:choiceMode="multipleChoiceModal"
setChoiceMode(ListView.CHOICE_MODE_MULTIPLE_MODAL)