├── .github
└── workflows
│ └── android.yml
├── .gitignore
├── .idea
├── caches
│ ├── build_file_checksums.ser
│ └── gradle_models.ser
├── encodings.xml
├── gradle.xml
├── misc.xml
├── modules.xml
├── runConfigurations.xml
└── vcs.xml
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── hello
│ │ └── leavesC
│ │ └── chat
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── hello
│ │ │ └── leavesC
│ │ │ └── chat
│ │ │ ├── ChatApplication.java
│ │ │ ├── adapter
│ │ │ ├── ChatAdapter.java
│ │ │ ├── ConversationAdapter.java
│ │ │ ├── FriendAdapter.java
│ │ │ ├── GroupListAdapter.java
│ │ │ ├── GroupMembersAdapter.java
│ │ │ ├── SelectFriendAdapter.java
│ │ │ └── SystemMessageAdapter.java
│ │ │ ├── business
│ │ │ └── InitBusiness.java
│ │ │ ├── cache
│ │ │ ├── FriendCache.java
│ │ │ └── GroupCache.java
│ │ │ ├── model
│ │ │ ├── BaseConversation.java
│ │ │ ├── BaseMessage.java
│ │ │ ├── BaseProfile.java
│ │ │ ├── ChatConversation.java
│ │ │ ├── DefaultMessage.java
│ │ │ ├── FriendProfile.java
│ │ │ ├── GroupProfile.java
│ │ │ ├── GroupTipsMessage.java
│ │ │ ├── SystemConversation.java
│ │ │ ├── SystemGroupMessage.java
│ │ │ ├── SystemProfileTipsMessage.java
│ │ │ ├── SystemSnsMessage.java
│ │ │ └── TextMessage.java
│ │ │ ├── utils
│ │ │ ├── ConversationComparator.java
│ │ │ ├── FriendProfileComparator.java
│ │ │ ├── LetterUtil.java
│ │ │ ├── MessageFactory.java
│ │ │ ├── SpannableStringUtil.java
│ │ │ ├── SystemMessageComparator.java
│ │ │ └── TimeUtil.java
│ │ │ └── view
│ │ │ ├── MainActivity.java
│ │ │ ├── base
│ │ │ ├── BaseActivity.java
│ │ │ └── BaseFragment.java
│ │ │ ├── chat
│ │ │ └── ChatActivity.java
│ │ │ ├── contacts
│ │ │ ├── AlterFriendRemarkActivity.java
│ │ │ ├── ContactsFragment.java
│ │ │ └── FriendProfileActivity.java
│ │ │ ├── conversation
│ │ │ ├── ConversationFragment.java
│ │ │ └── SystemMessageListActivity.java
│ │ │ ├── friendship
│ │ │ ├── SearchUserActivity.java
│ │ │ └── SearchUserResultActivity.java
│ │ │ ├── group
│ │ │ ├── GroupListActivity.java
│ │ │ ├── GroupMemberProfileActivity.java
│ │ │ ├── GroupMembersActivity.java
│ │ │ ├── GroupProfileActivity.java
│ │ │ ├── GroupProfileModifyActivity.java
│ │ │ ├── InviteGroupMemberActivity.java
│ │ │ └── SelectFriendToCreateGroupActivity.java
│ │ │ ├── me
│ │ │ ├── AboutActivity.java
│ │ │ ├── AppIntroductionActivity.java
│ │ │ ├── MeFragment.java
│ │ │ └── ModifyInfoActivity.java
│ │ │ └── open
│ │ │ ├── LoginActivity.java
│ │ │ ├── OpenActivity.java
│ │ │ └── RegisterActivity.java
│ └── res
│ │ ├── drawable
│ │ ├── avatar_friend.png
│ │ ├── avatar_group.png
│ │ ├── avatar_group_member.png
│ │ ├── avatar_me.png
│ │ ├── avatar_system.png
│ │ ├── bird.png
│ │ ├── button_blue_background.xml
│ │ ├── button_red_background.xml
│ │ ├── chat_more.png
│ │ ├── divider.xml
│ │ ├── edit_text_background.xml
│ │ ├── edittext_background.xml
│ │ ├── error.png
│ │ ├── gender_female.png
│ │ ├── gender_male.png
│ │ ├── ic_launcher_background.xml
│ │ ├── message_friend_background.xml
│ │ ├── message_me_background.xml
│ │ ├── message_normal_friend.9.png
│ │ ├── message_normal_me.9.png
│ │ ├── message_selected_friend.9.png
│ │ ├── message_selected_me.9.png
│ │ ├── point.png
│ │ ├── pressed_background.xml
│ │ ├── selected.png
│ │ ├── text_view_hint_bg.xml
│ │ └── unselected.png
│ │ ├── layout
│ │ ├── activity_about.xml
│ │ ├── activity_alter_friend_remark.xml
│ │ ├── activity_app_introduction.xml
│ │ ├── activity_chat.xml
│ │ ├── activity_friend_profile.xml
│ │ ├── activity_group_list.xml
│ │ ├── activity_group_member_profile.xml
│ │ ├── activity_group_members.xml
│ │ ├── activity_group_profile.xml
│ │ ├── activity_group_profile_modify.xml
│ │ ├── activity_invite_group_member.xml
│ │ ├── activity_login.xml
│ │ ├── activity_main.xml
│ │ ├── activity_modify_info.xml
│ │ ├── activity_open.xml
│ │ ├── activity_register.xml
│ │ ├── activity_search_user.xml
│ │ ├── activity_search_user_result.xml
│ │ ├── activity_select_friend.xml
│ │ ├── activity_system_message_list.xml
│ │ ├── fragment_contacts.xml
│ │ ├── fragment_conversation.xml
│ │ ├── fragment_me.xml
│ │ ├── header_view_group.xml
│ │ ├── item_conversation.xml
│ │ ├── item_friend.xml
│ │ ├── item_friend_select.xml
│ │ ├── item_group.xml
│ │ ├── item_group_member.xml
│ │ ├── item_info.xml
│ │ ├── item_message_friend.xml
│ │ ├── item_message_me.xml
│ │ ├── item_message_system_hint.xml
│ │ ├── item_message_system_overall.xml
│ │ ├── layout_tool_bar.xml
│ │ └── layout_tool_bar_with_btn.xml
│ │ ├── menu
│ │ ├── chat.xml
│ │ ├── main.xml
│ │ └── set_remark.xml
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── hello
│ └── leavesC
│ └── chat
│ └── ExampleUnitTest.java
├── build.gradle
├── common
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── hello
│ │ └── leavesC
│ │ └── common
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── hello
│ │ │ └── leavesC
│ │ │ └── common
│ │ │ ├── common
│ │ │ ├── CircleImageView.java
│ │ │ ├── LetterIndexView.java
│ │ │ └── OptionView.java
│ │ │ ├── dialog
│ │ │ ├── ListPickerDialog.java
│ │ │ ├── LoadingDialog.java
│ │ │ ├── MessageDialog.java
│ │ │ └── SingleChoiceDialog.java
│ │ │ ├── input
│ │ │ ├── EmojiAdapter.java
│ │ │ ├── EmojiFragment.java
│ │ │ ├── EmojiKeyboard.java
│ │ │ ├── model
│ │ │ │ └── Emoji.java
│ │ │ └── utils
│ │ │ │ ├── EmojiUtils.java
│ │ │ │ └── SpanStringUtils.java
│ │ │ ├── recycler
│ │ │ ├── common
│ │ │ │ ├── CommonItemDecoration.java
│ │ │ │ ├── CommonRecyclerViewAdapter.java
│ │ │ │ └── CommonRecyclerViewHolder.java
│ │ │ ├── util
│ │ │ │ └── RecyclerViewUtil.java
│ │ │ └── wrap
│ │ │ │ └── WrapRecyclerViewAdapter.java
│ │ │ └── utils
│ │ │ └── ScreenUtils.java
│ └── res
│ │ ├── anim
│ │ └── loading_dialog.xml
│ │ ├── drawable
│ │ ├── dialog_loading_bg.xml
│ │ ├── emoji_unselected.png
│ │ ├── loading.png
│ │ ├── more.png
│ │ ├── pressed_rectangle_background.xml
│ │ ├── smiley_0.png
│ │ ├── smiley_1.png
│ │ ├── smiley_10.png
│ │ ├── smiley_11.png
│ │ ├── smiley_12.png
│ │ ├── smiley_13.png
│ │ ├── smiley_14.png
│ │ ├── smiley_15.png
│ │ ├── smiley_16.png
│ │ ├── smiley_17.png
│ │ ├── smiley_18.png
│ │ ├── smiley_19.png
│ │ ├── smiley_2.png
│ │ ├── smiley_20.png
│ │ ├── smiley_21.png
│ │ ├── smiley_22.png
│ │ ├── smiley_23.png
│ │ ├── smiley_24.png
│ │ ├── smiley_25.png
│ │ ├── smiley_26.png
│ │ ├── smiley_27.png
│ │ ├── smiley_28.png
│ │ ├── smiley_29.png
│ │ ├── smiley_3.png
│ │ ├── smiley_30.png
│ │ ├── smiley_31.png
│ │ ├── smiley_32.png
│ │ ├── smiley_33.png
│ │ ├── smiley_34.png
│ │ ├── smiley_35.png
│ │ ├── smiley_36.png
│ │ ├── smiley_37.png
│ │ ├── smiley_38.png
│ │ ├── smiley_39.png
│ │ ├── smiley_4.png
│ │ ├── smiley_40.png
│ │ ├── smiley_41.png
│ │ ├── smiley_42.png
│ │ ├── smiley_43.png
│ │ ├── smiley_44.png
│ │ ├── smiley_45.png
│ │ ├── smiley_46.png
│ │ ├── smiley_47.png
│ │ ├── smiley_48.png
│ │ ├── smiley_49.png
│ │ ├── smiley_5.png
│ │ ├── smiley_50.png
│ │ ├── smiley_51.png
│ │ ├── smiley_52.png
│ │ ├── smiley_53.png
│ │ ├── smiley_54.png
│ │ ├── smiley_55.png
│ │ ├── smiley_56.png
│ │ ├── smiley_57.png
│ │ ├── smiley_58.png
│ │ ├── smiley_59.png
│ │ ├── smiley_6.png
│ │ ├── smiley_60.png
│ │ ├── smiley_61.png
│ │ ├── smiley_62.png
│ │ ├── smiley_63.png
│ │ ├── smiley_64.png
│ │ ├── smiley_65.png
│ │ ├── smiley_66.png
│ │ ├── smiley_67.png
│ │ ├── smiley_68.png
│ │ ├── smiley_69.png
│ │ ├── smiley_7.png
│ │ ├── smiley_70.png
│ │ ├── smiley_71.png
│ │ ├── smiley_72.png
│ │ ├── smiley_73.png
│ │ ├── smiley_74.png
│ │ ├── smiley_75.png
│ │ ├── smiley_76.png
│ │ ├── smiley_77.png
│ │ ├── smiley_78.png
│ │ ├── smiley_79.png
│ │ ├── smiley_8.png
│ │ ├── smiley_80.png
│ │ ├── smiley_81.png
│ │ ├── smiley_82.png
│ │ ├── smiley_83.png
│ │ ├── smiley_84.png
│ │ ├── smiley_85.png
│ │ ├── smiley_86.png
│ │ ├── smiley_87.png
│ │ ├── smiley_88.png
│ │ ├── smiley_89.png
│ │ ├── smiley_9.png
│ │ └── sounds.png
│ │ ├── layout
│ │ ├── dialog_loading.xml
│ │ ├── fragment_emoticon.xml
│ │ ├── input_emoticon.xml
│ │ ├── item_emoji.xml
│ │ └── view_option.xml
│ │ └── values
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── hello
│ └── leavesC
│ └── common
│ └── ExampleUnitTest.java
├── doc
└── key.jks
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── presenter
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── hello
│ │ └── leavesC
│ │ └── presenter
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── hello
│ │ │ └── leavesC
│ │ │ └── presenter
│ │ │ ├── event
│ │ │ ├── ChatActionEvent.java
│ │ │ ├── ConversationActionEvent.java
│ │ │ ├── FriendActionEvent.java
│ │ │ ├── GlobalActionEvent.java
│ │ │ ├── GroupActionEvent.java
│ │ │ ├── MessageActionEvent.java
│ │ │ ├── RefreshActionEvent.java
│ │ │ ├── SearchUserActionEvent.java
│ │ │ ├── SelfProfileActionEvent.java
│ │ │ ├── SplashActionEvent.java
│ │ │ └── base
│ │ │ │ ├── BaseActionEvent.java
│ │ │ │ ├── BaseCallbackEvent.java
│ │ │ │ └── BaseEvent.java
│ │ │ ├── liveData
│ │ │ ├── FriendEventLiveData.java
│ │ │ ├── GroupEventLiveData.java
│ │ │ ├── MessageEventLiveData.java
│ │ │ └── RefreshEventLiveData.java
│ │ │ ├── log
│ │ │ └── Logger.java
│ │ │ ├── model
│ │ │ ├── ConversationModel.java
│ │ │ ├── GroupMemberInfo.java
│ │ │ └── ProfileModel.java
│ │ │ ├── utils
│ │ │ └── TransformUtil.java
│ │ │ └── viewModel
│ │ │ ├── ChatViewModel.java
│ │ │ ├── ConversationViewModel.java
│ │ │ ├── GroupProfileViewModel.java
│ │ │ ├── LoginViewModel.java
│ │ │ ├── ModifyFriendProfileViewModel.java
│ │ │ ├── ModifySelfProfileViewModel.java
│ │ │ ├── RegisterViewModel.java
│ │ │ ├── SearchUserViewModel.java
│ │ │ ├── SelfProfileViewModel.java
│ │ │ ├── SplashViewModel.java
│ │ │ └── base
│ │ │ ├── BaseAndroidViewModel.java
│ │ │ ├── BaseViewModel.java
│ │ │ └── IViewModelAction.java
│ └── res
│ │ └── values
│ │ └── strings.xml
│ └── test
│ └── java
│ └── hello
│ └── leavesC
│ └── presenter
│ └── ExampleUnitTest.java
├── screenshot
├── 1.png
├── 2.png
├── 3.png
├── 4.png
├── 5.png
├── 6.png
├── _release_v2.2.9_2019-11-18_14_41_50.apk
├── alipay.jpg
└── wechat.png
├── sdk
├── .gitignore
├── build.gradle
├── libs
│ ├── imsdk.jar
│ ├── imsdk_group_ext.jar
│ ├── imsdk_msg_ext.jar
│ ├── imsdk_sns_ext.jar
│ ├── mobilepb.jar
│ ├── pinyin4j-2.5.0.jar
│ ├── qalsdk.jar
│ ├── tls_sdk.jar
│ └── wup-1.0.0-SNAPSHOT.jar
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── hello
│ │ └── leavesC
│ │ └── sdk
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── hello
│ │ │ └── leavesC
│ │ │ └── sdk
│ │ │ └── Constants.java
│ ├── jniLibs
│ │ ├── arm64-v8a
│ │ │ ├── lib_imcore_group_ext_gyp.so
│ │ │ ├── lib_imcore_jni_gyp.so
│ │ │ ├── lib_imcore_msg_ext_gyp.so
│ │ │ ├── lib_imcore_sns_ext_gyp.so
│ │ │ ├── libgnustl_shared.so
│ │ │ ├── libqalcodecwrapper.so
│ │ │ ├── libqalmsfboot.so
│ │ │ └── libwtcrypto.so
│ │ ├── armeabi-v7a
│ │ │ ├── lib_imcore_group_ext_gyp.so
│ │ │ ├── lib_imcore_jni_gyp.so
│ │ │ ├── lib_imcore_msg_ext_gyp.so
│ │ │ ├── lib_imcore_sns_ext_gyp.so
│ │ │ ├── libgnustl_shared.so
│ │ │ ├── libqalcodecwrapper.so
│ │ │ ├── libqalmsfboot.so
│ │ │ └── libwtcrypto.so
│ │ ├── armeabi
│ │ │ ├── lib_imcore_group_ext_gyp.so
│ │ │ ├── lib_imcore_jni_gyp.so
│ │ │ ├── lib_imcore_msg_ext_gyp.so
│ │ │ ├── lib_imcore_sns_ext_gyp.so
│ │ │ ├── libgnustl_shared.so
│ │ │ ├── libqalcodecwrapper.so
│ │ │ ├── libqalmsfboot.so
│ │ │ └── libwtcrypto.so
│ │ ├── x86
│ │ │ ├── lib_imcore_group_ext_gyp.so
│ │ │ ├── lib_imcore_jni_gyp.so
│ │ │ ├── lib_imcore_msg_ext_gyp.so
│ │ │ ├── lib_imcore_sns_ext_gyp.so
│ │ │ ├── libgnustl_shared.so
│ │ │ ├── libqalcodecwrapper.so
│ │ │ ├── libqalmsfboot.so
│ │ │ └── libwtcrypto.so
│ │ └── x86_64
│ │ │ ├── lib_imcore_group_ext_gyp.so
│ │ │ ├── lib_imcore_jni_gyp.so
│ │ │ ├── lib_imcore_msg_ext_gyp.so
│ │ │ ├── lib_imcore_sns_ext_gyp.so
│ │ │ ├── libgnustl_shared.so
│ │ │ ├── libqalcodecwrapper.so
│ │ │ ├── libqalmsfboot.so
│ │ │ └── libwtcrypto.so
│ └── res
│ │ └── values
│ │ └── strings.xml
│ └── test
│ └── java
│ └── hello
│ └── leavesC
│ └── sdk
│ └── ExampleUnitTest.java
└── settings.gradle
/.github/workflows/android.yml:
--------------------------------------------------------------------------------
1 | name: Android CI
2 |
3 | on: [push]
4 |
5 | jobs:
6 | build:
7 |
8 | runs-on: ubuntu-latest
9 |
10 | steps:
11 | - uses: actions/checkout@v2
12 | - name: set up JDK 1.8
13 | uses: actions/setup-java@v1
14 | with:
15 | java-version: 1.8
16 | - name: Build with Gradle
17 | run: ./gradlew build
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
--------------------------------------------------------------------------------
/.idea/caches/build_file_checksums.ser:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/.idea/caches/build_file_checksums.ser
--------------------------------------------------------------------------------
/.idea/caches/gradle_models.ser:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/.idea/caches/gradle_models.ser
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
23 |
24 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Round
2 | > 以下内容于 2019/08/09 修改
3 |
4 | 一个简简单单的 IM 应用
5 |
6 | 这是一个简单的IM应用,写这个应用的本意只是想练练手,暂且实现了私聊和群聊功能,后边再根据用户反馈情况再来更新吧~应用完全开源,觉得还不错的同学不如点击应用内的“赞赏支持”来赞助我喝杯咖啡?
7 |
8 | ### 下载地址:[Round](screenshot/_release_v2.2.9_2019-11-18_14_41_50.apk)
9 |
10 |  
11 |  
12 |  
13 |
14 |
15 | ### 账号
16 |
17 | 由于后台限制,目前只允许注册一百个账号,如果你发现注册不了,可以使用以下我预先注册好的几个账号
18 |
19 | - test1
20 | - test2
21 | - test3
22 | - test01
23 | - test02
24 | - test03
25 |
26 | 密码:12345678
27 |
28 | ### 赞赏支持
29 |
30 |  
31 |
32 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 | -keep class com.tencent.**{*;}
23 | -dontwarn com.tencent.**
24 | -keep class tencent.**{*;}
25 | -dontwarn tencent.**
26 | -keep class qalsdk.**{*;}
27 | -dontwarn qalsdk.**
28 |
29 | -dontwarn com.tencent.bugly.**
30 | -keep public class com.tencent.bugly.**{*;}
31 | -keep class android.support.**{*;}
32 |
33 | -dontwarn net.soureceforge.pinyin4j.**
34 | -dontwarn demo.**
35 | -keep class net.sourceforge.pinyin4j.** { *;}
36 | -keep class demo.** { *;}
--------------------------------------------------------------------------------
/app/src/androidTest/java/hello/leavesC/chat/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat;
2 |
3 | import android.content.Context;
4 | import androidx.test.InstrumentationRegistry;
5 | import androidx.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.czy.chat", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/ChatApplication.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat;
2 |
3 | import android.app.Application;
4 |
5 | import hello.leavesC.chat.business.InitBusiness;
6 |
7 | /**
8 | * 作者:leavesC
9 | * 时间:2017/11/29 20:57
10 | * 描述:
11 | * GitHub:https://github.com/leavesC
12 | * Blog:https://www.jianshu.com/u/9df45b87cfdf
13 | * QQ:1990724437
14 | */
15 | public class ChatApplication extends Application {
16 |
17 | public static String identifier = "";
18 |
19 | @Override
20 | public void onCreate() {
21 | super.onCreate();
22 | InitBusiness.init(this);
23 | }
24 |
25 | }
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/adapter/GroupListAdapter.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat.adapter;
2 |
3 | import android.content.Context;
4 | import android.os.Bundle;
5 | import androidx.annotation.NonNull;
6 |
7 | import java.util.List;
8 |
9 | import hello.leavesC.chat.R;
10 | import hello.leavesC.chat.model.GroupProfile;
11 | import hello.leavesC.common.recycler.common.CommonRecyclerViewAdapter;
12 | import hello.leavesC.common.recycler.common.CommonRecyclerViewHolder;
13 |
14 | /**
15 | * 作者:叶应是叶
16 | * 时间:2018/1/7 20:19
17 | * 说明:群组列表Adapter
18 | */
19 | public class GroupListAdapter extends CommonRecyclerViewAdapter {
20 |
21 | public GroupListAdapter(Context context, List dataList) {
22 | super(context, dataList, R.layout.item_group);
23 | }
24 |
25 | @Override
26 | protected GroupProfile clone(GroupProfile data) {
27 | return new GroupProfile(data.getGroupDetailInfo(), data.getGroupBasicSelfInfo());
28 | }
29 |
30 | @Override
31 | protected boolean areItemsTheSame(int oldItemPosition, int newItemPosition) {
32 | return false;
33 | }
34 |
35 | @Override
36 | protected boolean areContentsTheSame(int oldItemPosition, int newItemPosition) {
37 | return false;
38 | }
39 |
40 | @NonNull
41 | @Override
42 | protected Bundle getChangePayload(int oldItemPosition, int newItemPosition) {
43 | return new Bundle();
44 | }
45 |
46 | @Override
47 | protected void partialBindData(CommonRecyclerViewHolder holder, @NonNull Bundle bundle) {
48 |
49 | }
50 |
51 | @Override
52 | protected void entirelyBindData(CommonRecyclerViewHolder holder, GroupProfile data, int position) {
53 | holder.setText(R.id.tv_groupList_name, data.getName());
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/adapter/GroupMembersAdapter.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat.adapter;
2 |
3 | import android.content.Context;
4 | import android.os.Bundle;
5 | import androidx.annotation.NonNull;
6 |
7 | import java.util.List;
8 |
9 | import hello.leavesC.chat.R;
10 | import hello.leavesC.chat.cache.FriendCache;
11 | import hello.leavesC.presenter.model.GroupMemberInfo;
12 | import hello.leavesC.common.recycler.common.CommonRecyclerViewAdapter;
13 | import hello.leavesC.common.recycler.common.CommonRecyclerViewHolder;
14 |
15 | /**
16 | * 作者:叶应是叶
17 | * 时间:2018/1/22 22:05
18 | * 说明:群组成员Adapter
19 | */
20 | public class GroupMembersAdapter extends CommonRecyclerViewAdapter {
21 |
22 | public GroupMembersAdapter(Context context, List dataList) {
23 | super(context, dataList, R.layout.item_group_member);
24 | }
25 |
26 | @Override
27 | protected GroupMemberInfo clone(GroupMemberInfo data) {
28 | return new GroupMemberInfo(data.getIdentifier(), data.getJoinTime(), data.getRoleType());
29 | }
30 |
31 | @Override
32 | protected boolean areItemsTheSame(int oldItemPosition, int newItemPosition) {
33 | return false;
34 | }
35 |
36 | @Override
37 | protected boolean areContentsTheSame(int oldItemPosition, int newItemPosition) {
38 | return false;
39 | }
40 |
41 | @NonNull
42 | @Override
43 | protected Bundle getChangePayload(int oldItemPosition, int newItemPosition) {
44 | return new Bundle();
45 | }
46 |
47 | @Override
48 | protected void partialBindData(CommonRecyclerViewHolder holder, @NonNull Bundle bundle) {
49 |
50 | }
51 |
52 | @Override
53 | protected void entirelyBindData(CommonRecyclerViewHolder holder, GroupMemberInfo data, int position) {
54 | holder.setText(R.id.tv_groupMember_name, FriendCache.getInstance().getFriendName(data.getIdentifier()));
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/adapter/SystemMessageAdapter.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat.adapter;
2 |
3 | import android.content.Context;
4 | import android.os.Bundle;
5 | import androidx.annotation.NonNull;
6 |
7 | import java.util.List;
8 |
9 | import hello.leavesC.chat.R;
10 | import hello.leavesC.chat.model.BaseMessage;
11 | import hello.leavesC.chat.model.SystemGroupMessage;
12 | import hello.leavesC.chat.model.SystemProfileTipsMessage;
13 | import hello.leavesC.chat.model.SystemSnsMessage;
14 | import hello.leavesC.chat.utils.TimeUtil;
15 | import hello.leavesC.common.recycler.common.CommonRecyclerViewAdapter;
16 | import hello.leavesC.common.recycler.common.CommonRecyclerViewHolder;
17 |
18 | /**
19 | * 作者:叶应是叶
20 | * 时间:2018/1/27 21:12
21 | * 说明:系统消息Adapter
22 | */
23 | public class SystemMessageAdapter extends CommonRecyclerViewAdapter {
24 |
25 | public SystemMessageAdapter(Context context, List dataList) {
26 | super(context, dataList, R.layout.item_message_system_overall);
27 | }
28 |
29 | @Override
30 | protected BaseMessage clone(BaseMessage data) {
31 | if (data instanceof SystemGroupMessage) {
32 | return new SystemGroupMessage(data.getMessage());
33 | }
34 | if (data instanceof SystemSnsMessage) {
35 | return new SystemSnsMessage(data.getMessage());
36 | }
37 | if (data instanceof SystemProfileTipsMessage) {
38 | return new SystemProfileTipsMessage(data.getMessage());
39 | }
40 | return null;
41 | }
42 |
43 | @Override
44 | protected boolean areItemsTheSame(int oldItemPosition, int newItemPosition) {
45 | return false;
46 | }
47 |
48 | @Override
49 | protected boolean areContentsTheSame(int oldItemPosition, int newItemPosition) {
50 | return false;
51 | }
52 |
53 | @NonNull
54 | @Override
55 | protected Bundle getChangePayload(int oldItemPosition, int newItemPosition) {
56 | return new Bundle();
57 | }
58 |
59 | @Override
60 | protected void partialBindData(CommonRecyclerViewHolder holder, @NonNull Bundle bundle) {
61 |
62 | }
63 |
64 | @Override
65 | protected void entirelyBindData(CommonRecyclerViewHolder holder, BaseMessage data, int position) {
66 | holder.setText(R.id.tv_systemMessage_lastMsgTime, TimeUtil.formatTime(data.getMessageTime() * 1000, TimeUtil.FORMAT_YYYY_MM_DD_HH_MM_SS))
67 | .setText(R.id.tv_systemMessage_msgContent, data.getMessageSummary());
68 | }
69 |
70 | }
71 |
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/business/InitBusiness.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat.business;
2 |
3 | import android.app.ActivityManager;
4 | import android.app.Application;
5 | import android.content.Context;
6 |
7 | import com.squareup.leakcanary.LeakCanary;
8 | import com.tencent.imsdk.TIMLogLevel;
9 | import com.tencent.imsdk.TIMManager;
10 | import com.tencent.imsdk.TIMSdkConfig;
11 |
12 | import hello.leavesC.chat.BuildConfig;
13 | import hello.leavesC.sdk.Constants;
14 |
15 | /**
16 | * 作者:叶应是叶
17 | * 时间:2018/10/3 17:44
18 | * 描述:
19 | */
20 | public class InitBusiness {
21 |
22 | public static void init(Application application) {
23 | initIM(application);
24 | initLeakCanary(application);
25 | }
26 |
27 | private static void initIM(Context context) {
28 | TIMSdkConfig sdkConfig = new TIMSdkConfig(Constants.SDK_APP_ID)
29 | .enableCrashReport(false)
30 | .setLogLevel(BuildConfig.isRelease ? TIMLogLevel.OFF : TIMLogLevel.WARN)
31 | .enableLogPrint(!BuildConfig.isRelease)
32 | .setLogPath("/chat/leavesC/logs/");
33 | TIMManager.getInstance().init(context, sdkConfig);
34 | }
35 |
36 | private static void initLeakCanary(Application application) {
37 | if (LeakCanary.isInAnalyzerProcess(application)) {
38 | return;
39 | }
40 | LeakCanary.install(application);
41 | }
42 |
43 | private static boolean isMainProcess(Context context) {
44 | return context.getPackageName().equals(getCurrentProcessName(context));
45 | }
46 |
47 | private static String getCurrentProcessName(Context context) {
48 | int pid = android.os.Process.myPid();
49 | String processName = null;
50 | ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
51 | if (manager != null) {
52 | for (ActivityManager.RunningAppProcessInfo process : manager.getRunningAppProcesses()) {
53 | if (process.pid == pid) {
54 | processName = process.processName;
55 | }
56 | }
57 | }
58 | return processName;
59 | }
60 |
61 | }
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/model/BaseMessage.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat.model;
2 |
3 | import android.text.SpannableString;
4 |
5 | import com.tencent.imsdk.TIMMessage;
6 | import com.tencent.imsdk.TIMMessageStatus;
7 |
8 | import hello.leavesC.chat.cache.FriendCache;
9 |
10 | /**
11 | * 作者:叶应是叶
12 | * 时间:2017/11/29 20:51
13 | * 说明:消息-基类
14 | */
15 | public abstract class BaseMessage {
16 |
17 | //消息体
18 | protected TIMMessage message;
19 |
20 | //发送者账号
21 | private String sender;
22 |
23 | //发送者称呼
24 | private String senderName;
25 |
26 | //消息状态
27 | private TIMMessageStatus messageStatus;
28 |
29 | //是否系统消息
30 | private boolean isSystemMessage;
31 |
32 | BaseMessage(TIMMessage message) {
33 | this.message = message;
34 | init();
35 | }
36 |
37 | private void init() {
38 | sender = message.getSender() == null ? "" : message.getSender();
39 | FriendProfile friendProfile = FriendCache.getInstance().getProfile(sender);
40 | senderName = friendProfile == null ? sender : friendProfile.getName();
41 | messageStatus = message.status();
42 | }
43 |
44 | //获取消息摘要
45 | public abstract SpannableString getMessageSummary();
46 |
47 | //获取消息
48 | public TIMMessage getMessage() {
49 | return message;
50 | }
51 |
52 | //消息是否自己发送的
53 | public boolean isSelf() {
54 | return message.isSelf();
55 | }
56 |
57 | //获取消息发送时间
58 | public long getMessageTime() {
59 | return message == null ? 0 : message.timestamp();
60 | }
61 |
62 | //消息ID
63 | public String getMsgId() {
64 | return message == null ? "" : message.getMsgId();
65 | }
66 |
67 | public String getSender() {
68 | return sender;
69 | }
70 |
71 | public String getSenderName() {
72 | return senderName;
73 | }
74 |
75 | public TIMMessageStatus getMessageStatus() {
76 | return messageStatus;
77 | }
78 |
79 | public boolean isSystemMessage() {
80 | return isSystemMessage;
81 | }
82 |
83 | void setSystemMessage(boolean systemMessage) {
84 | isSystemMessage = systemMessage;
85 | }
86 |
87 | }
88 |
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/model/BaseProfile.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat.model;
2 |
3 | import androidx.annotation.DrawableRes;
4 |
5 | /**
6 | * 作者:叶应是叶
7 | * 时间:2017/11/29 20:52
8 | * 说明:资料-基类
9 | */
10 | abstract class BaseProfile {
11 |
12 | abstract public String getIdentifier();
13 |
14 | abstract public String getName();
15 |
16 | @DrawableRes
17 | abstract public int getDefaultAvatarResource();
18 |
19 | abstract public String getAvatarUrl();
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/model/DefaultMessage.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat.model;
2 |
3 | import android.text.SpannableString;
4 |
5 | import com.tencent.imsdk.TIMMessage;
6 |
7 | /**
8 | * 作者:leavesC
9 | * 时间:2019/5/17 22:18
10 | * 描述:
11 | * GitHub:https://github.com/leavesC
12 | * Blog:https://www.jianshu.com/u/9df45b87cfdf
13 | */
14 | public class DefaultMessage extends BaseMessage {
15 |
16 | public DefaultMessage(TIMMessage message) {
17 | super(message);
18 | }
19 |
20 | @Override
21 | public SpannableString getMessageSummary() {
22 | return new SpannableString("[未知消息]");
23 | }
24 |
25 | }
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/model/FriendProfile.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat.model;
2 |
3 | import com.tencent.imsdk.TIMFriendGenderType;
4 | import com.tencent.imsdk.TIMUserProfile;
5 |
6 | import hello.leavesC.chat.R;
7 | import hello.leavesC.chat.utils.LetterUtil;
8 |
9 | /**
10 | * 作者:叶应是叶
11 | * 时间:2017/11/29 20:52
12 | * 说明:好友资料
13 | */
14 | public class FriendProfile extends BaseProfile {
15 |
16 | private TIMUserProfile userProfile;
17 |
18 | private boolean isSelected;
19 |
20 | public FriendProfile(TIMUserProfile userProfile) {
21 | this.userProfile = userProfile;
22 | }
23 |
24 | @Override
25 | public String getIdentifier() {
26 | return userProfile.getIdentifier();
27 | }
28 |
29 | @Override
30 | public String getName() {
31 | if (!"".equals(getRemark())) {
32 | return getRemark();
33 | } else if (!"".equals(getNickname())) {
34 | return getNickname();
35 | }
36 | return getIdentifier();
37 | }
38 |
39 | @Override
40 | public int getDefaultAvatarResource() {
41 | return R.drawable.avatar_friend;
42 | }
43 |
44 | @Override
45 | public String getAvatarUrl() {
46 | return userProfile.getFaceUrl();
47 | }
48 |
49 | public String getRemark() {
50 | return userProfile.getRemark();
51 | }
52 |
53 | public String getNickname() {
54 | return userProfile.getNickName();
55 | }
56 |
57 | public String getSelfSignature() {
58 | return userProfile.getSelfSignature();
59 | }
60 |
61 | public TIMFriendGenderType getGender() {
62 | return userProfile.getGender();
63 | }
64 |
65 | public String getLocation() {
66 | return userProfile.getLocation();
67 | }
68 |
69 | public String getNameHeaderLetter() {
70 | return String.valueOf(LetterUtil.getHeaderLetter(getName()));
71 | }
72 |
73 | public TIMUserProfile getUserProfile() {
74 | return userProfile;
75 | }
76 |
77 | public boolean isSelected() {
78 | return isSelected;
79 | }
80 |
81 | public void setSelected(boolean selected) {
82 | isSelected = selected;
83 | }
84 |
85 | }
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/model/SystemConversation.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat.model;
2 |
3 | import android.text.SpannableString;
4 |
5 | import com.tencent.imsdk.TIMConversation;
6 | import com.tencent.imsdk.TIMMessage;
7 | import com.tencent.imsdk.ext.message.TIMConversationExt;
8 |
9 | import java.util.List;
10 |
11 | import hello.leavesC.chat.utils.MessageFactory;
12 |
13 | /**
14 | * 作者:叶应是叶
15 | * 时间:2018/1/27 19:59
16 | * 说明:消息消息会话
17 | */
18 | public class SystemConversation extends BaseConversation {
19 |
20 | private static final String TAG = "SystemConversation";
21 |
22 | public SystemConversation(TIMConversation timConversation) {
23 | super(timConversation);
24 | }
25 |
26 | @Override
27 | protected void init() {
28 | peer = timConversation.getPeer();
29 | conversationType = timConversation.getType();
30 | name = "系统消息";
31 | TIMConversationExt conversationExt = new TIMConversationExt(timConversation);
32 | List lastMessageList = conversationExt.getLastMsgs(1);
33 | if (lastMessageList.size() > 0) {
34 | lastMessage = MessageFactory.getMessage(lastMessageList.get(0));
35 | } else {
36 | lastMessage = null;
37 | }
38 | lastMessageSummary = lastMessage == null ? new SpannableString("") : lastMessage.getMessageSummary();
39 | lastMessageTime = lastMessage == null ? 0 : lastMessage.getMessage().timestamp();
40 | unreadMessageNumber = timConversation == null ? 0 : conversationExt.getUnreadMessageNum();
41 | }
42 |
43 | @Override
44 | public void setLastMessage(BaseMessage lastMessage) {
45 | this.lastMessage = lastMessage;
46 | TIMConversationExt conversationExt = new TIMConversationExt(timConversation);
47 | lastMessageSummary = lastMessage == null ? new SpannableString("") : lastMessage.getMessageSummary();
48 | lastMessageTime = lastMessage == null ? 0 : lastMessage.getMessage().timestamp();
49 | unreadMessageNumber = timConversation == null ? 0 : conversationExt.getUnreadMessageNum();
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/model/SystemProfileTipsMessage.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat.model;
2 |
3 | import android.text.SpannableString;
4 |
5 | import com.tencent.imsdk.TIMMessage;
6 | import com.tencent.imsdk.TIMProfileSystemElem;
7 |
8 | import hello.leavesC.chat.ChatApplication;
9 | import hello.leavesC.chat.cache.FriendCache;
10 | import hello.leavesC.chat.utils.SpannableStringUtil;
11 |
12 | /**
13 | * 作者:叶应是叶
14 | * 时间:2018/2/1 20:01
15 | * 说明:
16 | */
17 | public class SystemProfileTipsMessage extends BaseMessage {
18 |
19 | private static final String TAG = "SystemProfileTipsMessage";
20 |
21 | public SystemProfileTipsMessage(TIMMessage message) {
22 | super(message);
23 | }
24 |
25 | @Override
26 | public SpannableString getMessageSummary() {
27 | TIMProfileSystemElem profileSystemElem = (TIMProfileSystemElem) message.getElement(0);
28 | String user = profileSystemElem.getFromUser();
29 | if (user.equals(ChatApplication.identifier)) {
30 | user = "你";
31 | } else {
32 | user = FriendCache.getInstance().getFriendName(user);
33 | }
34 | String hint = user + " 修改了个人资料";
35 | return SpannableStringUtil.parseForegroundColorSpan(hint, 0, user.length());
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/model/TextMessage.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat.model;
2 |
3 | import android.text.SpannableString;
4 |
5 | import com.tencent.imsdk.TIMElem;
6 | import com.tencent.imsdk.TIMFaceElem;
7 | import com.tencent.imsdk.TIMMessage;
8 | import com.tencent.imsdk.TIMTextElem;
9 | import com.tencent.imsdk.ext.message.TIMMessageDraft;
10 |
11 | import java.nio.charset.Charset;
12 |
13 | /**
14 | * 作者:叶应是叶
15 | * 时间:2017/11/29 20:53
16 | * 说明:文本消息
17 | */
18 | public class TextMessage extends BaseMessage {
19 |
20 | public TextMessage(TIMMessage message) {
21 | super(message);
22 | }
23 |
24 | public TextMessage(TIMMessageDraft draft) {
25 | super(getDraft(draft));
26 | }
27 |
28 | public TextMessage(String content) {
29 | super(getMessage(content));
30 | }
31 |
32 | private static TIMMessage getMessage(String content) {
33 | TIMTextElem textElem = new TIMTextElem();
34 | textElem.setText(content);
35 | TIMMessage message = new TIMMessage();
36 | message.addElement(textElem);
37 | return message;
38 | }
39 |
40 | private static TIMMessage getDraft(TIMMessageDraft draft) {
41 | TIMMessage message = new TIMMessage();
42 | for (TIMElem elem : draft.getElems()) {
43 | message.addElement(elem);
44 | }
45 | return message;
46 | }
47 |
48 | @Override
49 | public SpannableString getMessageSummary() {
50 | StringBuilder result = new StringBuilder();
51 | for (int i = 0; i < message.getElementCount(); ++i) {
52 | switch (message.getElement(i).getType()) {
53 | case Face:
54 | TIMFaceElem faceElem = (TIMFaceElem) message.getElement(i);
55 | byte[] data = faceElem.getData();
56 | if (data != null) {
57 | result.append(new String(data, Charset.forName("UTF-8")));
58 | }
59 | break;
60 | case Text:
61 | TIMTextElem textElem = (TIMTextElem) message.getElement(i);
62 | result.append(textElem.getText());
63 | break;
64 | }
65 | }
66 | return new SpannableString(result);
67 | }
68 |
69 | }
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/utils/ConversationComparator.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat.utils;
2 |
3 | import java.util.Comparator;
4 |
5 | import hello.leavesC.chat.model.BaseConversation;
6 |
7 | /**
8 | * 作者:叶应是叶
9 | * 时间:2017/12/10 13:20
10 | * 说明:会话列表按时间排序
11 | */
12 | public class ConversationComparator implements Comparator {
13 |
14 | @Override
15 | public int compare(BaseConversation o1, BaseConversation o2) {
16 | long time1 = o1.getLastMessageTime();
17 | long time2 = o2.getLastMessageTime();
18 | return Long.compare(time2, time1);
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/utils/FriendProfileComparator.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat.utils;
2 |
3 | import java.util.Comparator;
4 |
5 | import hello.leavesC.chat.model.FriendProfile;
6 |
7 | /**
8 | * 作者:叶应是叶
9 | * 时间:2017/11/29 20:55
10 | * 说明:好友列表按称呼排序
11 | */
12 | public class FriendProfileComparator implements Comparator {
13 |
14 | @Override
15 | public int compare(FriendProfile o1, FriendProfile o2) {
16 | String name_1 = o1.getName();
17 | String name_2 = o2.getName();
18 | if (name_1.equals(name_2)) {
19 | return 0;
20 | }
21 | int minLength = Math.min(name_1.length(), name_2.length());
22 | char headerLetter_1;
23 | char headerLetter_2;
24 | for (int i = 0; i < minLength; i++) {
25 | headerLetter_1 = name_1.charAt(i);
26 | headerLetter_2 = name_2.charAt(i);
27 | if (headerLetter_1 == headerLetter_2) {
28 | continue;
29 | }
30 | return LetterUtil.getHeaderLetter(headerLetter_1) > LetterUtil.getHeaderLetter(headerLetter_2) ? 1 : -1;
31 | }
32 | return name_1.length() > name_2.length() ? 1 : -1;
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/utils/MessageFactory.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat.utils;
2 |
3 | import com.tencent.imsdk.TIMMessage;
4 |
5 | import hello.leavesC.chat.model.BaseMessage;
6 | import hello.leavesC.chat.model.DefaultMessage;
7 | import hello.leavesC.chat.model.GroupTipsMessage;
8 | import hello.leavesC.chat.model.SystemGroupMessage;
9 | import hello.leavesC.chat.model.SystemProfileTipsMessage;
10 | import hello.leavesC.chat.model.SystemSnsMessage;
11 | import hello.leavesC.chat.model.TextMessage;
12 |
13 | /**
14 | * 作者:叶应是叶
15 | * 时间:2017/11/29 20:58
16 | * 说明:
17 | */
18 | public class MessageFactory {
19 |
20 | private static final String TAG = "MessageFactory";
21 |
22 | private MessageFactory() {
23 |
24 | }
25 |
26 | public static BaseMessage getMessage(TIMMessage message) {
27 | switch (message.getElement(0).getType()) {
28 | case Text:
29 | return new TextMessage(message);
30 | case GroupTips:
31 | return new GroupTipsMessage(message);
32 | case GroupSystem:
33 | return new SystemGroupMessage(message);
34 | case SNSTips:
35 | return new SystemSnsMessage(message);
36 | case ProfileTips:
37 | return new SystemProfileTipsMessage(message);
38 | case Face:
39 | case Image:
40 | case Sound:
41 | case Location:
42 | case File:
43 | case Custom:
44 | case Video:
45 | case UGC:
46 | default:
47 | return new DefaultMessage(message);
48 | }
49 | }
50 |
51 | }
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/utils/SpannableStringUtil.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat.utils;
2 |
3 | import android.graphics.Color;
4 | import android.text.SpannableString;
5 | import android.text.Spanned;
6 | import android.text.style.ForegroundColorSpan;
7 |
8 | /**
9 | * 作者:叶应是叶
10 | * 时间:2018/1/28 13:49
11 | * 说明:
12 | */
13 | public class SpannableStringUtil {
14 |
15 | public static SpannableString parseForegroundColorSpan(String content, int startIndex, int endIndex) {
16 | SpannableString spannableString = new SpannableString(content);
17 | ForegroundColorSpan foregroundColorSpan = new ForegroundColorSpan(Color.parseColor("#30cfff"));
18 | spannableString.setSpan(foregroundColorSpan, startIndex, endIndex, Spanned.SPAN_EXCLUSIVE_INCLUSIVE);
19 | return spannableString;
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/utils/SystemMessageComparator.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat.utils;
2 |
3 | import java.util.Comparator;
4 |
5 | import hello.leavesC.chat.model.BaseMessage;
6 |
7 | /**
8 | * 作者:叶应是叶
9 | * 时间:2018/1/27 21:57
10 | * 说明:系统消息按时间排序
11 | */
12 | public class SystemMessageComparator implements Comparator {
13 |
14 | @Override
15 | public int compare(BaseMessage o1, BaseMessage o2) {
16 | long time1 = o1.getMessageTime();
17 | long time2 = o2.getMessageTime();
18 | return Long.compare(time2, time1);
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/view/group/GroupListActivity.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat.view.group;
2 |
3 | import android.os.Bundle;
4 | import androidx.core.content.ContextCompat;
5 | import androidx.recyclerview.widget.LinearLayoutManager;
6 | import androidx.recyclerview.widget.RecyclerView;
7 |
8 | import com.tencent.imsdk.TIMConversationType;
9 |
10 | import java.util.ArrayList;
11 | import java.util.List;
12 | import java.util.Map;
13 |
14 | import hello.leavesC.chat.R;
15 | import hello.leavesC.chat.adapter.GroupListAdapter;
16 | import hello.leavesC.chat.cache.GroupCache;
17 | import hello.leavesC.chat.model.GroupProfile;
18 | import hello.leavesC.chat.view.base.BaseActivity;
19 | import hello.leavesC.chat.view.chat.ChatActivity;
20 | import hello.leavesC.common.recycler.common.CommonItemDecoration;
21 | import hello.leavesC.presenter.viewModel.base.BaseViewModel;
22 |
23 | /**
24 | * 作者:叶应是叶
25 | * 时间:2018/1/7 20:18
26 | * 说明:群组列表界面
27 | */
28 | public class GroupListActivity extends BaseActivity {
29 |
30 | private List groupProfileList;
31 |
32 | private GroupListAdapter groupListAdapter;
33 |
34 | @Override
35 | protected void onCreate(Bundle savedInstanceState) {
36 | super.onCreate(savedInstanceState);
37 | setContentView(R.layout.activity_group_list);
38 | setToolbarTitle("群列表");
39 | RecyclerView rv_groupList = findViewById(R.id.rv_groupList);
40 | rv_groupList.setLayoutManager(new LinearLayoutManager(this));
41 | rv_groupList.addItemDecoration(new CommonItemDecoration(ContextCompat.getDrawable(getContext(), R.drawable.divider), LinearLayoutManager.VERTICAL));
42 | groupProfileList = new ArrayList<>();
43 | groupProfileList.addAll(GroupCache.getInstance().getAllGroup());
44 | groupListAdapter = new GroupListAdapter(this, groupProfileList);
45 | groupListAdapter.setClickListener(position -> {
46 | ChatActivity.navigation(GroupListActivity.this, groupProfileList.get(position).getIdentifier(), TIMConversationType.Group);
47 | finish();
48 | });
49 | rv_groupList.setAdapter(groupListAdapter);
50 | GroupCache.getInstance().observe(this, this::handle);
51 | }
52 |
53 | private void handle(Map> stringListMap) {
54 | groupProfileList.clear();
55 | groupProfileList.addAll(GroupCache.getInstance().getAllGroup());
56 | groupListAdapter.setData(groupProfileList);
57 | }
58 |
59 | @Override
60 | protected BaseViewModel initViewModel() {
61 | return null;
62 | }
63 |
64 | }
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/view/me/AboutActivity.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat.view.me;
2 |
3 | import android.content.Intent;
4 | import android.net.Uri;
5 | import android.os.Bundle;
6 | import android.view.View;
7 |
8 | import androidx.lifecycle.ViewModel;
9 |
10 | import butterknife.ButterKnife;
11 | import butterknife.OnClick;
12 | import hello.leavesC.chat.BuildConfig;
13 | import hello.leavesC.chat.R;
14 | import hello.leavesC.chat.view.base.BaseActivity;
15 | import hello.leavesC.common.common.OptionView;
16 |
17 | /**
18 | * 作者:叶应是叶
19 | * 时间:2018/1/21 19:28
20 | * 说明:关于
21 | */
22 | public class AboutActivity extends BaseActivity {
23 |
24 | @Override
25 | protected void onCreate(Bundle savedInstanceState) {
26 | super.onCreate(savedInstanceState);
27 | setContentView(R.layout.activity_about);
28 | setToolbarTitle("关于");
29 | OptionView ov_version = findViewById(R.id.ov_version);
30 | ov_version.setContent("version:" + BuildConfig.VERSION_NAME + "\nbuildTime:" + BuildConfig.buildTime);
31 | ButterKnife.bind(this);
32 | }
33 |
34 | @Override
35 | protected ViewModel initViewModel() {
36 | return null;
37 | }
38 |
39 | @OnClick({R.id.ov_gitHub, R.id.ov_contact})
40 | void onClick(View view) {
41 | switch (view.getId()) {
42 | case R.id.ov_gitHub: {
43 | startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/leavesC/Chat")));
44 | break;
45 | }
46 | case R.id.ov_contact: {
47 | AppIntroductionActivity.navigation(AboutActivity.this, "联系方式", getString(R.string.about_contact));
48 | break;
49 | }
50 | }
51 | }
52 |
53 | }
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/view/me/AppIntroductionActivity.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat.view.me;
2 |
3 | import androidx.lifecycle.ViewModel;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.os.Bundle;
7 | import android.widget.TextView;
8 |
9 | import hello.leavesC.chat.R;
10 | import hello.leavesC.chat.view.base.BaseActivity;
11 |
12 | /**
13 | * 作者:叶应是叶
14 | * 时间:2018/1/21 21:25
15 | * 说明:应用简介界面
16 | */
17 | public class AppIntroductionActivity extends BaseActivity {
18 |
19 | private static final String TITLE = "title";
20 |
21 | private static final String CONTENT = "content";
22 |
23 | public static void navigation(Context context, String title, String content) {
24 | Intent intent = new Intent(context, AppIntroductionActivity.class);
25 | intent.putExtra(TITLE, title);
26 | intent.putExtra(CONTENT, content);
27 | context.startActivity(intent);
28 | }
29 |
30 | @Override
31 | protected void onCreate(Bundle savedInstanceState) {
32 | super.onCreate(savedInstanceState);
33 | setContentView(R.layout.activity_app_introduction);
34 | String title = getIntent().getStringExtra(TITLE);
35 | String content = getIntent().getStringExtra(CONTENT);
36 | TextView tv_introduction = findViewById(R.id.tv_appIntroduction);
37 | tv_introduction.setText(content);
38 | setToolbarTitle(title);
39 | }
40 |
41 | @Override
42 | protected ViewModel initViewModel() {
43 | return null;
44 | }
45 |
46 | }
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/view/open/LoginActivity.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat.view.open;
2 |
3 | import androidx.lifecycle.ViewModel;
4 | import androidx.lifecycle.ViewModelProviders;
5 | import android.content.Context;
6 | import android.content.Intent;
7 | import android.os.Bundle;
8 | import android.text.TextUtils;
9 | import android.widget.EditText;
10 |
11 | import hello.leavesC.chat.ChatApplication;
12 | import hello.leavesC.chat.R;
13 | import hello.leavesC.chat.view.MainActivity;
14 | import hello.leavesC.chat.view.base.BaseActivity;
15 | import hello.leavesC.presenter.viewModel.LoginViewModel;
16 |
17 | /**
18 | * 作者:叶应是叶
19 | * 时间:2017/11/29 21:16
20 | * 说明:登录界面
21 | */
22 | public class LoginActivity extends BaseActivity {
23 |
24 | public static final String IDENTIFIER = "identifier";
25 |
26 | private LoginViewModel loginViewModel;
27 |
28 | public static void navToLogin(Context context, String identifier) {
29 | Intent intent = new Intent(context, LoginActivity.class);
30 | intent.putExtra(IDENTIFIER, identifier);
31 | context.startActivity(intent);
32 | }
33 |
34 | @Override
35 | protected void onCreate(Bundle savedInstanceState) {
36 | super.onCreate(savedInstanceState);
37 | setContentView(R.layout.activity_login);
38 | initView();
39 | }
40 |
41 | private void initView() {
42 | setToolbarTitle("登录");
43 | EditText et_loginIdentifier = findViewById(R.id.et_loginIdentifier);
44 | EditText et_loginPassword = findViewById(R.id.et_loginPassword);
45 | String identifier = getIntent().getStringExtra(IDENTIFIER);
46 | if (TextUtils.isEmpty(identifier)) {
47 | identifier = loginViewModel.getLastUserIdentifier();
48 | }
49 | et_loginIdentifier.setText(identifier);
50 | if (!TextUtils.isEmpty(et_loginIdentifier.getText())) {
51 | et_loginPassword.requestFocus();
52 | }
53 | findViewById(R.id.btn_login).setOnClickListener(v -> {
54 | String identifier1 = et_loginIdentifier.getText().toString();
55 | String password = et_loginPassword.getText().toString();
56 | loginViewModel.login(identifier1, password);
57 | });
58 | }
59 |
60 | @Override
61 | protected ViewModel initViewModel() {
62 | loginViewModel = ViewModelProviders.of(this).get(LoginViewModel.class);
63 | loginViewModel.getLoginEventLiveData().observe(this, loginEvent -> {
64 | assert loginEvent != null;
65 | ChatApplication.identifier = loginEvent.getIdentifier();
66 | startActivity(MainActivity.class);
67 | finish();
68 | });
69 | return loginViewModel;
70 | }
71 |
72 | }
--------------------------------------------------------------------------------
/app/src/main/java/hello/leavesC/chat/view/open/RegisterActivity.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat.view.open;
2 |
3 | import androidx.lifecycle.ViewModel;
4 | import androidx.lifecycle.ViewModelProviders;
5 | import android.os.Bundle;
6 | import android.widget.EditText;
7 |
8 | import hello.leavesC.chat.R;
9 | import hello.leavesC.chat.view.base.BaseActivity;
10 | import hello.leavesC.presenter.model.ProfileModel;
11 | import hello.leavesC.presenter.viewModel.RegisterViewModel;
12 |
13 | /**
14 | * 作者:叶应是叶
15 | * 时间:2017/11/29 21:17
16 | * 说明:注册页面
17 | */
18 | public class RegisterActivity extends BaseActivity {
19 |
20 | private RegisterViewModel registerViewModel;
21 |
22 | @Override
23 | protected void onCreate(Bundle savedInstanceState) {
24 | super.onCreate(savedInstanceState);
25 | setContentView(R.layout.activity_register);
26 | initView();
27 | }
28 |
29 | private void initView() {
30 | setToolbarTitle("注册");
31 | findViewById(R.id.btn_register).setOnClickListener(v -> {
32 | EditText et_registerIdentifier = findViewById(R.id.et_registerIdentifier);
33 | EditText et_registerPassword = findViewById(R.id.et_registerPassword);
34 | String identifier = et_registerIdentifier.getText().toString();
35 | String password = et_registerPassword.getText().toString();
36 | registerViewModel.register(identifier, password);
37 | });
38 | }
39 |
40 | @Override
41 | protected ViewModel initViewModel() {
42 | registerViewModel = ViewModelProviders.of(this).get(RegisterViewModel.class);
43 | registerViewModel.getRegSuccessLiveData().observe(this, this::handleRegisterEvent);
44 | return registerViewModel;
45 | }
46 |
47 | private void handleRegisterEvent(ProfileModel profileModel) {
48 | LoginActivity.navToLogin(this, profileModel.getIdentifier());
49 | finish();
50 | }
51 |
52 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable/avatar_friend.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/drawable/avatar_friend.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/avatar_group.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/drawable/avatar_group.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/avatar_group_member.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/drawable/avatar_group_member.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/avatar_me.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/drawable/avatar_me.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/avatar_system.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/drawable/avatar_system.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bird.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/drawable/bird.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/button_blue_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 | -
10 |
11 |
12 |
13 |
14 |
15 | -
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/button_red_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 | -
10 |
11 |
12 |
13 |
14 |
15 | -
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/chat_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/drawable/chat_more.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/divider.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/edit_text_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
11 |
14 |
15 |
16 |
17 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/edittext_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/drawable/error.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/gender_female.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/drawable/gender_female.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/gender_male.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/drawable/gender_male.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/message_friend_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/message_me_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/message_normal_friend.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/drawable/message_normal_friend.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/message_normal_me.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/drawable/message_normal_me.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/message_selected_friend.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/drawable/message_selected_friend.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/message_selected_me.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/drawable/message_selected_me.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/point.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/drawable/point.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/pressed_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/drawable/selected.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/text_view_hint_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/unselected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/drawable/unselected.png
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_about.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
12 |
23 |
24 |
30 |
31 |
37 |
38 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_alter_friend_remark.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
18 |
19 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_app_introduction.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_chat.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
16 |
17 |
21 |
22 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_group_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_group_members.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_group_profile_modify.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_invite_group_member.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
15 |
16 |
20 |
21 |
26 |
27 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
16 |
17 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_modify_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
18 |
19 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_open.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
18 |
29 |
30 |
39 |
40 |
49 |
50 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_select_friend.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
15 |
16 |
20 |
21 |
26 |
27 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_system_message_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_contacts.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
18 |
19 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_conversation.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/header_view_group.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
16 |
17 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_friend.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
18 |
19 |
28 |
29 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_friend_select.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
18 |
26 |
27 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_group.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
18 |
19 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_group_member.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
18 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_message_friend.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
23 |
24 |
32 |
33 |
46 |
47 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_message_system_hint.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
26 |
27 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_message_system_overall.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
20 |
21 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_tool_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_tool_bar_with_btn.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/chat.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/set_remark.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 | @android:color/black
7 | @android:color/white
8 |
9 | @android:color/white
10 |
11 | #EBEBEB
12 |
13 | #b5beb9
14 |
15 | #30acb0b4
16 |
17 | #41e169
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1px
4 |
5 | 16sp
6 |
7 | 12sp
8 |
9 | 13sp
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Round
3 | GitHub:https://github.com/leavesC\n\n
4 | 简书:https://www.jianshu.com/u/9df45b87cfdf\n\n
5 | 我的QQ:1990724437\n\n
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
18 |
19 |
23 |
24 |
28 |
29 |
33 |
34 |
38 |
39 |
51 |
52 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/app/src/test/java/hello/leavesC/chat/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.chat;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext.app_versionCode = '29'
5 | ext.app_versionName = '2.2.9'
6 | repositories {
7 | google()
8 | jcenter()
9 | }
10 | dependencies {
11 | classpath 'com.android.tools.build:gradle:3.5.2'
12 |
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | google()
21 | jcenter()
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
--------------------------------------------------------------------------------
/common/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/common/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 29
5 | defaultConfig {
6 | minSdkVersion 19
7 | targetSdkVersion 29
8 | versionCode Integer.parseInt(app_versionCode)
9 | versionName "$app_versionName"
10 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
11 | }
12 | buildTypes {
13 | release {
14 | minifyEnabled true
15 | zipAlignEnabled true
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | implementation fileTree(include: ['*.jar'], dir: 'libs')
23 | testImplementation 'junit:junit:4.12'
24 | androidTestImplementation 'androidx.test:runner:1.2.0'
25 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
26 | implementation 'androidx.appcompat:appcompat:1.1.0'
27 | api 'androidx.recyclerview:recyclerview:1.0.0'
28 | }
--------------------------------------------------------------------------------
/common/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/common/src/androidTest/java/hello/leavesC/common/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.common;
2 |
3 | import android.content.Context;
4 | import androidx.test.InstrumentationRegistry;
5 | import androidx.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.czy.ui.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/common/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/common/src/main/java/hello/leavesC/common/dialog/ListPickerDialog.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.common.dialog;
2 |
3 | import android.app.Dialog;
4 | import android.content.DialogInterface;
5 | import android.os.Bundle;
6 | import androidx.annotation.NonNull;
7 | import androidx.annotation.StringRes;
8 | import androidx.fragment.app.DialogFragment;
9 | import androidx.fragment.app.FragmentManager;
10 | import androidx.appcompat.app.AlertDialog;
11 |
12 | /**
13 | * 作者:叶应是叶
14 | * 时间:2017/11/27 23:17
15 | * 说明:
16 | */
17 | public class ListPickerDialog extends DialogFragment {
18 |
19 | //标题
20 | private String title;
21 |
22 | //选项
23 | private String[] options;
24 |
25 | private DialogInterface.OnClickListener listener;
26 |
27 | public void show(String title, String[] options, FragmentManager fragmentManager, DialogInterface.OnClickListener listener) {
28 | this.title = title;
29 | this.options = options;
30 | this.listener = listener;
31 | show(fragmentManager, "ListPickerDialog");
32 | }
33 |
34 | public void show(@StringRes int titleResource, String[] options, FragmentManager fragmentManager, DialogInterface.OnClickListener listener) {
35 | title = getString(titleResource);
36 | this.show(title, options, fragmentManager, listener);
37 | }
38 |
39 | public void show(String[] options, FragmentManager fragmentManager, DialogInterface.OnClickListener listener) {
40 | this.show(null, options, fragmentManager, listener);
41 | }
42 |
43 | @NonNull
44 | @Override
45 | public Dialog onCreateDialog(Bundle savedInstanceState) {
46 | AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
47 | if (title != null) {
48 | builder.setTitle(title);
49 | }
50 | builder.setItems(options, listener);
51 | return builder.create();
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/common/src/main/java/hello/leavesC/common/dialog/LoadingDialog.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.common.dialog;
2 |
3 | import android.app.Dialog;
4 | import android.content.Context;
5 | import androidx.annotation.StringRes;
6 | import android.view.animation.Animation;
7 | import android.view.animation.AnimationUtils;
8 | import android.widget.ImageView;
9 | import android.widget.TextView;
10 |
11 | import hello.leavesC.common.R;
12 |
13 | /**
14 | * 作者:叶应是叶
15 | * 时间:2017/11/27 23:21
16 | * 说明:
17 | */
18 | public class LoadingDialog extends Dialog {
19 |
20 | private ImageView iv_loading;
21 |
22 | private TextView tv_hint;
23 |
24 | private Animation animation;
25 |
26 | public LoadingDialog(Context context) {
27 | super(context, R.style.LoadingDialogTheme);
28 | setContentView(R.layout.dialog_loading);
29 | iv_loading = findViewById(R.id.iv_loading);
30 | tv_hint = findViewById(R.id.tv_hint);
31 | animation = AnimationUtils.loadAnimation(context, R.anim.loading_dialog);
32 | }
33 |
34 | public void show(String hintText, boolean cancelable, boolean canceledOnTouchOutside) {
35 | setCancelable(cancelable);
36 | setCanceledOnTouchOutside(canceledOnTouchOutside);
37 | tv_hint.setText(hintText);
38 | iv_loading.startAnimation(animation);
39 | show();
40 | }
41 |
42 | public void show(@StringRes int hintTextRes, boolean cancelable, boolean canceledOnTouchOutside) {
43 | setCancelable(cancelable);
44 | setCanceledOnTouchOutside(canceledOnTouchOutside);
45 | tv_hint.setText(hintTextRes);
46 | iv_loading.startAnimation(animation);
47 | show();
48 | }
49 |
50 | @Override
51 | public void cancel() {
52 | super.cancel();
53 | animation.cancel();
54 | iv_loading.clearAnimation();
55 | }
56 |
57 | @Override
58 | public void dismiss() {
59 | super.dismiss();
60 | animation.cancel();
61 | iv_loading.clearAnimation();
62 | }
63 |
64 | }
--------------------------------------------------------------------------------
/common/src/main/java/hello/leavesC/common/dialog/SingleChoiceDialog.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.common.dialog;
2 |
3 | import android.app.Dialog;
4 | import android.content.DialogInterface;
5 | import android.os.Bundle;
6 | import androidx.annotation.NonNull;
7 | import androidx.annotation.StringRes;
8 | import androidx.fragment.app.DialogFragment;
9 | import androidx.fragment.app.FragmentManager;
10 | import androidx.appcompat.app.AlertDialog;
11 |
12 | /**
13 | * 作者:叶应是叶
14 | * 时间:2017/11/27 23:23
15 | * 说明:
16 | */
17 | public class SingleChoiceDialog extends DialogFragment {
18 |
19 | private String title;
20 |
21 | private String[] options;
22 |
23 | private int select;
24 |
25 | private DialogInterface.OnClickListener onClickListener;
26 |
27 | public void show(String title, String[] options, int select, FragmentManager fragmentManager, DialogInterface.OnClickListener onClickListener) {
28 | this.title = title;
29 | this.options = options;
30 | this.select = select;
31 | this.onClickListener = onClickListener;
32 | show(fragmentManager, "SingleChoiceDialogFragment");
33 | }
34 |
35 | public void show(@StringRes int titleResource, String[] options, int select, FragmentManager fragmentManager, DialogInterface.OnClickListener onClickListener) {
36 | title = getString(titleResource);
37 | this.show(title, options, select, fragmentManager, onClickListener);
38 | }
39 |
40 | public void show(String[] options, int select, FragmentManager fragmentManager, DialogInterface.OnClickListener onClickListener) {
41 | this.show(null, options, select, fragmentManager, onClickListener);
42 | }
43 |
44 | @NonNull
45 | @Override
46 | public Dialog onCreateDialog(Bundle savedInstanceState) {
47 | AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
48 | builder.setTitle(title).setSingleChoiceItems(options, select, onClickListener);
49 | return builder.create();
50 | }
51 |
52 | }
--------------------------------------------------------------------------------
/common/src/main/java/hello/leavesC/common/input/EmojiAdapter.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.common.input;
2 |
3 | import android.app.Activity;
4 | import android.content.Context;
5 | import android.os.Bundle;
6 | import androidx.annotation.NonNull;
7 |
8 | import java.util.List;
9 |
10 | import hello.leavesC.common.input.model.Emoji;
11 | import hello.leavesC.common.recycler.common.CommonRecyclerViewAdapter;
12 | import hello.leavesC.common.recycler.common.CommonRecyclerViewHolder;
13 | import hello.leavesC.common.utils.ScreenUtils;
14 | import hello.leavesC.common.R;
15 |
16 | /**
17 | * 作者:叶应是叶
18 | * 时间:2017/12/10 18:57
19 | * 说明:
20 | */
21 | public class EmojiAdapter extends CommonRecyclerViewAdapter {
22 |
23 | private Context context;
24 |
25 | EmojiAdapter(Context context, List dataList) {
26 | super(context, dataList, R.layout.item_emoji);
27 | this.context = context;
28 | }
29 |
30 | @Override
31 | protected Emoji clone(Emoji data) {
32 | return new Emoji(data.getName(), data.getId());
33 | }
34 |
35 | @Override
36 | protected boolean areItemsTheSame(int oldItemPosition, int newItemPosition) {
37 | return false;
38 | }
39 |
40 | @Override
41 | protected boolean areContentsTheSame(int oldItemPosition, int newItemPosition) {
42 | return false;
43 | }
44 |
45 | @NonNull
46 | @Override
47 | protected Bundle getChangePayload(int oldItemPosition, int newItemPosition) {
48 | return null;
49 | }
50 |
51 | @Override
52 | protected void partialBindData(CommonRecyclerViewHolder holder, @NonNull Bundle bundle) {
53 |
54 | }
55 |
56 | @Override
57 | protected void entirelyBindData(CommonRecyclerViewHolder holder, Emoji data, int position) {
58 | final int spanCount = EmojiFragment.RECYCLER_VIEW_SPAN_COUNT;
59 | int screenWidth = ScreenUtils.getScreenWidth((Activity) context);
60 | int spacing = ScreenUtils.dp2px(context, 12);
61 | int temp = spacing * (spanCount + 1);
62 | int emoticonSideLength = (screenWidth - temp) / spanCount;
63 | holder.setImageResource(R.id.iv_emoticon, data.getId())
64 | .setViewPadding(R.id.iv_emoticon, temp / spanCount, temp / spanCount, 0, 0)
65 | .setImageViewLayoutParams(R.id.iv_emoticon, emoticonSideLength, emoticonSideLength);
66 | }
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/common/src/main/java/hello/leavesC/common/input/model/Emoji.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.common.input.model;
2 |
3 | /**
4 | * 作者:叶应是叶
5 | * 时间:2017/12/10 18:52
6 | * 说明:表情Bean
7 | */
8 | public class Emoji {
9 |
10 | private String name;
11 |
12 | private int id;
13 |
14 | public Emoji(String name, int id) {
15 | this.name = name;
16 | this.id = id;
17 | }
18 |
19 | public String getName() {
20 | return name;
21 | }
22 |
23 | public void setName(String name) {
24 | this.name = name;
25 | }
26 |
27 | public int getId() {
28 | return id;
29 | }
30 |
31 | public void setId(int id) {
32 | this.id = id;
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/common/src/main/java/hello/leavesC/common/recycler/util/RecyclerViewUtil.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.common.recycler.util;
2 |
3 | import androidx.recyclerview.widget.RecyclerView;
4 |
5 | import hello.leavesC.common.recycler.wrap.WrapRecyclerViewAdapter;
6 |
7 | /**
8 | * 作者:叶应是叶
9 | * 时间:2017/11/27 23:16
10 | * 说明:
11 | */
12 | public class RecyclerViewUtil {
13 |
14 | public static int getRecyclerViewAdapterPosition(RecyclerView recyclerView, int position) {
15 | RecyclerView.Adapter adapter = recyclerView.getAdapter();
16 | if (adapter instanceof WrapRecyclerViewAdapter) {
17 | return position - ((WrapRecyclerViewAdapter) adapter).getHeaderViewCount();
18 | }
19 | return position;
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/common/src/main/res/anim/loading_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
14 |
--------------------------------------------------------------------------------
/common/src/main/res/drawable/dialog_loading_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/common/src/main/res/drawable/emoji_unselected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/emoji_unselected.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/loading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/loading.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/more.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/pressed_rectangle_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 | -
9 |
10 |
11 |
12 |
13 | -
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_0.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_1.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_10.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_11.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_12.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_13.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_14.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_15.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_16.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_17.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_17.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_18.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_18.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_19.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_2.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_20.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_21.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_21.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_22.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_22.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_23.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_23.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_24.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_25.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_25.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_26.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_26.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_27.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_27.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_28.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_28.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_29.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_3.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_30.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_30.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_31.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_31.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_32.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_33.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_33.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_34.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_34.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_35.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_35.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_36.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_36.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_37.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_37.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_38.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_38.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_39.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_39.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_4.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_40.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_41.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_41.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_42.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_42.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_43.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_43.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_44.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_44.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_45.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_45.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_46.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_46.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_47.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_47.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_48.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_49.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_49.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_5.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_50.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_51.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_51.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_52.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_52.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_53.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_53.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_54.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_54.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_55.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_55.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_56.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_56.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_57.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_58.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_59.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_59.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_6.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_60.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_61.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_61.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_62.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_62.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_63.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_63.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_64.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_65.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_65.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_66.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_66.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_67.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_67.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_68.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_68.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_69.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_69.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_7.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_70.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_70.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_71.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_71.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_72.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_73.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_73.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_74.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_74.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_75.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_75.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_76.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_77.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_77.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_78.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_78.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_79.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_79.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_8.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_80.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_81.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_81.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_82.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_82.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_83.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_83.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_84.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_84.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_85.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_85.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_86.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_86.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_87.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_88.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_88.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_89.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_89.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/smiley_9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/smiley_9.png
--------------------------------------------------------------------------------
/common/src/main/res/drawable/sounds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/common/src/main/res/drawable/sounds.png
--------------------------------------------------------------------------------
/common/src/main/res/layout/dialog_loading.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
17 |
18 |
24 |
25 |
--------------------------------------------------------------------------------
/common/src/main/res/layout/fragment_emoticon.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/common/src/main/res/layout/input_emoticon.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
20 |
21 |
32 |
33 |
43 |
44 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/common/src/main/res/layout/item_emoji.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/common/src/main/res/layout/view_option.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
16 |
17 |
27 |
28 |
39 |
40 |
41 |
42 |
50 |
51 |
--------------------------------------------------------------------------------
/common/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/common/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #b5beb9
5 | #7d8983
6 |
--------------------------------------------------------------------------------
/common/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Common
3 |
4 |
--------------------------------------------------------------------------------
/common/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/common/src/test/java/hello/leavesC/common/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.common;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/doc/key.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/doc/key.jks
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 | keyStorePath=..\\doc\\key.jks
19 | keyAlias=leavesC
20 | keyPassword=987654321
21 | storePassword=123456789
22 | android.useAndroidX=true
23 | android.enableJetifier=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Nov 18 14:21:51 CST 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/presenter/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/presenter/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 29
5 | defaultConfig {
6 | minSdkVersion 19
7 | targetSdkVersion 29
8 | versionCode Integer.parseInt(app_versionCode)
9 | versionName "$app_versionName"
10 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
11 | }
12 | buildTypes {
13 | release {
14 | minifyEnabled true
15 | zipAlignEnabled true
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | compileOptions {
20 | sourceCompatibility = '1.8'
21 | targetCompatibility = '1.8'
22 | }
23 | }
24 |
25 | dependencies {
26 | implementation fileTree(include: ['*.jar'], dir: 'libs')
27 | testImplementation 'junit:junit:4.12'
28 | androidTestImplementation 'androidx.test:runner:1.2.0'
29 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
30 | implementation 'androidx.appcompat:appcompat:1.1.0'
31 | api project(':sdk')
32 | }
--------------------------------------------------------------------------------
/presenter/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/presenter/src/androidTest/java/hello/leavesC/presenter/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter;
2 |
3 | import android.content.Context;
4 | import androidx.test.InstrumentationRegistry;
5 | import androidx.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.czy.presenter.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/presenter/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/event/ChatActionEvent.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.event;
2 |
3 | import hello.leavesC.presenter.event.base.BaseEvent;
4 |
5 | /**
6 | * 作者:叶应是叶
7 | * 时间:2018/10/1 21:42
8 | * 描述:
9 | */
10 | public class ChatActionEvent extends BaseEvent {
11 |
12 | public static final int SEND_MESSAGE_FAIL = 10;
13 |
14 | public static final int CLEAN_MESSAGE = 20;
15 |
16 | public ChatActionEvent(int action) {
17 | super(action);
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/event/ConversationActionEvent.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.event;
2 |
3 | import hello.leavesC.presenter.event.base.BaseEvent;
4 |
5 | /**
6 | * 作者:叶应是叶
7 | * 时间:2018/10/1 22:35
8 | * 描述:
9 | */
10 | public class ConversationActionEvent extends BaseEvent {
11 |
12 | public static final int UPDATE_FRIENDSHIP_MESSAGE = 10;
13 |
14 | public ConversationActionEvent(int action) {
15 | super(action);
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/event/FriendActionEvent.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.event;
2 |
3 | import com.tencent.imsdk.TIMSNSChangeInfo;
4 | import com.tencent.imsdk.TIMUserProfile;
5 |
6 | import java.util.List;
7 |
8 | import hello.leavesC.presenter.event.base.BaseEvent;
9 |
10 | /**
11 | * 作者:叶应是叶
12 | * 时间:2018/10/1 16:15
13 | * 描述:
14 | */
15 | public class FriendActionEvent extends BaseEvent {
16 |
17 | //主动添加好友或被添加
18 | public static final int ADD_FRIEND = 10;
19 |
20 | //主动删除好友或被删除
21 | public static final int DELETE_FRIEND = 20;
22 |
23 | //好友资料变更
24 | public static final int PROFILE_UPDATE = 30;
25 |
26 | //有人请求添加好友
27 | public static final int ADD_REQUEST = 40;
28 |
29 | //关系链通知已读(主动通知)
30 | public static final int READ_MESSAGE = 50;
31 |
32 | private List userProfileList;
33 |
34 | private List identifierList;
35 |
36 | private List changeInfoList;
37 |
38 | public FriendActionEvent(int action) {
39 | super(action);
40 | }
41 |
42 | public List getUserProfileList() {
43 | return userProfileList;
44 | }
45 |
46 | public void setUserProfileList(List userProfileList) {
47 | this.userProfileList = userProfileList;
48 | }
49 |
50 | public List getIdentifierList() {
51 | return identifierList;
52 | }
53 |
54 | public void setIdentifierList(List identifierList) {
55 | this.identifierList = identifierList;
56 | }
57 |
58 | public List getChangeInfoList() {
59 | return changeInfoList;
60 | }
61 |
62 | public void setChangeInfoList(List changeInfoList) {
63 | this.changeInfoList = changeInfoList;
64 | }
65 |
66 | }
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/event/GlobalActionEvent.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.event;
2 |
3 | import hello.leavesC.presenter.event.base.BaseEvent;
4 |
5 | /**
6 | * 作者:叶应是叶
7 | * 时间:2018/10/4 9:04
8 | * 描述:
9 | */
10 | public class GlobalActionEvent extends BaseEvent {
11 |
12 | public static final int FORCE_OFFLINE = 10;
13 |
14 | public static final int USER_SIGN_EXPIRED = 20;
15 |
16 | public GlobalActionEvent(int action) {
17 | super(action);
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/event/GroupActionEvent.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.event;
2 |
3 | import com.tencent.imsdk.TIMGroupMemberInfo;
4 | import com.tencent.imsdk.ext.group.TIMGroupCacheInfo;
5 |
6 | import java.util.List;
7 |
8 | import hello.leavesC.presenter.event.base.BaseEvent;
9 |
10 | /**
11 | * 作者:叶应是叶
12 | * 时间:2018/10/1 16:37
13 | * 描述:
14 | */
15 | public class GroupActionEvent extends BaseEvent {
16 |
17 | //添加群
18 | public static final int ADD = 10;
19 |
20 | //删除群
21 | public static final int DELETE = 20;
22 |
23 | //群信息更新
24 | public static final int GROUP_PROFILE_UPDATE = 30;
25 |
26 | //有新成员加入群
27 | public static final int JOIN = 40;
28 |
29 | //有群成员退出
30 | public static final int QUIT = 50;
31 |
32 | //群成员资料刷新
33 | public static final int MEMBER_PROFILE_UPDATE = 60;
34 |
35 | private TIMGroupCacheInfo groupCacheInfo;
36 |
37 | private String groupId;
38 |
39 | private List memberInfoList;
40 |
41 | private List identifierList;
42 |
43 | public GroupActionEvent(int action) {
44 | super(action);
45 | }
46 |
47 | public TIMGroupCacheInfo getGroupCacheInfo() {
48 | return groupCacheInfo;
49 | }
50 |
51 | public void setGroupCacheInfo(TIMGroupCacheInfo groupCacheInfo) {
52 | this.groupCacheInfo = groupCacheInfo;
53 | }
54 |
55 | public String getGroupId() {
56 | return groupId;
57 | }
58 |
59 | public void setGroupId(String groupId) {
60 | this.groupId = groupId;
61 | }
62 |
63 | public List getMemberInfoList() {
64 | return memberInfoList;
65 | }
66 |
67 | public void setMemberInfoList(List memberInfoList) {
68 | this.memberInfoList = memberInfoList;
69 | }
70 |
71 | public List getIdentifierList() {
72 | return identifierList;
73 | }
74 |
75 | public void setIdentifierList(List identifierList) {
76 | this.identifierList = identifierList;
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/event/MessageActionEvent.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.event;
2 |
3 | import com.tencent.imsdk.TIMMessage;
4 |
5 | import hello.leavesC.presenter.event.base.BaseEvent;
6 |
7 | /**
8 | * 作者:叶应是叶
9 | * 时间:2018/10/1 16:51
10 | * 描述:
11 | */
12 | public class MessageActionEvent extends BaseEvent {
13 |
14 | public static final int NEW_MESSAGE = 10;
15 |
16 | private TIMMessage message;
17 |
18 | public MessageActionEvent(int action) {
19 | super(action);
20 | }
21 |
22 | public TIMMessage getMessage() {
23 | return message;
24 | }
25 |
26 | public void setMessage(TIMMessage message) {
27 | this.message = message;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/event/RefreshActionEvent.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.event;
2 |
3 | import hello.leavesC.presenter.event.base.BaseEvent;
4 |
5 | /**
6 | * 作者:叶应是叶
7 | * 时间:2018/10/1 16:57
8 | * 描述:
9 | */
10 | public class RefreshActionEvent extends BaseEvent {
11 |
12 | public static final int REFRESH = 10;
13 |
14 | public RefreshActionEvent(int action) {
15 | super(action);
16 | }
17 |
18 | }
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/event/SearchUserActionEvent.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.event;
2 |
3 | import com.tencent.imsdk.TIMUserProfile;
4 |
5 | import hello.leavesC.presenter.event.base.BaseEvent;
6 |
7 | /**
8 | * 作者:叶应是叶
9 | * 时间:2018/10/3 13:47
10 | * 描述:
11 | */
12 | public class SearchUserActionEvent extends BaseEvent {
13 |
14 | public static final int ADD_FRIEND_SUCCESS = 10;
15 |
16 | public static final int SEARCH_USER_SUCCESS = 20;
17 |
18 | public static final int SEARCH_USER_FAIL = 30;
19 |
20 | private TIMUserProfile userProfile;
21 |
22 | public SearchUserActionEvent(int action) {
23 | super(action);
24 | }
25 |
26 | public TIMUserProfile getUserProfile() {
27 | return userProfile;
28 | }
29 |
30 | public void setUserProfile(TIMUserProfile userProfile) {
31 | this.userProfile = userProfile;
32 | }
33 |
34 | }
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/event/SelfProfileActionEvent.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.event;
2 |
3 | import hello.leavesC.presenter.event.base.BaseCallbackEvent;
4 |
5 | /**
6 | * 作者:叶应是叶
7 | * 时间:2018/10/1 10:00
8 | * 描述:
9 | */
10 | public class SelfProfileActionEvent extends BaseCallbackEvent {
11 |
12 | public static final int LOGOUT_SUCCESS = 10;
13 |
14 | public SelfProfileActionEvent(int action) {
15 | super(action);
16 | }
17 |
18 | }
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/event/SplashActionEvent.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.event;
2 |
3 | import hello.leavesC.presenter.event.base.BaseEvent;
4 |
5 | /**
6 | * 作者:叶应是叶
7 | * 时间:2018/9/30 23:39
8 | * 描述:
9 | */
10 | public class SplashActionEvent extends BaseEvent {
11 |
12 | public static final int LOGIN_OR_REGISTER = 10;
13 |
14 | public static final int LOGIN_SUCCESS = 30;
15 |
16 | public SplashActionEvent(int action) {
17 | super(action);
18 | }
19 |
20 | }
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/event/base/BaseActionEvent.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.event.base;
2 |
3 | /**
4 | * 作者:叶应是叶
5 | * 时间:2018/9/30 22:28
6 | * 描述:
7 | */
8 | public class BaseActionEvent extends BaseEvent {
9 |
10 | public static final int SHOW_LOADING_DIALOG = 10;
11 |
12 | public static final int DISMISS_LOADING_DIALOG = 20;
13 |
14 | public static final int SHOW_TOAST = 30;
15 |
16 | public static final int FINISH = 40;
17 |
18 | public static final int FINISH_WITH_RESULT_OK = 50;
19 |
20 | private String message;
21 |
22 | public BaseActionEvent(int action) {
23 | super(action);
24 | }
25 |
26 | public String getMessage() {
27 | return message;
28 | }
29 |
30 | public void setMessage(String message) {
31 | this.message = message;
32 | }
33 |
34 | }
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/event/base/BaseCallbackEvent.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.event.base;
2 |
3 | /**
4 | * 作者:叶应是叶
5 | * 时间:2018/10/1 10:02
6 | * 描述:
7 | */
8 | public class BaseCallbackEvent extends BaseEvent {
9 |
10 | private int errorCode;
11 |
12 | private String message;
13 |
14 | public BaseCallbackEvent(int action) {
15 | super(action);
16 | }
17 |
18 | public int getErrorCode() {
19 | return errorCode;
20 | }
21 |
22 | public void setErrorCode(int errorCode) {
23 | this.errorCode = errorCode;
24 | }
25 |
26 | public String getMessage() {
27 | return message;
28 | }
29 |
30 | public void setMessage(String message) {
31 | this.message = message;
32 | }
33 |
34 | }
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/event/base/BaseEvent.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.event.base;
2 |
3 | /**
4 | * 作者:叶应是叶
5 | * 时间:2018/9/30 22:17
6 | * 描述:
7 | */
8 | public class BaseEvent {
9 |
10 | private int action;
11 |
12 | public BaseEvent(int action) {
13 | this.action = action;
14 | }
15 |
16 | public int getAction() {
17 | return action;
18 | }
19 |
20 | }
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/liveData/RefreshEventLiveData.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.liveData;
2 |
3 | import androidx.lifecycle.LiveData;
4 |
5 | import com.tencent.imsdk.TIMConversation;
6 | import com.tencent.imsdk.TIMManager;
7 | import com.tencent.imsdk.TIMRefreshListener;
8 | import com.tencent.imsdk.TIMUserConfig;
9 |
10 | import java.util.List;
11 |
12 | import hello.leavesC.presenter.event.RefreshActionEvent;
13 | import hello.leavesC.presenter.log.Logger;
14 |
15 | /**
16 | * 作者:叶应是叶
17 | * 时间:2018/10/1 16:58
18 | * 描述:刷新与被动更新的通知
19 | */
20 | public class RefreshEventLiveData extends LiveData {
21 |
22 | private static final String TAG = "RefreshEventLiveData";
23 |
24 | private TIMRefreshListener refreshListener = new TIMRefreshListener() {
25 | //数据刷新通知,如未读计数、会话列表等
26 | @Override
27 | public void onRefresh() {
28 | Logger.e(TAG, "onRefresh");
29 | setValue(new RefreshActionEvent(RefreshActionEvent.REFRESH));
30 | }
31 |
32 | //部分会话刷新,多终端数据同步
33 | @Override
34 | public void onRefreshConversation(List list) {
35 | for (TIMConversation conversation : list) {
36 | Logger.e(TAG, "onRefreshConversation: " + conversation.getPeer());
37 | }
38 | setValue(new RefreshActionEvent(RefreshActionEvent.REFRESH));
39 | }
40 | };
41 |
42 | private RefreshEventLiveData() {
43 |
44 | }
45 |
46 | private static class SingletonHolder {
47 | private final static RefreshEventLiveData instance = new RefreshEventLiveData();
48 | }
49 |
50 | public static RefreshEventLiveData getInstance() {
51 | return RefreshEventLiveData.SingletonHolder.instance;
52 | }
53 |
54 | public TIMUserConfig init(TIMUserConfig userConfig) {
55 | userConfig.setRefreshListener(refreshListener);
56 | return userConfig;
57 | }
58 |
59 | @Override
60 | protected void onActive() {
61 | super.onActive();
62 | TIMManager.getInstance().getUserConfig().setRefreshListener(refreshListener);
63 | }
64 |
65 | @Override
66 | protected void onInactive() {
67 | super.onInactive();
68 | TIMManager.getInstance().getUserConfig().setRefreshListener(null);
69 | }
70 |
71 | }
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/log/Logger.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.log;
2 |
3 | import android.util.Log;
4 |
5 | /**
6 | * 作者:叶应是叶
7 | * 时间:2017/12/23 14:02
8 | * 说明:
9 | */
10 | public class Logger {
11 |
12 | public static void e(String tag, String log) {
13 | Log.e(tag, log);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/model/ConversationModel.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.model;
2 |
3 | import com.tencent.imsdk.TIMConversationType;
4 |
5 | /**
6 | * 作者:叶应是叶
7 | * 时间:2018/10/1 22:32
8 | * 描述:
9 | */
10 | public class ConversationModel {
11 |
12 | private String peer;
13 |
14 | private TIMConversationType conversationType;
15 |
16 | public ConversationModel(String peer, TIMConversationType conversationType) {
17 | this.peer = peer;
18 | this.conversationType = conversationType;
19 | }
20 |
21 | public String getPeer() {
22 | return peer;
23 | }
24 |
25 | public void setPeer(String peer) {
26 | this.peer = peer;
27 | }
28 |
29 | public TIMConversationType getConversationType() {
30 | return conversationType;
31 | }
32 |
33 | public void setConversationType(TIMConversationType conversationType) {
34 | this.conversationType = conversationType;
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/model/GroupMemberInfo.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.model;
2 |
3 | import com.tencent.imsdk.TIMGroupMemberInfo;
4 | import com.tencent.imsdk.TIMGroupMemberRoleType;
5 |
6 | /**
7 | * 作者:叶应是叶
8 | * 时间:2018/1/22 22:06
9 | * 说明:
10 | */
11 | public class GroupMemberInfo {
12 |
13 | private String identifier;
14 |
15 | private long joinTime;
16 |
17 | private TIMGroupMemberRoleType roleType;
18 |
19 | public GroupMemberInfo(TIMGroupMemberInfo groupMemberInfo) {
20 | this.identifier = groupMemberInfo.getUser();
21 | this.joinTime = groupMemberInfo.getJoinTime();
22 | this.roleType = groupMemberInfo.getRole();
23 | }
24 |
25 | public GroupMemberInfo(String identifier, long joinTime, TIMGroupMemberRoleType roleType) {
26 | this.identifier = identifier;
27 | this.joinTime = joinTime;
28 | this.roleType = roleType;
29 | }
30 |
31 | public String getIdentifier() {
32 | return identifier;
33 | }
34 |
35 | public void setIdentifier(String identifier) {
36 | this.identifier = identifier;
37 | }
38 |
39 | public long getJoinTime() {
40 | return joinTime;
41 | }
42 |
43 | public void setJoinTime(long joinTime) {
44 | this.joinTime = joinTime;
45 | }
46 |
47 | public TIMGroupMemberRoleType getRoleType() {
48 | return roleType;
49 | }
50 |
51 | public void setRoleType(TIMGroupMemberRoleType roleType) {
52 | this.roleType = roleType;
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/model/ProfileModel.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.model;
2 |
3 | import com.tencent.imsdk.TIMFriendAllowType;
4 | import com.tencent.imsdk.TIMFriendGenderType;
5 |
6 | /**
7 | * 作者:叶应是叶
8 | * 时间:2018/10/1 9:47
9 | * 描述:
10 | */
11 | public class ProfileModel {
12 |
13 | private String identifier;
14 |
15 | private String nickName;
16 |
17 | private String selfSignature;
18 |
19 | private String faceUrl;
20 |
21 | private String gender;
22 |
23 | private TIMFriendGenderType genderType;
24 |
25 | private String allow;
26 |
27 | private TIMFriendAllowType allowType;
28 |
29 | public String getIdentifier() {
30 | return identifier;
31 | }
32 |
33 | public void setIdentifier(String identifier) {
34 | this.identifier = identifier;
35 | }
36 |
37 | public String getNickName() {
38 | return nickName;
39 | }
40 |
41 | public void setNickName(String nickName) {
42 | this.nickName = nickName;
43 | }
44 |
45 | public String getSelfSignature() {
46 | return selfSignature;
47 | }
48 |
49 | public void setSelfSignature(String selfSignature) {
50 | this.selfSignature = selfSignature;
51 | }
52 |
53 | public String getFaceUrl() {
54 | return faceUrl;
55 | }
56 |
57 | public void setFaceUrl(String faceUrl) {
58 | this.faceUrl = faceUrl;
59 | }
60 |
61 | public String getGender() {
62 | return gender;
63 | }
64 |
65 | public void setGender(String gender) {
66 | this.gender = gender;
67 | }
68 |
69 | public TIMFriendGenderType getGenderType() {
70 | return genderType;
71 | }
72 |
73 | public void setGenderType(TIMFriendGenderType genderType) {
74 | this.genderType = genderType;
75 | }
76 |
77 | public String getAllow() {
78 | return allow;
79 | }
80 |
81 | public void setAllow(String allow) {
82 | this.allow = allow;
83 | }
84 |
85 | public TIMFriendAllowType getAllowType() {
86 | return allowType;
87 | }
88 |
89 | public void setAllowType(TIMFriendAllowType allowType) {
90 | this.allowType = allowType;
91 | }
92 |
93 | }
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/viewModel/ModifyFriendProfileViewModel.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.viewModel;
2 |
3 | import androidx.annotation.NonNull;
4 |
5 | import com.tencent.imsdk.TIMCallBack;
6 | import com.tencent.imsdk.TIMValueCallBack;
7 | import com.tencent.imsdk.ext.sns.TIMDelFriendType;
8 | import com.tencent.imsdk.ext.sns.TIMFriendResult;
9 | import com.tencent.imsdk.ext.sns.TIMFriendshipManagerExt;
10 |
11 | import java.util.Collections;
12 | import java.util.List;
13 |
14 | import hello.leavesC.presenter.viewModel.base.BaseViewModel;
15 |
16 | /**
17 | * 作者:叶应是叶
18 | * 时间:2018/10/3 9:05
19 | * 描述:
20 | */
21 | public class ModifyFriendProfileViewModel extends BaseViewModel {
22 |
23 | public void modifyFriendRemark(@NonNull String identifier, @NonNull String remark) {
24 | showLoadingDialog("正在修改");
25 | TIMFriendshipManagerExt.ModifySnsProfileParam param = new TIMFriendshipManagerExt.ModifySnsProfileParam(identifier);
26 | param.setRemark(remark);
27 | TIMFriendshipManagerExt.getInstance().modifySnsProfile(param, new TIMCallBack() {
28 | @Override
29 | public void onError(int i, String s) {
30 | dismissLoadingDialog();
31 | showToast(s);
32 | }
33 |
34 | @Override
35 | public void onSuccess() {
36 | dismissLoadingDialog();
37 | showToast("修改成功");
38 | finish();
39 | }
40 | });
41 | }
42 |
43 | public void deleteFriend(@NonNull String identifier) {
44 | showLoadingDialog("正在删除");
45 | TIMFriendshipManagerExt.DeleteFriendParam param = new TIMFriendshipManagerExt.DeleteFriendParam();
46 | //双向删除好友
47 | param.setType(TIMDelFriendType.TIM_FRIEND_DEL_BOTH);
48 | param.setUsers(Collections.singletonList(identifier));
49 | TIMFriendshipManagerExt.getInstance().delFriend(param, new TIMValueCallBack>() {
50 | @Override
51 | public void onSuccess(List timFriendResults) {
52 | dismissLoadingDialog();
53 | showToast("已删除好友");
54 | finish();
55 | }
56 |
57 | @Override
58 | public void onError(int i, String s) {
59 | showToast(s);
60 | }
61 | });
62 | }
63 |
64 | }
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/viewModel/ModifySelfProfileViewModel.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.viewModel;
2 |
3 | import androidx.annotation.NonNull;
4 |
5 | import com.tencent.imsdk.TIMCallBack;
6 | import com.tencent.imsdk.TIMFriendAllowType;
7 | import com.tencent.imsdk.TIMFriendGenderType;
8 | import com.tencent.imsdk.TIMFriendshipManager;
9 |
10 | import hello.leavesC.presenter.viewModel.base.BaseViewModel;
11 |
12 | /**
13 | * 作者:叶应是叶
14 | * 时间:2018/10/1 14:09
15 | * 描述:
16 | */
17 | public class ModifySelfProfileViewModel extends BaseViewModel {
18 |
19 | public ModifySelfProfileViewModel() {
20 |
21 | }
22 |
23 | private TIMCallBack callBack = new TIMCallBack() {
24 | @Override
25 | public void onError(int i, String s) {
26 | dismissLoadingDialog();
27 | showToast(s);
28 | }
29 |
30 | @Override
31 | public void onSuccess() {
32 | dismissLoadingDialog();
33 | showToast("修改成功");
34 | finish();
35 | }
36 | };
37 |
38 | public void setNickname(@NonNull String nickname) {
39 | modifyProfile(nickname, null, null, null, callBack);
40 | }
41 |
42 | public void setSignature(@NonNull String signature) {
43 | modifyProfile(null, null, signature, null, callBack);
44 | }
45 |
46 | public void setGender(@NonNull TIMFriendGenderType genderType) {
47 | modifyProfile(null, genderType, null, null, callBack);
48 | }
49 |
50 | public void setAllowType(@NonNull TIMFriendAllowType allowType) {
51 | modifyProfile(null, null, null, allowType, callBack);
52 | }
53 |
54 | private void modifyProfile(String nickname, TIMFriendGenderType genderType,
55 | String signature, TIMFriendAllowType allowType,
56 | TIMCallBack callBack) {
57 | showLoadingDialog("正在修改");
58 | TIMFriendshipManager.ModifyUserProfileParam param = new TIMFriendshipManager.ModifyUserProfileParam();
59 | if (nickname != null) {
60 | param.setNickname(nickname);
61 | }
62 | if (genderType != null) {
63 | param.setGender(genderType);
64 | }
65 | if (signature != null) {
66 | param.setSelfSignature(signature);
67 | }
68 | if (allowType != null) {
69 | param.setAllowType(allowType);
70 | }
71 | TIMFriendshipManager.getInstance().modifyProfile(param, callBack);
72 | }
73 |
74 | }
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/viewModel/RegisterViewModel.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.viewModel;
2 |
3 | import android.app.Application;
4 | import androidx.lifecycle.MutableLiveData;
5 | import androidx.annotation.NonNull;
6 |
7 | import hello.leavesC.presenter.model.ProfileModel;
8 | import hello.leavesC.presenter.viewModel.base.BaseAndroidViewModel;
9 | import hello.leavesC.sdk.Constants;
10 | import tencent.tls.platform.TLSAccountHelper;
11 | import tencent.tls.platform.TLSErrInfo;
12 | import tencent.tls.platform.TLSStrAccRegListener;
13 | import tencent.tls.platform.TLSUserInfo;
14 |
15 | /**
16 | * 作者:叶应是叶
17 | * 时间:2018/9/29 22:36
18 | * 描述:
19 | */
20 | public class RegisterViewModel extends BaseAndroidViewModel {
21 |
22 | private TLSAccountHelper accountHelper;
23 |
24 | private MutableLiveData regSuccessLiveData;
25 |
26 | public RegisterViewModel(@NonNull Application application) {
27 | super(application);
28 | accountHelper = TLSAccountHelper.getInstance().init(application,
29 | Constants.SDK_APP_ID, Constants.ACCOUNT_TYPE, Constants.APP_VERSION);
30 | regSuccessLiveData = new MutableLiveData<>();
31 | }
32 |
33 | public void register(String identifier, String password) {
34 | if (identifier.length() < 5) {
35 | showToast("用户名至少五位");
36 | return;
37 | }
38 | if (password.length() < 8) {
39 | showToast("密码至少八位");
40 | return;
41 | }
42 | int action = accountHelper.TLSStrAccReg(identifier, password, new TLSStrAccRegListener() {
43 | @Override
44 | public void OnStrAccRegSuccess(TLSUserInfo tlsUserInfo) {
45 | dismissLoadingDialog();
46 | showToast("注册成功");
47 | ProfileModel profileModel = new ProfileModel();
48 | profileModel.setIdentifier(tlsUserInfo.identifier);
49 | regSuccessLiveData.setValue(profileModel);
50 | }
51 |
52 | @Override
53 | public void OnStrAccRegFail(TLSErrInfo tlsErrInfo) {
54 | dismissLoadingDialog();
55 | showToast(tlsErrInfo.Msg);
56 | }
57 |
58 | @Override
59 | public void OnStrAccRegTimeout(TLSErrInfo tlsErrInfo) {
60 | dismissLoadingDialog();
61 | showToast(tlsErrInfo.Msg);
62 | }
63 | });
64 | if (action == TLSErrInfo.INPUT_INVALID) {
65 | showToast("格式有误,请重新输入");
66 | } else {
67 | showLoadingDialog("正在注册...");
68 | }
69 | }
70 |
71 | public MutableLiveData getRegSuccessLiveData() {
72 | return regSuccessLiveData;
73 | }
74 |
75 | }
76 |
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/viewModel/base/BaseAndroidViewModel.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.viewModel.base;
2 |
3 | import android.app.Application;
4 | import androidx.lifecycle.AndroidViewModel;
5 | import androidx.lifecycle.MutableLiveData;
6 |
7 | import hello.leavesC.presenter.event.base.BaseActionEvent;
8 |
9 | /**
10 | * 作者:叶应是叶
11 | * 时间:2018/9/30 22:43
12 | * 描述:
13 | */
14 | public class BaseAndroidViewModel extends AndroidViewModel implements IViewModelAction {
15 |
16 | private MutableLiveData actionLiveData;
17 |
18 | public BaseAndroidViewModel(Application application) {
19 | super(application);
20 | actionLiveData = new MutableLiveData<>();
21 | }
22 |
23 | @Override
24 | public void showLoadingDialog() {
25 | showLoadingDialog(null);
26 | }
27 |
28 | @Override
29 | public void showLoadingDialog(String message) {
30 | BaseActionEvent baseActionEvent = new BaseActionEvent(BaseActionEvent.SHOW_LOADING_DIALOG);
31 | baseActionEvent.setMessage(message);
32 | actionLiveData.setValue(baseActionEvent);
33 | }
34 |
35 | @Override
36 | public void dismissLoadingDialog() {
37 | actionLiveData.setValue(new BaseActionEvent(BaseActionEvent.DISMISS_LOADING_DIALOG));
38 | }
39 |
40 | @Override
41 | public void showToast(String message) {
42 | BaseActionEvent baseActionEvent = new BaseActionEvent(BaseActionEvent.SHOW_TOAST);
43 | baseActionEvent.setMessage(message);
44 | actionLiveData.setValue(baseActionEvent);
45 | }
46 |
47 | @Override
48 | public void finish() {
49 | actionLiveData.setValue(new BaseActionEvent(BaseActionEvent.FINISH));
50 | }
51 |
52 | @Override
53 | public void finishWithResultOk() {
54 | actionLiveData.setValue(new BaseActionEvent(BaseActionEvent.FINISH_WITH_RESULT_OK));
55 | }
56 |
57 | @Override
58 | public MutableLiveData getActionLiveData() {
59 | return actionLiveData;
60 | }
61 |
62 | }
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/viewModel/base/BaseViewModel.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.viewModel.base;
2 |
3 | import androidx.lifecycle.MutableLiveData;
4 | import androidx.lifecycle.ViewModel;
5 |
6 | import hello.leavesC.presenter.event.base.BaseActionEvent;
7 |
8 | /**
9 | * 作者:叶应是叶
10 | * 时间:2018/9/30 22:24
11 | * 描述:
12 | */
13 | public class BaseViewModel extends ViewModel implements IViewModelAction {
14 |
15 | private MutableLiveData actionLiveData;
16 |
17 | public BaseViewModel() {
18 | actionLiveData = new MutableLiveData<>();
19 | }
20 |
21 | @Override
22 | public void showLoadingDialog() {
23 | showLoadingDialog(null);
24 | }
25 |
26 | @Override
27 | public void showLoadingDialog(String message) {
28 | BaseActionEvent baseActionEvent = new BaseActionEvent(BaseActionEvent.SHOW_LOADING_DIALOG);
29 | baseActionEvent.setMessage(message);
30 | actionLiveData.setValue(baseActionEvent);
31 | }
32 |
33 | @Override
34 | public void dismissLoadingDialog() {
35 | actionLiveData.setValue(new BaseActionEvent(BaseActionEvent.DISMISS_LOADING_DIALOG));
36 | }
37 |
38 | @Override
39 | public void showToast(String message) {
40 | BaseActionEvent baseActionEvent = new BaseActionEvent(BaseActionEvent.SHOW_TOAST);
41 | baseActionEvent.setMessage(message);
42 | actionLiveData.setValue(baseActionEvent);
43 | }
44 |
45 | @Override
46 | public void finish() {
47 | actionLiveData.setValue(new BaseActionEvent(BaseActionEvent.FINISH));
48 | }
49 |
50 | @Override
51 | public void finishWithResultOk() {
52 | actionLiveData.setValue(new BaseActionEvent(BaseActionEvent.FINISH_WITH_RESULT_OK));
53 | }
54 |
55 | @Override
56 | public MutableLiveData getActionLiveData() {
57 | return actionLiveData;
58 | }
59 |
60 | }
--------------------------------------------------------------------------------
/presenter/src/main/java/hello/leavesC/presenter/viewModel/base/IViewModelAction.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter.viewModel.base;
2 |
3 | import androidx.lifecycle.MutableLiveData;
4 |
5 | import hello.leavesC.presenter.event.base.BaseActionEvent;
6 |
7 | /**
8 | * 作者:叶应是叶
9 | * 时间:2018/10/1 13:20
10 | * 描述:
11 | */
12 | public interface IViewModelAction {
13 |
14 | void showLoadingDialog();
15 |
16 | void showLoadingDialog(String message);
17 |
18 | void dismissLoadingDialog();
19 |
20 | void showToast(String message);
21 |
22 | void finish();
23 |
24 | void finishWithResultOk();
25 |
26 | MutableLiveData getActionLiveData();
27 |
28 | }
--------------------------------------------------------------------------------
/presenter/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Presenter
3 |
4 |
--------------------------------------------------------------------------------
/presenter/src/test/java/hello/leavesC/presenter/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.presenter;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/screenshot/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/screenshot/1.png
--------------------------------------------------------------------------------
/screenshot/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/screenshot/2.png
--------------------------------------------------------------------------------
/screenshot/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/screenshot/3.png
--------------------------------------------------------------------------------
/screenshot/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/screenshot/4.png
--------------------------------------------------------------------------------
/screenshot/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/screenshot/5.png
--------------------------------------------------------------------------------
/screenshot/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/screenshot/6.png
--------------------------------------------------------------------------------
/screenshot/_release_v2.2.9_2019-11-18_14_41_50.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/screenshot/_release_v2.2.9_2019-11-18_14_41_50.apk
--------------------------------------------------------------------------------
/screenshot/alipay.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/screenshot/alipay.jpg
--------------------------------------------------------------------------------
/screenshot/wechat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/screenshot/wechat.png
--------------------------------------------------------------------------------
/sdk/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/sdk/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 29
5 | defaultConfig {
6 | minSdkVersion 19
7 | targetSdkVersion 29
8 | versionCode Integer.parseInt(app_versionCode)
9 | versionName "$app_versionName"
10 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
11 | }
12 | buildTypes {
13 | release {
14 | minifyEnabled true
15 | zipAlignEnabled true
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | api fileTree(include: ['*.jar'], dir: 'libs')
23 | testImplementation 'junit:junit:4.12'
24 | androidTestImplementation 'androidx.test:runner:1.2.0'
25 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
26 | implementation 'androidx.appcompat:appcompat:1.1.0'
27 | implementation files('libs/imsdk.jar')
28 | implementation files('libs/imsdk_group_ext.jar')
29 | implementation files('libs/imsdk_msg_ext.jar')
30 | implementation files('libs/imsdk_sns_ext.jar')
31 | implementation files('libs/mobilepb.jar')
32 | implementation files('libs/pinyin4j-2.5.0.jar')
33 | implementation files('libs/qalsdk.jar')
34 | implementation files('libs/tls_sdk.jar')
35 | implementation files('libs/wup-1.0.0-SNAPSHOT.jar')
36 | }
--------------------------------------------------------------------------------
/sdk/libs/imsdk.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/libs/imsdk.jar
--------------------------------------------------------------------------------
/sdk/libs/imsdk_group_ext.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/libs/imsdk_group_ext.jar
--------------------------------------------------------------------------------
/sdk/libs/imsdk_msg_ext.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/libs/imsdk_msg_ext.jar
--------------------------------------------------------------------------------
/sdk/libs/imsdk_sns_ext.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/libs/imsdk_sns_ext.jar
--------------------------------------------------------------------------------
/sdk/libs/mobilepb.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/libs/mobilepb.jar
--------------------------------------------------------------------------------
/sdk/libs/pinyin4j-2.5.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/libs/pinyin4j-2.5.0.jar
--------------------------------------------------------------------------------
/sdk/libs/qalsdk.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/libs/qalsdk.jar
--------------------------------------------------------------------------------
/sdk/libs/tls_sdk.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/libs/tls_sdk.jar
--------------------------------------------------------------------------------
/sdk/libs/wup-1.0.0-SNAPSHOT.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/libs/wup-1.0.0-SNAPSHOT.jar
--------------------------------------------------------------------------------
/sdk/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/sdk/src/androidTest/java/hello/leavesC/sdk/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.sdk;
2 |
3 | import android.content.Context;
4 | import androidx.test.InstrumentationRegistry;
5 | import androidx.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.czy.sdk.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/sdk/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/sdk/src/main/java/hello/leavesC/sdk/Constants.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.sdk;
2 |
3 | /**
4 | * 作者:leavesC
5 | * 时间:2019/5/17 22:07
6 | * 描述:
7 | * GitHub:https://github.com/leavesC
8 | * Blog:https://www.jianshu.com/u/9df45b87cfdf
9 | */
10 | public class Constants {
11 |
12 | //SdkAppId
13 | public static final int SDK_APP_ID = 1400025870;
14 |
15 | //账户类型
16 | public static final int ACCOUNT_TYPE = 7128;
17 |
18 | //App版本号
19 | public static final String APP_VERSION = BuildConfig.VERSION_NAME;
20 |
21 | }
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/arm64-v8a/lib_imcore_group_ext_gyp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/arm64-v8a/lib_imcore_group_ext_gyp.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/arm64-v8a/lib_imcore_jni_gyp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/arm64-v8a/lib_imcore_jni_gyp.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/arm64-v8a/lib_imcore_msg_ext_gyp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/arm64-v8a/lib_imcore_msg_ext_gyp.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/arm64-v8a/lib_imcore_sns_ext_gyp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/arm64-v8a/lib_imcore_sns_ext_gyp.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/arm64-v8a/libgnustl_shared.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/arm64-v8a/libgnustl_shared.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/arm64-v8a/libqalcodecwrapper.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/arm64-v8a/libqalcodecwrapper.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/arm64-v8a/libqalmsfboot.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/arm64-v8a/libqalmsfboot.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/arm64-v8a/libwtcrypto.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/arm64-v8a/libwtcrypto.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/armeabi-v7a/lib_imcore_group_ext_gyp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/armeabi-v7a/lib_imcore_group_ext_gyp.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/armeabi-v7a/lib_imcore_jni_gyp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/armeabi-v7a/lib_imcore_jni_gyp.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/armeabi-v7a/lib_imcore_msg_ext_gyp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/armeabi-v7a/lib_imcore_msg_ext_gyp.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/armeabi-v7a/lib_imcore_sns_ext_gyp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/armeabi-v7a/lib_imcore_sns_ext_gyp.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/armeabi-v7a/libgnustl_shared.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/armeabi-v7a/libgnustl_shared.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/armeabi-v7a/libqalcodecwrapper.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/armeabi-v7a/libqalcodecwrapper.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/armeabi-v7a/libqalmsfboot.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/armeabi-v7a/libqalmsfboot.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/armeabi-v7a/libwtcrypto.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/armeabi-v7a/libwtcrypto.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/armeabi/lib_imcore_group_ext_gyp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/armeabi/lib_imcore_group_ext_gyp.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/armeabi/lib_imcore_jni_gyp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/armeabi/lib_imcore_jni_gyp.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/armeabi/lib_imcore_msg_ext_gyp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/armeabi/lib_imcore_msg_ext_gyp.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/armeabi/lib_imcore_sns_ext_gyp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/armeabi/lib_imcore_sns_ext_gyp.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/armeabi/libgnustl_shared.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/armeabi/libgnustl_shared.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/armeabi/libqalcodecwrapper.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/armeabi/libqalcodecwrapper.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/armeabi/libqalmsfboot.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/armeabi/libqalmsfboot.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/armeabi/libwtcrypto.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/armeabi/libwtcrypto.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/x86/lib_imcore_group_ext_gyp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/x86/lib_imcore_group_ext_gyp.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/x86/lib_imcore_jni_gyp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/x86/lib_imcore_jni_gyp.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/x86/lib_imcore_msg_ext_gyp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/x86/lib_imcore_msg_ext_gyp.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/x86/lib_imcore_sns_ext_gyp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/x86/lib_imcore_sns_ext_gyp.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/x86/libgnustl_shared.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/x86/libgnustl_shared.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/x86/libqalcodecwrapper.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/x86/libqalcodecwrapper.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/x86/libqalmsfboot.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/x86/libqalmsfboot.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/x86/libwtcrypto.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/x86/libwtcrypto.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/x86_64/lib_imcore_group_ext_gyp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/x86_64/lib_imcore_group_ext_gyp.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/x86_64/lib_imcore_jni_gyp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/x86_64/lib_imcore_jni_gyp.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/x86_64/lib_imcore_msg_ext_gyp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/x86_64/lib_imcore_msg_ext_gyp.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/x86_64/lib_imcore_sns_ext_gyp.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/x86_64/lib_imcore_sns_ext_gyp.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/x86_64/libgnustl_shared.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/x86_64/libgnustl_shared.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/x86_64/libqalcodecwrapper.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/x86_64/libqalcodecwrapper.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/x86_64/libqalmsfboot.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/x86_64/libqalmsfboot.so
--------------------------------------------------------------------------------
/sdk/src/main/jniLibs/x86_64/libwtcrypto.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leavesCZY/Chat/584d675ada70c31f2235e5f34765496095150575/sdk/src/main/jniLibs/x86_64/libwtcrypto.so
--------------------------------------------------------------------------------
/sdk/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Sdk
3 |
4 |
--------------------------------------------------------------------------------
/sdk/src/test/java/hello/leavesC/sdk/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package hello.leavesC.sdk;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':presenter', ':common', ':sdk'
2 |
--------------------------------------------------------------------------------