[英]Android Studio - Old commands like httpparams, httpclient are not working anymore
[英]Java Android Studio: Progressbars look old (like Android 5)
我最近遇到了一個奇怪的問題。 當我嘗試向我的項目中添加進度條時,它們的外觀看起來像是 Android 應用程序的石器時代:
它們在 Android 12 的最終版本中也看起來像這樣。它們也非常滯后。 我想使用默認的材料設計進度條。 它似乎適用於我擁有的所有其他項目,除了這個。
這是我用於進度條的代碼(只是代碼,Android Studio 通過設計器視圖使用):
<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 的默認配置:
defaultConfig {
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "0.1"
}
嘗試改變風格
<ProgressBar
android:id="@+id/Bar"
style="@android:style/Widget.ProgressBar.Horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:progress="25"/>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.