I am using ProgressBar
dynamically. Now, I want to set its width based on Its Progress.
For i.e. If Its progress is 10% then show its width 10%, If Its progress is 82% then show its width 82%.
Layout.xml:
<ProgressBar
android:id="@+id/pbAccuracy"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_marginLeft="9dp"
android:layout_toRightOf="@+id/tvTopic" />
I have RelativeLayout
in xml file.