Emojicon in ListFragment
See original GitHub issueHi rockerhieu,
First, thanks for the great library, I’m trying to use your library in my project, I’m using listfragment, the code is below,
public class DetailsFragment extends ListFragment implements
LoaderCallbacks<Cursor>,
EmojiconGridFragment.OnEmojiconClickedListener,
EmojiconsFragment.OnEmojiconBackspaceClickedListener {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle args = getArguments();
getLoaderManager().initLoader(0, null, this);
}
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.details_listview, container, false);
}
@Override
public void onEmojiconClicked(Emojicon emojicon) {
EmojiconsFragment.input(comment, emojicon);
}
@Override
public void onEmojiconBackspaceClicked(View v) {
EmojiconsFragment.backspace(comment);
}
@Override
public void onEmojiconClicked(Emojicon emojicon) {
EmojiconsFragment.input(mEditEmojicon, emojicon);
}
@Override
public void onEmojiconBackspaceClicked(View v) {
EmojiconsFragment.backspace(mEditEmojicon);
}
}
Once I add the fragment below, to the layout
<fragment
android:id="@+id/emojicons"
android:layout_width="match_parent"
android:layout_height="220dp"
class="com.rockerhieu.emojicon.EmojiconsFragment" />
I get the error below (abbreviated),
Binary XML file line #38: Error inflating class fragment Caused by: android.view.InflateException: Binary XML file line #38: Error inflating class fragment Caused by: java.lang.IllegalArgumentException: com.sso.android.shora.SsoActivity@42c28918 must implement interface OnEmojiconBackspaceClickedListener
when I remove the <fragment> part everything works fine, is it possible to use your library with ListFragment?
Please let me know if you need more details.
Issue Analytics
- State:
- Created 9 years ago
- Comments:6 (3 by maintainers)
Error:(36, 13) Failed to resolve: com.rockerhieu.emojicon:library:1.1-SNAPSHOT Show in File
Show in Project Structure dialog
For Eclipse, you can reference the source code on
master
, so yesgit clone https://github.com/rockerhieu/emojicon.git
sounds good.