GithubHelp home page GithubHelp logo

Comments (2)

zippo88888888 avatar zippo88888888 commented on May 22, 2024

This function is temporarily not supported, but you can modify part of the code to achieve it
in ZFileListActivity,
you can do that ↓↓↓

private fun initListRecyclerView() {
       fileListAdapter = ZFileListAdapter(this).run {
           itemClickByAnim = { v, _, item ->
               if (item.isFile) {
                   ZFileUtil.openFile(item.filePath, v)
               } else {
                   // ZFileLog.i("进入 ${item.filePath}")
                   // backList.add(item.filePath)
                   // filePathAdapter.addItem(filePathAdapter.itemCount, item.toPathBean())
                   // zfile_list_pathRecyclerView.scrollToPosition(filePathAdapter.itemCount - 1)
                   // getData(item.filePath)
                   // nowPath = item.filePath
                  
                  getData(item.filePath)
               }
           }

           ...

       }
   }

  private fun getData(filePath: String?) {

       ...

       ZFileUtil.getList(this) {
           if (isNullOrEmpty()) {
               fileListAdapter?.clear()
               zfile_list_emptyLayout.visibility = View.VISIBLE
           } else {
               // fileListAdapter?.setDatas(this)
             ZFileLog.i("rootPath:$rootPath")
             ZFileLog.i("nowPath:$nowPath")
             if (rootPath == SD_ROOT && nowPath.isNull()) {
                  fileListAdapter?.setDatas(this)
                  zfile_list_emptyLayout.visibility = View.GONE
              } else {
                  setResult(ZFILE_RESULT_CODE, Intent().apply {
                       putParcelableArrayListExtra(
                           ZFILE_SELECT_DATA_KEY,
                           this@getList as java.util.ArrayList<out Parcelable>
                       )
                   })
                   finish()
               }
           }
           zfile_list_refreshLayout.isRefreshing = false
       }
   }

from zfilemanager.

zippo88888888 avatar zippo88888888 commented on May 22, 2024

After this modification, there will be many problems, such as unable to enter the secondary directory. Better not to do this !!!

from zfilemanager.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.