So, I want to create a responsive Login Screen for my app, that would adjust itself with my choice when the android softkeyboard gets visible.
My Research:
Note: I know android:windowSoftInputMode="adjustResize"
this already so please don't suggest this only.
I have gone through a number of famous android apps like facebook etc. just to confirm weather it is a limitation to adjust screen with choice when softkeyboard gets visible.
Then I get across with Dropbox android app on my Samsung galaxy tab 2 which is a xlarge
screen. Now, when I tried to enter the email the screen adjusted itself in a very smooth and responsive manner. Similarly when I tried to enter the password then again the same thing happened. But I couldn't find any other opensource project which confirms such responsivity when softkeyboard appears.
Below are the screens which explain what I want to achieve in a similar fashion:
Please excuse me for the large sizes of images as I want to make my point clear. :)
Please note the responsiveness of screens. If you have the app installed. Also there is a size difference between password and email screens below.
The effect you're trying to achieve can done by setting android:scaleType="fitXY"
on an ImageView background.
Edit- also you might want to set in your manifest
<activity name=".YourActivity"
android:windowSoftInputMode="stateVisible|adjustResize">
</activity>
Right of the top I can think of using a LinearLayout with weights so that the widgets stretch appropriately. Use WRAP_CONTENT
for the heights of all the text widgets, and fill the remaining width with the ImageButton by setting the width = 0dp
and layout_weight = 1
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With