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