Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emoji keyboard comes above normal keyboard #6

Open
remon opened this issue Oct 7, 2015 · 13 comments
Open

emoji keyboard comes above normal keyboard #6

remon opened this issue Oct 7, 2015 · 13 comments

Comments

@remon
Copy link

remon commented Oct 7, 2015

In emulator emoji works fine as expected
when I tested my app on actual device , the emoji view comes above normal keyboard not hiding it

screenshot_2015-10-07-03-09-42

in my android manifest I put this permission

     <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />

and here is my activity in android manifest

   <activity
            android:name=".ConversationShowActivity"
            android:label="@string/title_activity_conversation_show"
            android:launchMode="singleTask"
            android:parentActivityName=".MainActivity"
            android:theme="@style/AppTheme"
            android:windowSoftInputMode="adjustResize" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.reo.myapp.MainActivity" />
        </activity>

@meness
Copy link

meness commented Oct 7, 2015

I have three questions:

  1. What Android API the app is running on?
  2. Is the keyboard shown in the picture an AOSP keyboard?
  3. Did you change something about this library?

Please provide your whole chat activity codes.

I tested the library on API 18+ and everything is fine.

@remon
Copy link
Author

remon commented Oct 7, 2015

1- on alcatel one touch idol (android 4.3 jelly bean )
2- yes I think its an aosp keyboard
3- I didn't change any thing

it works on emulator very well ,but on actual device it behaves like that

here is my conversation show xml file

<com.reo.myapp.widgets.SizeNotifierRelativeLayout  xmlns:android="http://schemas.android.com/apk/res/android"
                xmlns:tools="http://schemas.android.com/tools"
                android:layout_width="match_parent"
                                                         android:id="@+id/chat_layout"
                android:layout_height="match_parent"
                android:background="@color/white"
                xmlns:fontawesometext="http://schemas.android.com/apk/res-auto"
                xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
                tools:context="com.reo.myapp.ConversationShowActivity">

    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"

        android:id="@+id/errorLayout"
        android:layout_gravity="center"
        android:layout_centerVertical="true"
        android:visibility="invisible"
        tools:visibilty="invisible"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true">

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:padding="5dp"

            android:text="Error loading conversation messages, Click here to try again"
            android:id="@+id/textView3"
            android:textColor="#ffff4314"
            android:textSize="20sp"
            android:textStyle="bold"/>
    </LinearLayout>

    <ProgressBar
        style="?android:attr/progressBarStyleLarge"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/convProgressBar"
        android:layout_centerVertical="true"
        android:layout_centerHorizontal="true"/>
    <RelativeLayout
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
android:background="@drawable/border_bottom"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:id="@+id/conv_header"
        android:paddingTop="10dp"
        android:paddingBottom="10dp"
        android:paddingRight="10dp"
        android:paddingLeft="10dp"
        android:padding="10dp">

        <ImageView
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:id="@+id/conv_avatar"
            android:src="@drawable/blank_avatar4"
            android:scaleType="fitXY"
            android:layout_marginRight="10dp"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Aboudi"
            android:id="@+id/conv_user_name"
            android:textColor="#000000"
            android:textSize="18sp"
            android:layout_alignTop="@+id/conv_avatar"
            android:layout_alignLeft="@+id/conv_online"
            android:layout_alignStart="@+id/conv_online"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="conv_online"
            android:id="@+id/conv_online"
            android:layout_below="@+id/conv_user_name"
            android:layout_toRightOf="@+id/conv_avatar"
            android:layout_toEndOf="@+id/conv_avatar"
            android:layout_marginTop="5dp"/>
        <LinearLayout
            android:id="@+id/profileFavBtn"
            android:layout_width="30dp"
            android:background="@drawable/heart_bg"
            android:layout_height="30dp"
            android:gravity="center"
            android:layout_marginRight="5dp"
            android:layout_marginLeft="5dp"
            android:layout_alignParentRight="false"
            android:layout_toLeftOf="@+id/profilegiftBtn"
            android:layout_centerVertical="true">
            <com.beardedhen.androidbootstrap.FontAwesomeText
