How to control Focus in Recylerview Android

I am using view Pager to implement the page switching effect between the two views. Both views has same layout. In each view I am using horizontal Recycler view. enter image description here

I want that when I am moving from Page A to page B, if my focus is at 2 then after page switch it should go to 4 and if it is on view 1 then to 3. Is there any way to do this.

class AbcAdapter(private val itemListener: ListItemListener) :
RecyclerView.Adapter<AbcAdapter.ViewHolder>() {

private var items = arrayListOf<ListItemData>()
private var dataError = false

private var focusedItem = -1

override fun getItemCount() = items.size

override fun onBindViewHolder(holder: ViewHolder, position: Int) {
    (holder.itemView as TimerListItemView).listItemListener = itemListener
    holder.itemView.update(items[position], dataError)
}

override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
    return ViewHolder(ListItemView(parent.context))
}

override fun onViewAttachedToWindow(holder: ViewHolder) {
    super.onViewAttachedToWindow(holder)
    if (holder.layoutPosition == focusedItem) {
         holder.setFocusOnClockView()
    }
}

fun setData(newItems: List<ListItemData>) {
    items.clear()
    items.addAll(newItems)
    notifyDataSetChanged()
}

fun setDataError(b: Boolean) {
    dataError = b
    notifyDataSetChanged()
}

/**
 * View holder class with one holder for itemView itself.
 */
inner class ViewHolder(itemView: TimerListItemView) : RecyclerView.ViewHolder(itemView) {

    private val viewClock: View? = itemView.findViewById(R.id.view_clock_bg)


    init {
        viewClock?.setOnFocusChangeListener { _, _ ->
            focusedItem = layoutPosition
        }
    }

    fun setFocusOnClockView() {
        if (viewClock?.hasFocus() == false)
            viewClock.requestFocus()
    }
}

}

This is my adapter class where I am setting the focus.