Discrete seekbar in Android app?

后端 未结 7 1651
感动是毒
感动是毒 2020-12-29 04:46

I would like to create a seekbar for an Android app that allows the user to select a value between -5 and 5 (which maps to \"strongly disagree\" and \"strongly agree\"). How

相关标签:
7条回答
  • 2020-12-29 05:16
          <SeekBar
                    android:id="@+id/seekbar"
                    style="@style/SeekBarWithoutSteps"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="22dp"
                    android:layout_marginRight="22dp"
                    android:layout_marginTop="@dimen/margin_10"
                    android:max="4"
                    android:maxHeight="@dimen/margin_5"
                    android:minHeight="@dimen/margin_5"
                    android:paddingLeft="@dimen/margin_10"
                    android:paddingRight="@dimen/margin_10"
                    android:progressBackgroundTint="@color/colorGray"
                    android:progressTint="@color/colorGreen"
                    android:theme="@style/Widget.AppCompat.SeekBar.Discrete"
                    android:thumb="@drawable/filled_green"
                    android:thumbOffset="15dp" />
    
    0 讨论(0)
提交回复
热议问题