在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:vanniktech/Emoji开源软件地址:https://github.com/vanniktech/Emoji开源编程语言:Kotlin 99.3%开源软件介绍:EmojiA library to add Emoji support to your Android app. Emojis can be picked in a PopupWindow. In order to edit and display text with Emojis this library provides public APIs:
There's also a Material Design Library bindings can be included via: implementation "com.vanniktech:emoji-material:0.9.0" There's also a The library has 4 different providers to choose from (iOS, Google, Facebook & Twitter). iOS EmojisFor getting the above iOS Emojis simply add the dependency and code below. implementation "com.vanniktech:emoji-ios:0.9.0" And install the provider in your application class. EmojiManager.install(new IosEmojiProvider()); For getting the above Google Emojis simply add the dependency and code below. implementation "com.vanniktech:emoji-google:0.9.0" And install the provider in your application class. EmojiManager.install(new GoogleEmojiProvider()); For getting the above Facebook Emojis simply add the dependency and code below. implementation "com.vanniktech:emoji-facebook:0.9.0" And install the provider in your application class. EmojiManager.install(new FacebookEmojiProvider()); For getting the above Twitter Emojis simply add the dependency and code below. implementation "com.vanniktech:emoji-twitter:0.9.0" And install the provider in your application class. EmojiManager.install(new TwitterEmojiProvider()); Custom EmojisIf you want to display your own Emojis you can create your own implementation of All of the core API lays in implementation "com.vanniktech:emoji:0.9.0" Set upInserting EmojisDeclare your <com.vanniktech.emoji.EmojiEditText
android:id="@+id/emojiEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:imeOptions="actionSend"
android:inputType="textCapSentences|textMultiLine"
android:maxLines="3"/> To open the final EmojiPopup emojiPopup = EmojiPopup.Builder.fromRootView(rootView).build(emojiEditText);
emojiPopup.toggle(); // Toggles visibility of the Popup.
emojiPopup.dismiss(); // Dismisses the Popup.
emojiPopup.isShowing(); // Returns true when Popup is showing. The Displaying Emojis<com.vanniktech.emoji.EmojiTextView
android:id="@+id/emojiTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/> Just use the EmojiPopup ListenersThe setOnSoftKeyboardCloseListener(OnSoftKeyboardCloseListener listener);
setOnEmojiClickListener(OnEmojiClickListener listener);
setOnSoftKeyboardOpenListener(OnSoftKeyboardOpenListener listener);
setOnEmojiPopupShownListener(OnEmojiPopupShownListener listener);
setOnEmojiPopupDismissListener(OnEmojiPopupDismissListener listener);
setOnEmojiBackspaceClickListener(OnEmojiBackspaceClickListener listener); EmojiPopup ConfigurationCustom Recent Emoji implementationYou can pass your own implementation of the recent Emojis. Implement the setRecentEmoji(yourClassThatImplementsRecentEmoji) If no instance or a null instance is set the default implementation will be used. Custom Variant Emoji implementationYou can pass your own implementation of the variant Emojis. Implement the setVariantEmoji(yourClassThatImplementsVariantEmoji) If no instance or a null instance is set the default implementation will be used. AnimationsCustom keyboard enter and exit animationsYou can pass your own animation style for enter and exit transitions of the Emoji keyboard while you're building the setKeyboardAnimationStyle(R.style.emoji_fade_animation_style); If no style is set the keyboard will appear and exit as a regular PopupWindow. This library currently ships with two animation styles as an example:
Custom page transformersYou can pass your own Page Transformer for the Emoji keyboard View Pager while you're building the setPageTransformer(new MagicTransformer()); If no transformer is set ViewPager will behave as its usual self. Please do note that this library currently does not ship any example Page Transformers. Other goodies
SnapshotsThis library is also distributed as a SNAPSHOT if you like to check out the latest features.
Add this to your repositories: maven { url "https://oss.sonatype.org/content/repositories/snapshots" } And one of these to your dependencies: implementation "com.vanniktech:emoji:0.10.0-SNAPSHOT"
implementation "com.vanniktech:emoji-ios:0.10.0-SNAPSHOT"
implementation "com.vanniktech:emoji-google:0.10.0-SNAPSHOT"
implementation "com.vanniktech:emoji-twitter:0.10.0-SNAPSHOT"
implementation "com.vanniktech:emoji-facebook:0.10.0-SNAPSHOT"
implementation "com.vanniktech:emoji-material:0.10.0-SNAPSHOT" ProguardNo configuration needed. LicenseCopyright (C) 2016 - Niklas Baudy, Ruben Gees, Mario Đanić and contributors Licensed under the Apache License, Version 2.0 |
2022-08-15
2022-08-17
2022-09-23
2023-10-27
2022-08-18
请发表评论