将editText设为全屏

时间:2013-12-27 01:33:12

标签: android

当我想在其上键入内容时,我想让editText成为全屏。

类似这样的事情:

enter image description here

起初我没有做任何事情就能做到这一点,但后来我尝试使用外接键盘 - 因为使用软键盘阻止了我的一些editText - 而且它不会再像这样了。

我尝试使我的editText更大并使用scrollView,但我的应用程序有一个capture signature using Canvas,如果我把scrollView放在上面它就不会工作。

我的XML代码:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".myActivity" >

    <EditText
        android:id="@+id/edtText1"
        android:layout_width="300dip"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_weight="1"
        android:ems="10"
        android:gravity="top"
        android:inputType="textShortMessage|textAutoCorrect|textCapSentences|textMultiLine"
        android:windowSoftInputMode="stateVisible|adjustResize"
        android:imeOptions="actionSend|flagNoEnterAction"
        android:maxLines="1" />

    <LinearLayout
        android:id="@+id/linearLayout1"
        android:layout_width="350dp"
        android:layout_height="150dp">
    </LinearLayout>

</RelativeLayout>

我不是把所有东西放在这里,只是我认为我需要向你展示的那个。

我想让edtText1成为我上面给出的一个例子。

linearLayout1是捕获签名的画布,如果我放scrollview,我的linearLayout1将无效。 (scrollview正在运作)

0 个答案:

没有答案