|
|
@ -2,12 +2,11 @@ package io.legado.app.ui.book.remote |
|
|
|
|
|
|
|
|
|
|
|
import android.content.Context |
|
|
|
import android.content.Context |
|
|
|
import android.view.ViewGroup |
|
|
|
import android.view.ViewGroup |
|
|
|
|
|
|
|
import cn.hutool.core.date.LocalDateTimeUtil |
|
|
|
import io.legado.app.base.adapter.ItemViewHolder |
|
|
|
import io.legado.app.base.adapter.ItemViewHolder |
|
|
|
import io.legado.app.base.adapter.RecyclerAdapter |
|
|
|
import io.legado.app.base.adapter.RecyclerAdapter |
|
|
|
import io.legado.app.databinding.ItemRemoteBookBinding |
|
|
|
import io.legado.app.databinding.ItemRemoteBookBinding |
|
|
|
import io.legado.app.utils.ConvertUtils |
|
|
|
import io.legado.app.utils.ConvertUtils |
|
|
|
import java.text.SimpleDateFormat |
|
|
|
|
|
|
|
import java.util.Date |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -39,7 +38,7 @@ class RemoteBookAdapter (context: Context, val callBack: CallBack) : |
|
|
|
tvName.text = item.filename.substringBeforeLast(".") |
|
|
|
tvName.text = item.filename.substringBeforeLast(".") |
|
|
|
tvContentType.text = item.contentType |
|
|
|
tvContentType.text = item.contentType |
|
|
|
tvSize.text = ConvertUtils.formatFileSize(item.size) |
|
|
|
tvSize.text = ConvertUtils.formatFileSize(item.size) |
|
|
|
tvDate.text = SimpleDateFormat("yyyy-MM-dd").format(Date(item.lastModify)) |
|
|
|
tvDate.text = LocalDateTimeUtil.format(LocalDateTimeUtil.of(item.lastModify), "yyyy-MM-dd") |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|