何时不确定进度条进入Android支持库 [英] When is indeterminate progressbar coming to Android Support Library

本文介绍了何时不确定进度条进入Android支持库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序用户界面是使用Android支持库构建的,但是目前没有(真正的)进度条的AppCompat版本,这是我的应用程序真正需要的.

My applications UI is built using the Android Support Library, but there is currently no AppCompat version of the (intederminate) progressbar, which my app really needs.

我宁愿不使用任何第三方库来实现材料设计进度条,所以我想知道是否有人坐在那里,以了解为什么支持库中未包含该信息,以及是否有任何迹象表明(以及何时).

I would prefer to not use any third party libraries to achieve material design progressbars, so I'm wondering if anyone sits on information about why it's not included in the support library, and if there is any sign of it arriving (and when).

推荐答案

您可以使用具有 AppCompat 样式的ProgressBar.

You can use a ProgressBar with an AppCompat style.

只需在您的布局中添加它:

Just add this in your layout:

<ProgressBar
        style="@style/Base.Widget.AppCompat.ProgressBar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:indeterminate="true"
        android:visibility="visible" />

如果您想要水平进度条,请使用:

If you would like an Horizontal progress bar use:

  <ProgressBar
        style="@style/Base.Widget.AppCompat.ProgressBar.Horizontal"
        android:layout_width="match_parent"
        android:layout_height="8dp"
        android:layout_marginTop="24dp"
        android:indeterminate="true"
        android:visibility="visible" />

他们遵循官方材料指南.

这篇关于何时不确定进度条进入Android支持库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