мне нужно разработать приложение в полноэкранном режиме, и теперь у меня есть формула с некоторыми текстовыми правками и некоторыми кнопками. Если клавиатура всплывает, она скрывает две кнопки, поэтому я помещаю все в прокрутку:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dip"
tools:context="controller.RegsiterActivity" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/register_textview_firstname"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dip"
android:singleLine="true"
android:text="@string/text_firstname" />
<EditText
android:id="@+id/register_textedit_firstname"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dip"
android:inputType="text" />
<TextView
android:id="@+id/register_textview_lastname"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dip"
android:singleLine="true"
android:text="@string/text_lastname" />
<EditText
android:id="@+id/register_textedit_lastname"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dip"
android:inputType="text" />
<TextView
android:id="@+id/register_textview_email"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dip"
android:singleLine="true"
android:text="@string/text_email" />
<EditText
android:id="@+id/register_textedit_email"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dip"
android:inputType="textEmailAddress" />
<TextView
android:id="@+id/register_text_password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dip"
android:singleLine="true"
android:text="@string/text_password" />
<EditText
android:id="@+id/register_textedit_password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dip"
android:inputType="text" />
<Button
android:id="@+id/register_button_register"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/button_register" />
<Button
android:id="@+id/register_button_cancel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/button_cancel" />
</LinearLayout>
</ScrollView>
Как я уже сказал, мне нужно запустить приложение в полноэкранном режиме:
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
Но когда я сейчас запускаю свое приложение, не появляется scrollView, и прокрутка не работает.
Как заставить работать scrollView?
android:fillViewport="true"
- person santalu   schedule 25.10.2014scrollview
наmatch_parent
- person Panther   schedule 25.10.2014