0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【JetpackCompose】プログレスバーを旧デザインに戻す方法

Posted at

material3のv1.3.0からプログレスバーのデザインが新しくなりました。
新デザインでは、進捗を表すバーと全体のバーが分割され、終点部分に点が加わっています。

v1.2.1

v1.3.0

コード

追加されたgapSizedrawStopIndicatorを使うと、前のデザインに戻すことができます。

LinearProgressIndicator(
    progress = { 0.5f },
    strokeCap = StrokeCap.Square,   // 角の丸みをなくす
    gapSize = (-15).dp,             // 隙間をなくす
    drawStopIndicator = {}          // 終点の点の描画をなくす
)

プレビュー

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?