Skip to content

ProgressView

Sieun Ju edited this page Feb 1, 2022 · 3 revisions

μš”μ•½ (Summary)

  • SurfaceView 기반으둜 λ§Œλ“  LineProgressBar μž…λ‹ˆλ‹€.

μ§€μ›ν•˜λŠ” κΈ°λŠ₯ (Supported Features)

  • Linear Type (Horizontal, Vertical)

    • Attribute

      progressType (horizontal, vertical)

  • Background Color

    • Attribute

      progressBgColor (format: color)

  • Background Corner Raidus

    • Attribute

      progressRadius (format: dimension)

  • Progress Color Gradient (Start, Center, End)

    • Attribute

      progressStartColor (format: color)

      progressCenterColor (format: color)

      progressEndColor (format: color)

  • Progress Color Gradient Location XY

    • Attribute

      progressCenterXY (format: float)

  • Progress Max Value

    • Attribute

      progressMax (format: integer)

  • Progress Start Default Value

    • Attribute

      progressMin (format: integer)

μ‚¬μš©λ²• (How To)

  • xml μƒμ—μ„œ 속성 값을 μ…‹νŒ… ν•©λ‹ˆλ‹€.
<hmju.widget.progress.ProgressView
    android:id="@+id/progressView"
    android:layout_width="match_parent"
    android:layout_height="30dp"
    app:progressBgColor="@color/white"
    android:layout_marginLeft="20dp"
    android:layout_marginRight="20dp"
    app:progressRadius="15dp"
    app:progressEndColor="#29359C"
    app:progressMax="100"
    app:progressStartColor="#29359C"
    app:progressType="horizontal" />

Public ν•¨μˆ˜ μ„€λͺ…

  • currentProgress
    • μž…λ ₯ν•œ μˆ˜μΉ˜μ— 따라 μ§„ν–‰λ₯ μ„ ν‘œμ‹œν•˜λŠ” ν•¨μˆ˜
  • incrementProgressBy
    • Function Parameter
      • diff
    • ν˜„μž¬ μ§„ν–‰λ₯  (currentProgress) += diff ν•œ 값을 ν‘œμ‹œν•˜λŠ” ν•¨μˆ˜

μ‚¬μš© 캑처 ν™”λ©΄

이미지

Clone this wiki locally