android:id="@+id/profileFavText"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                fontawesometext:fa_icon="fa-heart-o"
                android:textColor="#B94309"
                android:textSize="20sp"
                />
        </LinearLayout>
        <LinearLayout
            android:id="@+id/profilegiftBtn"
            android:layout_width="30dp"
            android:background="@drawable/accept_btn_bg"
            android:layout_height="30dp"
            android:gravity="center"
            android:layout_marginRight="5dp"
            android:layout_marginLeft="5dp"
            android:layout_alignParentRight="false"
            android:layout_toLeftOf="@+id/profileReportBtn"
            android:layout_centerVertical="true">
            <com.beardedhen.androidbootstrap.FontAwesomeText

                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                fontawesometext:fa_icon="fa-gift"
                android:textColor="@color/white"
                android:textSize="20sp"
                />
        </LinearLayout>
        <LinearLayout
            android:id="@+id/profileReportBtn"
            android:layout_width="30dp"
            android:background="@drawable/report_btn_bg"
            android:layout_height="30dp"
            android:gravity="center"
            android:layout_marginRight="5dp"
            android:layout_marginLeft="5dp"
            android:layout_alignParentRight="false"
            android:layout_toLeftOf="@+id/profileBlockBtn"
            android:layout_centerVertical="true">
            <com.beardedhen.androidbootstrap.FontAwesomeText

                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                fontawesometext:fa_icon="fa-info"

                android:textColor="@color/white"

                android:textSize="20sp"
                />
        </LinearLayout>
        <LinearLayout
            android:id="@+id/profileBlockBtn"
            android:layout_width="30dp"
            android:background="@drawable/refuse_btn_bg"
            android:layout_height="30dp"
            android:gravity="center"
            android:layout_marginRight="5dp"
            android:layout_marginLeft="5dp"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true">
            <com.beardedhen.androidbootstrap.FontAwesomeText

                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                fontawesometext:fa_icon="fa-remove"

                android:textColor="@color/white"

                android:textSize="20sp"
                />
        </LinearLayout>
    </RelativeLayout>

    <ListView
        android:id="@+id/chat_list_view"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:divider="@drawable/chat_divider"
        android:layout_width="match_parent"
        android:scrollbarStyle="outsideOverlay"
        android:layout_below="@id/conv_header"
        android:layout_above="@+id/bottomlayout"
        android:layout_height="match_parent"></ListView>

    <LinearLayout
        android:id="@+id/bottomlayout"
        android:background="@drawable/profile_footer_border_top"
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_alignParentBottom="true"
        android:layout_height="wrap_content">




        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
            <TextView
                android:id="@+id/cant_send_text"
                android:layout_width="match_parent"
                android:text="You cant contact this member right now"
                android:layout_height="wrap_content"
                android:layout_alignParentTop="true"
                android:layout_alignParentBottom="false"
                android:layout_alignTop="@+id/chat_edit_text1"
                android:layout_alignBottom="@+id/chat_edit_text1"
                android:background="#ff4409"
                android:gravity="center"
                android:textColor="#ffffff"
                android:textSize="15sp"
                android:textStyle="bold"/>

            <ImageView android:src="@drawable/ic_msg_panel_smiles" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:layout_marginLeft="8dp" android:layout_marginRight="8dp"
                       android:layout_width="wrap_content" android:id="@+id/emojiButton" android:layout_alignBottom="@+id/chat_edit_text1" android:layout_marginBottom="8dp"
                       android:layout_height="wrap_content" />

            <EditText
                android:layout_marginTop="8dp"
                android:layout_marginBottom="8dp"
                android:id="@+id/chat_edit_text1"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:scrollHorizontally="false"
                android:layout_toLeftOf="@+id/enter_chat1"
                android:layout_toRightOf="@id/emojiButton"
                android:layout_toEndOf="@id/emojiButton"
                android:layout_toStartOf="@+id/enter_chat1"
                android:hint="Type your message here .."

                android:singleLine="false"
                android:inputType="textCapSentences"

                android:textSize="18sp"
                android:paddingLeft="4dp" />

            <ImageView android:layout_alignParentRight="true"
                       android:layout_alignParentEnd="true"
                       android:id="@+id/enter_chat1"
                       android:layout_width="wrap_content"
                       android:layout_marginBottom="8dp"
                       android:layout_height="wrap_content"
                       android:layout_alignBottom="@id/chat_edit_text1"
                       android:paddingLeft="13dp"
                       android:paddingStart="13dp"
                       android:paddingRight="17dp"
                       android:paddingEnd="17dp"
                       android:src="@drawable/ic_chat_send" />

        </RelativeLayout>



    </LinearLayout>
</com.reo.myapp.widgets.SizeNotifierRelativeLayout >

and I use the same code provided here , it's so strange actually

@remon
Copy link
Author

remon commented Oct 9, 2015

@alirezaaa it's on api 16

@remon
Copy link
Author

remon commented Oct 10, 2015

@alirezaaa I tested it today on an emulator with api 16 and it works there but not on my device

@remon
Copy link
Author

remon commented Oct 14, 2015

@alirezaaa @madhur , I didn't figure out what is the problem ,in emulator it works fine in most apis with virtual keyboard ,but in device it doesn't work as expected

@madhur
Copy link
Owner

madhur commented Oct 15, 2015

@remon Can you try installing telegram app in your phone and see if it works properly. If this doesn't work properly, i doubt other app will work fine as well

@remon
Copy link
Author

remon commented Oct 15, 2015

@madhur I have the telegram app installed and working

@remon
Copy link
Author

remon commented Oct 16, 2015

@alirezaaa @madhur The problem happens when the keyboard is open ,if I press the face icon and the keyboard not visible ,the emojiview works well ,do you know where is the problem ?

@remon
Copy link
Author

remon commented Oct 19, 2015

@madhur , @alirezaaa I posted the issue to on stackoverflow ,hope anyone can help me

http://stackoverflow.com/questions/33137248/add-view-over-keyboard-android

@remon
Copy link
Author

remon commented Oct 20, 2015

@madhur , @alirezaaa would you mind providing me a method to hide the keyboard when I click the emojiface so it will appear as normal

@madhur
Copy link
Owner

madhur commented Nov 28, 2015

I see you have a answer at
http://stackoverflow.com/questions/33137248/add-view-over-keyboard-android

Is there any bug in this library? If yes, it would be great if you could send a pull request.

@remon
Copy link
Author

remon commented Nov 30, 2015

no answer actually
also the same bug is here too
ankushsachdeva/emojicon#20

@remon
Copy link
Author

remon commented Nov 30, 2015

@madhur this library behaves well on my device , maybe can you check it and see how they handle they emojiview
https://github.com/w446108264/XhsEmoticonsKeyboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants