【发布时间】:2011-12-08 21:15:00
【问题描述】:
我目前正在尝试在屏幕的左上角放置一个进度条。但是,我不太确定哪种方法是最好的方法。我应该以编程方式创建进度条而不是在 xml 中创建它吗?或者我应该改变我的布局?谢谢。下面是 XML。
XML 代码:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
android:focusableInTouchMode="true"
android:orientation="vertical" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="fill_parent"
android:layout_height="53dp"
android:layout_marginBottom="5dp"
android:src="@raw/topbar" />
<TextView
android:id="@+id/search_nameOfFeed"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical|center_horizontal"
android:text="Event Name"
android:textColor="@color/black"
android:textSize="18sp" >
</TextView>
<ListView
android:id="@+id/searchfeed_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="0.83"
android:dividerHeight="10.0sp"
android:fadingEdge="none"
android:stackFromBottom="false"
android:transcriptMode="normal" >
</ListView>
</LinearLayout>
【问题讨论】:
标签: android layout view progress-bar