|
|
@ -8,7 +8,6 @@ import android.widget.PopupWindow |
|
|
|
import androidx.appcompat.view.SupportMenuInflater |
|
|
|
import androidx.appcompat.view.SupportMenuInflater |
|
|
|
import androidx.appcompat.view.menu.MenuBuilder |
|
|
|
import androidx.appcompat.view.menu.MenuBuilder |
|
|
|
import androidx.appcompat.view.menu.MenuItemImpl |
|
|
|
import androidx.appcompat.view.menu.MenuItemImpl |
|
|
|
import androidx.recyclerview.widget.DividerItemDecoration |
|
|
|
|
|
|
|
import androidx.recyclerview.widget.LinearLayoutManager |
|
|
|
import androidx.recyclerview.widget.LinearLayoutManager |
|
|
|
import androidx.recyclerview.widget.RecyclerView |
|
|
|
import androidx.recyclerview.widget.RecyclerView |
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.R |
|
|
@ -36,9 +35,6 @@ class TextActionMenu(context: Context, callBack: CallBack) : |
|
|
|
private fun initRecyclerView() = with(contentView) { |
|
|
|
private fun initRecyclerView() = with(contentView) { |
|
|
|
val adapter = Adapter(context) |
|
|
|
val adapter = Adapter(context) |
|
|
|
recycler_view.layoutManager = LinearLayoutManager(context, RecyclerView.HORIZONTAL, false) |
|
|
|
recycler_view.layoutManager = LinearLayoutManager(context, RecyclerView.HORIZONTAL, false) |
|
|
|
recycler_view.addItemDecoration( |
|
|
|
|
|
|
|
DividerItemDecoration(context, DividerItemDecoration.HORIZONTAL) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
recycler_view.adapter = adapter |
|
|
|
recycler_view.adapter = adapter |
|
|
|
val menu = MenuBuilder(context) |
|
|
|
val menu = MenuBuilder(context) |
|
|
|
SupportMenuInflater(context).inflate(R.menu.content_select_action, menu) |
|
|
|
SupportMenuInflater(context).inflate(R.menu.content_select_action, menu) |
|
|
|