
这就是它现在的表现.
我希望它看起来像这样.
我使用了adjustPan和amp;针对android的adjustResize:windowsoftinputMode但没有任何改变.
这是我的XML布局.
<relativeLayout androID:ID="@+ID/base" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:background="@drawable/bg_type" androID:keepScreenOn="true" androID:orIEntation="vertical" > <ImageVIEw androID:ID="@+ID/own" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_alignParentleft="true" androID:layout_alignParenttop="true" androID:layout_marginleft="120dp" androID:layout_margintop="160dp" androID:contentDescription="@string/image" androID:src="@drawable/own" /> <ImageVIEw androID:ID="@+ID/a" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_aligntop="@+ID/own" androID:layout_marginleft="75dp" androID:layout_toRightOf="@+ID/own" androID:contentDescription="@string/image" androID:src="@drawable/a_pressed" /> <ImageVIEw androID:ID="@+ID/b" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_aligntop="@+ID/a" androID:layout_marginleft="20dp" androID:layout_toRightOf="@+ID/a" androID:contentDescription="@string/image" androID:src="@drawable/b" /> <ImageVIEw androID:ID="@+ID/c" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_aligntop="@+ID/b" androID:layout_marginleft="20dp" androID:layout_toRightOf="@+ID/b" androID:contentDescription="@string/image" androID:src="@drawable/c" /> <FrameLayout androID:ID="@+ID/txtlayer" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_centerVertical="true" androID:layout_marginleft="160dp" > <com.empite.telegramstop.Txt androID:ID="@+ID/txt" androID:layout_wIDth="820dp" androID:layout_height="200dp" androID:gravity="top" androID:imeOptions="actionNext" androID:inputType="textMultiline" androID:nextFocusleft="@ID/txt" androID:nextFocusUp="@ID/txt" androID:padding="10dp" androID:text="@string/msg_a" androID:textSize="25dp" androID:textStyle="bold" androID:typeface="monospace" > <requestFocus /> </com.empite.telegramstop.Txt> </FrameLayout> <TextVIEw androID:ID="@+ID/remain" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_alignRight="@+ID/c" androID:layout_centerVertical="false" androID:layout_marginRight="-15dp" androID:layout_margintop="325dp" androID:gravity="center" androID:text="@string/remaining" androID:textcolor="@color/remain" androID:textSize="40dp" androID:textStyle="bold" androID:visibility="visible" /> <ImageVIEw androID:ID="@+ID/nxt" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_alignleft="@+ID/remain" androID:layout_below="@+ID/c" androID:layout_marginleft="20dp" androID:layout_margintop="148dp" androID:contentDescription="@string/image" androID:scaleType="center" androID:src="@drawable/bt_next" /> <relativeLayout androID:ID="@+ID/relativeLayout2" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_alignleft="@+ID/own" androID:layout_below="@+ID/txtlayer" androID:layout_margintop="290dp" androID:background="@drawable/panel_type_code" > <EditText androID:ID="@+ID/no1" androID:layout_wIDth="55dp" androID:layout_height="75dp" androID:layout_alignParentleft="true" androID:layout_marginleft="275dp" androID:layout_margintop="18dp" androID:background="@null" androID:gravity="center" androID:imeOptions="actionDone" androID:inputType="number" androID:maxlines="1" androID:textSize="45dp" androID:textStyle="bold" androID:typeface="serif" /> <EditText androID:ID="@+ID/no2" androID:layout_wIDth="55dp" androID:layout_height="75dp" androID:layout_alignBaseline="@+ID/no1" androID:layout_alignBottom="@+ID/no1" androID:layout_marginleft="10dp" androID:layout_toRightOf="@+ID/no1" androID:background="@null" androID:ems="10" androID:gravity="center" androID:imeOptions="actionDone" androID:inputType="number" androID:textSize="45dp" androID:textStyle="bold" androID:typeface="serif" /> <EditText androID:ID="@+ID/no3" androID:layout_wIDth="55dp" androID:layout_height="75dp" androID:layout_alignBaseline="@+ID/no2" androID:layout_alignBottom="@+ID/no2" androID:layout_marginleft="10dp" androID:layout_toRightOf="@+ID/no2" androID:background="@null" androID:ems="10" androID:gravity="center" androID:imeOptions="actionDone" androID:inputType="number" androID:textSize="45dp" androID:textStyle="bold" androID:typeface="serif" /> <EditText androID:ID="@+ID/no4" androID:layout_wIDth="55dp" androID:layout_height="75dp" androID:layout_alignBaseline="@+ID/no3" androID:layout_alignBottom="@+ID/no3" androID:layout_marginleft="9dp" androID:layout_toRightOf="@+ID/no3" androID:background="@null" androID:ems="10" androID:gravity="center" androID:imeOptions="actionDone" androID:inputType="number" androID:textSize="45dp" androID:textStyle="bold" androID:typeface="serif" /> <EditText androID:ID="@+ID/no5" androID:layout_wIDth="55dp" androID:layout_height="75dp" androID:layout_alignBaseline="@+ID/no4" androID:layout_alignBottom="@+ID/no4" androID:layout_marginleft="9dp" androID:layout_toRightOf="@+ID/no4" androID:background="@null" androID:ems="10" androID:gravity="center" androID:imeOptions="actionDone" androID:inputType="number" androID:textSize="45dp" androID:textStyle="bold" androID:typeface="serif" /> <EditText androID:ID="@+ID/no6" androID:layout_wIDth="55dp" androID:layout_height="75dp" androID:layout_alignBaseline="@+ID/no5" androID:layout_alignBottom="@+ID/no5" androID:layout_marginleft="10dp" androID:layout_toRightOf="@+ID/no5" androID:background="@null" androID:ems="10" androID:gravity="center" androID:imeOptions="actionDone" androID:inputType="number" androID:textSize="45dp" androID:textStyle="bold" androID:typeface="serif" /> </relativeLayout> <EditText androID:ID="@+ID/editText1" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:background="@null" androID:ems="10" androID:visibility="visible" /></relativeLayout>解决方法 尝试这可能是使用完全调整清单
<activity androID:windowsoftinputMode="adjustResize" androID:name=".youractivity" androID:label="@string/app_name" >
并看到这move up text view only when virtual keyboard open on android
总结以上是内存溢出为你收集整理的当专注于它时,将Android Edittext向上移动一点点全部内容,希望文章能够帮你解决当专注于它时,将Android Edittext向上移动一点点所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)