android - Show a fragment on a Dialog Fragment or Popupwindow from a FragmentActivity -
hi have code emojiicons want show if user clicks on emoji logo. cant make toggle between keyboard alternative doing this.
//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" />
when trying inflate layout using below code shows duplicate fragment error, means error in inflating. suggest, how inflate view 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);
you can use library : https://github.com/ankushsachdeva/emojicon shows popup window emojicons on soft keyboard
Comments
Post a Comment