I have created a reusable custom component (a custom view with a canvas drawing a bitmap), it's a slider that can be used for anything (volume control/rating systems). The problem is I need to monitor it's progress, something like the seekbar onProgressChanged.
I have no clue I would implement this. I can't use the seekbar and try re use this, I need to use the custom component..
Would anyone have any idea on this?
My layout is as follows:
so I need to monitor the movement of my sliding image and try to calculate some sort of progress from that or is there an easier way?
any input on this would be appreciated, it's my first effort at custom components
EDIT
Here is how my xml layout looks:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="200dp"
android:id = "@+id/slider1"
android:layout_alignParentTop="true">
<com.cs.customSlider.slider.app.sliderView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/sliderView"
sliderView:diagonalSlide="false"
sliderView:translateAxisX="false"/>
<ImageView
android:id="@+id/slider_frame"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/slider_frame"
android:layout_centerHorizontal="true">
</ImageView>
</RelativeLayout>