Developing an application in Eclipse , I ran into a problem. I need to make the main layout ( main.xml ) scrollable. That is, so that with a large number of elements on the screen it can be scrolled down with a finger. For this, I used ScrollView , but I cannot compile and run the program. The compiler gives an error in these lines:
<?xml version="1.0" encoding="utf-8"?> <ScrollView android:id="@+id/ScrollView1" android:layout_width="match_parent" android:layout_height="wrap_content" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" Here is the code itself:
<?xml version="1.0" encoding="utf-8"?> <ScrollView android:id="@+id/ScrollView1" android:layout_width="match_parent" android:layout_height="wrap_content" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/LinearLayout1" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:background="@drawable/background" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:isScrollContainer="true" tools:context=".MainActivity" > <TextView android:id="@+id/textViewPhoneNo" android:text="ΠΠΎΠΌΡ :" android:layout_width="0dp" android:layout_height="0dp" android:textAppearance="?android:attr/textAppearanceLarge" /> <EditText android:id="@+id/editTextTo" android:layout_width="0dp" android:layout_height="0dp" android:inputType="textEmailAddress" > <requestFocus /> </EditText> <TextView android:id="@+id/textViewSubject" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="ΠΠ°Π³ΠΎΠ»ΠΎΠ²ΠΎΠΊ :" android:textAppearance="?android:attr/textAppearanceLarge" /> <EditText android:id="@+id/editTextSubject" android:layout_width="fill_parent" android:layout_height="45dp" /> <TextView android:id="@+id/textViewMessage" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="ΠΠ°ΡΠ° ΠΈΡΡΠΎΡΠΈΡ :" android:textAppearance="?android:attr/textAppearanceLarge" /> <EditText android:id="@+id/editTextMessage" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="top" /> <Button android:id="@+id/buttonSend" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="ΠΡΠΏΡΠ°Π²ΠΈΡΡ" /> <Button android:id="@+id/btnInfo" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Π ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΈ" android:onClick="onclock" />" <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/message_text" android:autoLink="web" /> </LinearLayout> </ScrollView>