Reputation: 7238
I do have a simple login view like shown below.
If any EditText
gains focus, the keyboard will be shown (soft). The red dashed line should outline this behavior:
What I need is, that the Buttons at the bottom (Signup & Help) are invisible while Keyboard is showing. The bottom end of the login button should be over the keyboard, so that both EditTexts
and the Login Button
are visible.
At best half of the Logo should be visible if possible (depending on screen size)
It would be perfectly fine to define an extra layout xml like "keyboard is visible" if that's possible.
Upvotes: 24
Views: 18838
Reputation: 3670
1) ScrollView
as parent layout so that it can be scrolled by user.
2) using only adjustResize
3) Use software keyboard show/hide event to have more control. You can set visibility of the layout below login button with View.GONE while keyboard is visibe.
extra:
Check Specifying the Input Method Type . Next and Done actions for convenience of user
Upvotes: 7
Reputation: 9700
You can manage it by few steps. When KeyBoard
popup then do the following steps or you can wrap these in a method...
scrollTo()
method.Upvotes: 1
Reputation: 3017
Do somthing like dis. Here "android:name" is your activity.
<activity
android:name="com.example.tryitonjewelry.EnterStoreRegisterNew"
android:label="@string/title_activity_enter_store_register_new"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.ENTERSTOREREGISTERNEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Upvotes: 3