我正試圖創建一個android應用程序。這個應用程序只有一個屏幕。在此屏幕中,需要向下滾動。Android:頂部屏幕在滾動時消失
現在我有這樣的代碼:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scroll"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<EditText
android:id="@+id/name1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImageButton
android:id="@+id/calculate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/button" />
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|center_vertical" >
<ImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/image" />
<CheckedTextView
android:id="@+id/score"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</FrameLayout>
<CheckedTextView
android:id="@+id/quote"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</ScrollView>
但當CheckedTextField含有大量的文字,我需要滾動,滾動顯示,但我窗口的頂部消失。所以我沒有看到第一個EditText'name1'了。我不能通過滾動回來...
任何人誰可以給我一個解決方案?
Tnx提前!
這不是我想要的EditText上被固定在屏幕的頂部。當滾動條出現時,它確實消失了,這不是重點。我只是想滾動整個屏幕,如果你明白我的意思...... – user1293065 2012-03-26 14:56:18