我有我的Emojiicons代码,如果用户点击表情符号,我想显示。我不能让它在键盘之间切换,以便我可以做到这一点。
// R.layout.popup_item
<?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" />
当我尝试使用下面的代码来扩充该布局时,它显示重复的片段错误,这意味着膨胀时出错。任何人都可以建议,如何从FragmentActivity中扩充该视图,
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);