我有一個進度條規定感謝這個代碼:進度和progressBarStyleHorizontal填充
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<ProgressBar
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?android:attr/progressBarStyleHorizontal"
android:indeterminate="true"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:id="@+id/fragment_article_progressBar"
android:visibility="visible"
/>
<WebView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/fragment_article_content"/>
</LinearLayout>
但是當我運行它,一些填充的上方和下方的ProgressBar
添加它似乎不太自然。
是它的水平ProgressBar
正常的風格?如果不是,我該如何解決?
乾杯
此修復程序似乎有點...髒!它可以與任何設備一起使用嗎? :-) – Vico
如果你不想使用android:layout_marginBottom =「 - 4dp,android:layout_marginTop =」 - 4dp「,那麼嘗試使用 'android:minHeight =」20dip「 android:maxHeight =」20dip「' –
謝謝,不幸的是,第二個解決方案是行不通的(空白空間更大) – Vico