0

i am trying to build dialog as in pic as follows as

enter image description here

i have try two recycler view and constraint layout to show time in specific highlighted view but i have no idea when next button click how to get time that will be in area of constraint highlighted area or is there any other way to do this help will be appreciated and my code as follow

     <LinearLayout
        android:id="@+id/lltimer"
        android:layout_width="match_parent"
        android:layout_height="@dimen/_200sdp"
        android:layout_marginTop="@dimen/_12sdp"
        android:orientation="horizontal"
        android:gravity="center"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/title">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/rvHours"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="match_parent"
            android:layout_gravity="center"
            />

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/rvMints"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="match_parent"
            android:layout_gravity="center"
            />


    </LinearLayout>


    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/constrainBg"
        android:layout_width="match_parent"
        android:layout_height="@dimen/_28sdp"
        android:background="@drawable/shape_gray"
        android:alpha="0.3"
        android:layout_marginHorizontal="@dimen/_12sdp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintVertical_bias="0.3"

        />
Ayaz Muhammad
  • 138
  • 10
  • Check out https://stackoverflow.com/questions/24989218/get-visible-items-in-recyclerview. Depending on how that gray area is draw, the selected element will either be a fixed offset or a percentage offset from the first visible item. – Maurice Lam Mar 13 '23 at 00:44

1 Answers1

0

i have done it by using this lib that is use full for me https://github.com/OzcanAlasalvar/DatePicker

Ayaz Muhammad
  • 138
  • 10