I am having a EditText in the hierarchy of
<CoordinateLayout>
...
<NestedScrollView>
...
<RelativeLayout> <!-- This is inside an included xml layout -->
...
<EditText
android:id="@+id/rateCalculator"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:background="@color/colorPrimary"
android:inputType="number"
android:maxLength="5"
android:gravity="center"
android:textColor="#FFFFFF"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:paddingLeft="60dp" />
</RelativeLayout>
</NestedScrollView>
</CoordinateLayout>
The EditText
is being covered by the android soft-keyboard when it is being on focus! So I am unable to see what is being typed while typing!
Update:
This is my manifest code. Doesn't help!
<activity
android:name=".OfferRide"
android:label="@string/title_activity_offer_ride"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan"
android:theme="@style/AppTheme.NoActionBar" />
You can try adjustPan, adjustResize options available for windowSoftInputMode in your AndroidManifest as follows:
You can learn more about it from here
Here is the full doc: http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft
Flags:
Or sometimes java will do that:
Take a look:
https://stackoverflow.com/a/6122733/4409113
Removing the
gravity
from theEditText
made it! It seems to be a bug.Depending on behavior you want to get, you can use android:windowSoftInputMode="adjustResize" or android:windowSoftInputMode="adjustPan" on your activity declaration in Manifest.