Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/228.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 在对话框片段或来自FragmentActivity的弹出窗口上显示片段_Android_Android Layout_Android Fragments_Android Dialogfragment_Android Popupwindow - Fatal编程技术网

Android 在对话框片段或来自FragmentActivity的弹出窗口上显示片段

Android 在对话框片段或来自FragmentActivity的弹出窗口上显示片段,android,android-layout,android-fragments,android-dialogfragment,android-popupwindow,Android,Android Layout,Android Fragments,Android Dialogfragment,Android Popupwindow,我有我的表情图标的代码,如果用户点击表情图标,我想显示这些代码。我不能在键盘之间切换,所以我也可以这样做 //R.layout.popup\u项目 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:em

我有我的表情图标的代码,如果用户点击表情图标,我想显示这些代码。我不能在键盘之间切换,所以我也可以这样做

//R.layout.popup\u项目

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:emojicon="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
tools:context="com.rockerhieu.emojicon.example.MainActivity$PlaceholderFragment" >

<com.rockerhieu.emojicon.EmojiconTextView
    android:id="@+id/txtEmojicon"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"/>

<com.rockerhieu.emojicon.EmojiconEditText
    android:id="@+id/editEmojicon"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    emojicon:emojiconSize="28sp" />

<fragment
    android:id="@+id/emojicons"
    android:layout_width="fill_parent"
    android:layout_height="220dp"
    class="com.rockerhieu.emojicon.EmojiconsFragment" />
您可以使用我的图书馆: 这显示了一个弹出窗口,在软键盘上有表情符号

 View popUp = getLayoutInflater().inflate(R.layout.popup_item, null);
            window = new PopupWindow(getApplicationContext());
            window = new PopupWindow(popUp,LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT,true);
            window.setAnimationStyle(android.R.style.Animation_Activity);
            window.showAtLocation(popUp, Gravity.BOTTOM, 0, 0);
            window.setFocusable(true);
            window.setOutsideTouchable(true);