0
我使用的是ImageView的,是究竟它與下面的代碼部分延伸出的ImageView的,在滾動型圖像映射:ImageView的大小調整錯
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ctc="http://schemas.android.com/apk/res/de.svennergr.htn"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/backrepeat"
android:orientation="vertical"
android:padding="10dp"
android:weightSum="1" >
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:layout_marginTop="15dp"
android:baselineAligned="false"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:orientation="vertical"
android:weightSum="1" >
<TextView
android:id="@+id/login_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_weight="0.3333"
android:paddingTop="10dp"
android:text="Login:" />
<TextView
android:id="@+id/password_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.3333"
android:paddingTop="10dp"
android:text="Password:" />
<TextView
android:id="@+id/email_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.3333"
android:paddingTop="10dp"
android:text="E-Mail:"
android:visibility="gone" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:weightSum="1" >
<EditText
android:id="@+id/login_edit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.3333"
android:ems="10" >
</EditText>
<EditText
android:id="@+id/passwd_edit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.3333"
android:ems="10"
android:inputType="textPassword" />
<EditText
android:id="@+id/email_edit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.3333"
android:ems="10"
android:inputType="textEmailAddress"
android:visibility="gone" />
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/login"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/button"
android:text="Login"
android:textColor="@color/button_start" />
<Button
android:id="@+id/register"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="3dp"
android:background="@drawable/button"
android:text="@string/register"
android:textColor="@color/button_start" />
<de.svennergr.htn.ImageMap
android:id="@+id/imap"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="10dp"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/europa"
ctc:map="europa" />
</LinearLayout>
</ScrollView>
</LinearLayout>
我已經張貼了整個XML - 給你更好的概述。
的ImageView的應以「FILL_PARENT」在顯示屏底部顯示的圖像,但圖像beeing調整,不beeing顯示在底部:
感謝您的幫助。
非常感謝。使用「android:fillViewport =」true「」。 – svennergr
我會的。但我仍然有一些併發症。當我將ImageView放在2個按鈕之前時,這些按鈕不再顯示。任何建議? – svennergr
此外:我可以滾動scrollview,當我集中一個EditText,但是當我沒有集中任何東西時,我不能滾動它。 – svennergr