读书人

progressBar和seekBar为什么不显示,该

发布时间: 2012-03-20 14:01:11 作者: rapoo

progressBar和seekBar为什么不显示
各位大拿,本人学习android的新手,按照参考书上写了点代码,其布局的xml文件如下。
第一个textview显示出来了,但下面的progressbar和seekbar都显示不出来。请各位大侠给指点一下,多谢!

<?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="wrap_content"
android:scrollbars="vertical" >

<TextView
android:id="@+id/textview02"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="This is a text view!" />

<ProgressBar
android:id="@+id/progressbar01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>

<ProgressBar
android:id="@+id/progressbar02"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:max="100" />

<SeekBar
android:id="@+id/seekbar01"
android:layout_width="240px"
android:layout_height="wrap_content"
android:max="500" />

</LinearLayout>

[解决办法]
LinearLayout orientation -> vertical

读书人网 >Android

热点推荐