【发布时间】:2019-01-25 01:42:43
【问题描述】:
我有一个RelativeLayout,其中顶部有一个EditText,底部有一个Button.. 当我单击EditText 时,我希望下一个Button 出现在上方键盘.. 我在Manifiest 中使用过调整面板,但它仍然不起作用
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.alimuzaffar.lib.pin.PinEntryEditText
android:id="@+id/txt_pin_entry"
android:focusable="true"
android:layout_below="@+id/tv_phoneno_otp"
android:layout_marginTop="@dimen/margin_top_otp_small"
android:layout_width="@dimen/otp_dimen"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/margin_left_otp"
android:cursorVisible="true"
app:pinLineColors="@color/colorPrimary"
android:digits="1234567890"
android:inputType="number"
android:maxLength="4"
android:textIsSelectable="true"
android:textSize="20sp"
android:layout_marginStart="@dimen/margin_left_otp" />
<Button
android:id="@+id/btn_next_btn_otp"
android:layout_width="@dimen/min_width"
android:layout_height="@dimen/min_width"
android:layout_alignParentRight="true"
android:background="@drawable/back_btn"
android:layout_marginRight="@dimen/margin_left_button_login"
android:layout_marginEnd="@dimen/margin_left_button_login"
android:layout_alignParentEnd="true"
android:layout_below="@+id/txt_pin_entry"
android:layout_marginTop="@dimen/margin_small_text_sub"/>
</RelativeLayout>
【问题讨论】:
-
我假设这不是您的完整布局?看起来您的
PinEntryEditText具有属性android:layout_below="@+id/tv_phoneno_otp"但该视图不存在。 -
嘿,你在清单文件中添加了什么?
标签: android android-layout android-softkeyboard autoresize adjustpan