Is there a way to have EditText on Image so that when clicked open Soft KeyBoard while ImageView wont change its position?

My activity is having selected image from user and an editText to get user input. My problem is when editText clicked it opens softkeyboard that push Image upside to have bad user experience. I can resize or reduce image size but that I don't want. Will appreciate if somebody can provide ways to have Edittext displayed over Image so that when clicked open Soft Keyboard without changing image position. Can it be possible through RelativeLayout? Don't know if there could be other ways to get desired solution? Thanks in advance for your help!!!

My XML file

 <RelativeLayout
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:layout_below ="@id/appbar"
  android:padding="20dp"
  android:background="@color/cardview_dark_background">
   <RelativeLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">
    <ImageView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/displayimage"

        />
    </RelativeLayout>
    <RelativeLayout
        android:id="@+id/newMessageContainer"
        android:orientation="horizontal"
        android:foregroundGravity="bottom"

        android:layout_alignParentBottom="true"

        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <EditText
            android:id="@+id/newMessage"
            android:focusedByDefault="false"
            android:layout_alignParentStart="true"
            android:layout_alignParentLeft="true"
            android:layout_toLeftOf="@+id/editlayout"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>
        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:id="@+id/editlayout"
            android:layout_alignParentEnd="true"
            android:layout_alignParentRight="true">

            <Button
                android:id="@+id/send"
                android:text="Send"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />
        </LinearLayout>
     </RelativeLayout>


    </RelativeLayout>

You must prefer Framelayout as parent for Imageview and EditText.

Framelayout is designed to display a stack of child View controls. Multiple view controls can be added to this layout.

You can, however, add multiple children to a FrameLayout and control their position within the FrameLayout by assigning gravity to each child, using the android:layout_gravity attribute.

So you can avoid the problem caused by Softkeyboards as framelayout won't hold relative positionings.

Working with the Soft Keyboard, The Android system shows an on-screen keyboard, known as a soft input you expect (such as whether it's a phone number or email address) and how the input If you want to test with the soft keyboard, be sure to open up the Android text field in your layout when the activity starts, it does not show the soft keyboard. 0 Firebase: snapshot.val is not a function or its return value is not iterable Mar 20 '19 0 Is there a way to have EditText on Image so that when clicked open Soft KeyBoard while ImageView wont change its position?

I think you can use image as a background for parent layout and then put edittext inside that layout. This procedure may be solved your problem.

How to move the layout up when the soft keyboard is shown android, 1 How to set footer fixed at bottom even if virtual keyboard is open? So the solution could be - turn of physical keyboard (via code) or force soft keyboard to Right now if I have many edit text and the keyboard appears, the last edit text are issue is that the “Config” page doesn't move to its original position if changing� This example demonstrate about How to set Image View in edit text. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.

Try making your Activity's windowSoftInputModeflag to adjustPan or adjustNothing in your AndroidMainfest.xml file inside your activity tag.

 <activity
       .....
       android:windowSoftInputMode="adjustPan"> 
    </activity>

Programatically:

 getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING); 

Documentation

Android TextInputLayout Example, Android TextInputLayout is a design component that comes with the Material Design The third EditText field has the floating hint disabled. and while writing this tutorial, there's no way to change the position, yet. To display the error text, we'll have to call the method setError(String) on an But it doesn't seem to work ! I have a ListView, it is under action bar and above an EditText. See picture: The list view items have random height according to its content. When click list view item, I need to focus on EditText and open soft keyboard, meanwhile I want the one being clicked to be at top of the list view, for example if I click item2, I want to see:

in Android, This is the way to start an activity in Java, Kotlin and Kotlin with Anko: < ImageView android:id="@+id/image" android:layout_width="wrap_content" Playing along for a while, I wanted to change the font type to make my app look very cool -as You can play along closing and opening the soft keyboard depending on the� How to add on click event function above EditText icon image in android. Setting up onclicklistener() function is too difficult because there are lot’s of way to add click functionality above drawable image inside EditText, so here is the best solution to make your drawable icon works as real buttons. You can do anything on icon clicked event.

[Solved] Make text cursor position above soft keyboard in android , I tried scrolling the scrollView to bottom on EditText Click, But this won't work as the keyboard appears after the EditText onClick, and layout� If you plug in USB keyboard with an EditText field using an ActionId of EditorInfo.IME_ACTION_DONE the soft keyboard is not hidden if the user hits enter on the hard keyboard. The user can use the back key to hide the soft keyboard, but adding this code to onEditorAction with an actionId != EditorInfo.IME_ACTION_DONE test makes the UI act as

Login page using relative layout in android, Android Login Screen Code in XML: Linear Layout is the parent layout with adjustPan: The activity's main window is not resized to make room for the soft keyboard. So, in this tutorial we will show you how to create facebook style homepage to the right of the screen on a tablet while introducing an image on the left. How to remove/delete already typed text inside edittext to empty edittext on button click dynamically. In this tutorial we are programmatically removing the typed text from EditText so application user doesn’t need to remove text by hand back press keypad key. This will be possible using getText().clear() method. This method will first get

Comments
  • Thanx for the response..Explored this too!!! but image also move up when softkeyboard open. Looking for a solution with Image remain fixed at its place and can be zoomable as well while editText move up on the image when softkeyboard opened up.
  • Thanx for your response. This is easy way to do but then wont able to do anything on Image like zooming out or editing image..and hence not preferred this way. I want similar to what whatappp have when we post image.
  • With adjustNothing, softkeyboard is coming as expected but EditText still remain at its place. Believe EditText should be part of floating view?? What do u say..