2

有人可以解释为什么我的进度条不是一条直线(下图)?

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<ProgressBar android:id="@+id/progressbar"
    style="?android:attr/progressBarStyleHorizontal"
    android:layout_width="fill_parent"
    android:layout_height="25px"
    android:progress="50"
/>

<ListView
    android:id="@+id/list"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:drawSelectorOnTop="false"
/>
</LinearLayout>

在此处输入图像描述

4

1 回答 1

0

You set:

android:layout_height="25px"

which means 25 pixels, which is usually less than 3 millimiters in most devices.

Ex:

Screen with 800 pixel and 8 cm -> 8 / 800 = 0.01 cm = 0.1 mm 25 pixel = 2.5 millimiters

Regards.

于 2012-11-30T01:38:24.533 回答