Java Android Studio:进度栏看起来很老(如Android 5)
我最近遇到了一个奇怪的问题。当我尝试将进度条添加到项目中时,它们的外观看起来像Android应用的石头时代:
< img src =“ https://i.sstatic.net/jfoot.png” alt =“在此处输入图像说明”>
在Android 12的最终构建中,它们也看起来像是这样。它们也很懒惰。我想使用默认材料设计进度栏。除此之外,它似乎适用于我拥有的其他项目。
这是我用于progressbars的代码(只有代码,Android Studio通过Designer View使用):
<ProgressBar
android:id="@+id/progressBar3"
android:layout_width="match_parent"
android:indeterminate="true"
android:layout_height="wrap_content" />
<ProgressBar
android:id="@+id/progressBar5"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
这是build.gradle:Gradle:Gradle:Gradle:
defaultConfig {
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "0.1"
}
I recently encountered a strange problem. When I try to add progress bars to my project, their appearance looks like the stone-age of android apps:
They also look like this in the final build for Android 12. They are also really laggy. I'd like to use the default Material Design Progressbars. It seems to work for every other project I have, except for this.
This is the code I use for the Progressbars (just the code, Android Studio uses via the designer view):
<ProgressBar
android:id="@+id/progressBar3"
android:layout_width="match_parent"
android:indeterminate="true"
android:layout_height="wrap_content" />
<ProgressBar
android:id="@+id/progressBar5"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
And this is the default-config of the build.gradle:
defaultConfig {
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "0.1"
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试改变样式
Try to change style