taomenggo init
This commit is contained in:
54
teamkit-ui/build.gradle.kts
Normal file
54
teamkit-ui/build.gradle.kts
Normal file
@@ -0,0 +1,54 @@
|
||||
|
||||
/*
|
||||
* Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
kotlin("android")
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdk = 33
|
||||
|
||||
defaultConfig {
|
||||
minSdk = 21
|
||||
targetSdk = 33
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
buildConfigField("String", "versionName", "\"9.6.2\"")
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
getByName("release") {
|
||||
isMinifyEnabled = true
|
||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||
}
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
viewBinding = true
|
||||
}
|
||||
|
||||
sourceSets["main"].res.srcDirs("src/main/res","src/main/res-fun","src/main/res-normal")
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
namespace = "com.netease.yunxin.kit.teamkit.ui"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
|
||||
api("com.netease.yunxin.kit.chat:chatkit:9.6.2")
|
||||
api("com.netease.yunxin.kit.common:common-ui:1.2.0")
|
||||
api("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21")
|
||||
implementation("androidx.appcompat:appcompat:1.4.2")
|
||||
implementation("com.google.android.material:material:1.5.0")
|
||||
implementation("androidx.recyclerview:recyclerview:1.2.1")
|
||||
implementation("com.github.bumptech.glide:glide:4.13.1")
|
||||
|
||||
}
|
||||
|
||||
0
teamkit-ui/consumer-rules.pro
Normal file
0
teamkit-ui/consumer-rules.pro
Normal file
21
teamkit-ui/proguard-rules.pro
vendored
Normal file
21
teamkit-ui/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.kts.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
73
teamkit-ui/src/main/AndroidManifest.xml
Normal file
73
teamkit-ui/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.netease.yunxin.kit.teamkit.ui"
|
||||
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<application>
|
||||
<provider
|
||||
android:name="com.netease.yunxin.kit.corekit.startup.InitializationProvider"
|
||||
android:authorities="${applicationId}.xkit-startup"
|
||||
android:exported="false"
|
||||
tools:node="merge">
|
||||
<meta-data
|
||||
android:name="com.netease.yunxin.kit.teamkit.ui.TeamUIService"
|
||||
android:value="xkit.startup" />
|
||||
</provider>
|
||||
|
||||
<activity
|
||||
android:name=".normal.activity.TeamInfoActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<activity
|
||||
android:name=".normal.activity.TeamUpdateNicknameActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<activity
|
||||
android:name=".normal.activity.TeamMemberListActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<activity
|
||||
android:name=".normal.activity.TeamUpdateIconActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<activity
|
||||
android:name=".normal.activity.TeamUpdateNameActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<activity
|
||||
android:name=".normal.activity.TeamUpdateIntroduceActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<activity
|
||||
android:name=".fun.activity.FunTeamInfoActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<activity
|
||||
android:name=".fun.activity.FunTeamUpdateNicknameActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<activity
|
||||
android:name=".fun.activity.FunTeamMemberListActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<activity
|
||||
android:name=".fun.activity.FunTeamUpdateIconActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<activity
|
||||
android:name=".fun.activity.FunTeamUpdateNameActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<activity
|
||||
android:name=".fun.activity.FunTeamUpdateIntroduceActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,20 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui;
|
||||
|
||||
import com.netease.yunxin.kit.chatkit.interfaces.ITeamCustom;
|
||||
import com.netease.yunxin.kit.chatkit.interfaces.TeamCustomProvider;
|
||||
|
||||
public class TeamKitClient {
|
||||
public static final String LIB_TAG = "TeamKit-UI";
|
||||
|
||||
public static void setTeamCustom(ITeamCustom custom) {
|
||||
TeamCustomProvider.INSTANCE.setTeamCustom(custom);
|
||||
}
|
||||
|
||||
public static ITeamCustom getTeamCustom() {
|
||||
return TeamCustomProvider.INSTANCE.getTeamCustom();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,327 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui;
|
||||
|
||||
import static com.netease.yunxin.kit.corekit.im.utils.RouterConstant.KEY_REQUEST_SELECTOR_NAME;
|
||||
import static com.netease.yunxin.kit.corekit.im.utils.RouterConstant.KEY_TEAM_FIELDS;
|
||||
import static com.netease.yunxin.kit.corekit.im.utils.RouterConstant.KEY_TEAM_ICON;
|
||||
import static com.netease.yunxin.kit.corekit.im.utils.RouterConstant.KEY_TEAM_NAME;
|
||||
import static com.netease.yunxin.kit.corekit.im.utils.RouterConstant.PATH_CREATE_ADVANCED_TEAM_ACTION;
|
||||
import static com.netease.yunxin.kit.corekit.im.utils.RouterConstant.PATH_CREATE_NORMAL_TEAM_ACTION;
|
||||
import static com.netease.yunxin.kit.corekit.im.utils.RouterConstant.PATH_FUN_CREATE_ADVANCED_TEAM_ACTION;
|
||||
import static com.netease.yunxin.kit.corekit.im.utils.RouterConstant.PATH_FUN_CREATE_NORMAL_TEAM_ACTION;
|
||||
import static com.netease.yunxin.kit.corekit.im.utils.RouterConstant.PATH_TEAM_INVITE_ACTION;
|
||||
import static com.netease.yunxin.kit.corekit.im.utils.RouterConstant.REQUEST_CONTACT_SELECTOR_KEY;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.netease.nimlib.sdk.team.constant.TeamBeInviteModeEnum;
|
||||
import com.netease.nimlib.sdk.team.constant.TeamExtensionUpdateModeEnum;
|
||||
import com.netease.nimlib.sdk.team.constant.TeamFieldEnum;
|
||||
import com.netease.nimlib.sdk.team.constant.TeamInviteModeEnum;
|
||||
import com.netease.nimlib.sdk.team.constant.TeamUpdateModeEnum;
|
||||
import com.netease.nimlib.sdk.team.constant.VerifyTypeEnum;
|
||||
import com.netease.nimlib.sdk.team.model.CreateTeamResult;
|
||||
import com.netease.yunxin.kit.alog.ALog;
|
||||
import com.netease.yunxin.kit.chatkit.ChatService;
|
||||
import com.netease.yunxin.kit.chatkit.repo.TeamRepo;
|
||||
import com.netease.yunxin.kit.corekit.im.provider.FetchCallback;
|
||||
import com.netease.yunxin.kit.corekit.im.utils.IMKitConstant;
|
||||
import com.netease.yunxin.kit.corekit.im.utils.RouterConstant;
|
||||
import com.netease.yunxin.kit.corekit.model.ErrorMsg;
|
||||
import com.netease.yunxin.kit.corekit.model.ResultInfo;
|
||||
import com.netease.yunxin.kit.corekit.route.XKitRouter;
|
||||
import com.netease.yunxin.kit.corekit.startup.Initializer;
|
||||
import com.netease.yunxin.kit.teamkit.ui.utils.TeamIconUtils;
|
||||
import com.netease.yunxin.kit.teamkit.ui.utils.TeamUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* launch service when app start the TeamUIService will be created it need to config in manifest
|
||||
*/
|
||||
@Keep
|
||||
public class TeamUIService extends ChatService {
|
||||
|
||||
private static final String TAG = "TeamUIService";
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String getServiceName() {
|
||||
return "TeamUIKit";
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String getVersionName() {
|
||||
return BuildConfig.versionName;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Object onMethodCall(@NonNull String method, @Nullable Map<String, ?> param) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ChatService create(@NonNull Context context) {
|
||||
|
||||
//normal
|
||||
// XKitRouter.registerRouter(PATH_TEAM_SETTING_PAGE, TeamSettingActivity.class);
|
||||
registerCreateNormalTeamRouter(
|
||||
context, PATH_CREATE_NORMAL_TEAM_ACTION, () -> TeamIconUtils.getDefaultRandomIconUrl(true));
|
||||
registerCreateAdvanceTeamRouter(
|
||||
context,
|
||||
PATH_CREATE_ADVANCED_TEAM_ACTION,
|
||||
() -> TeamIconUtils.getDefaultRandomIconUrl(true));
|
||||
|
||||
//fun
|
||||
|
||||
registerCreateAdvanceTeamRouter(
|
||||
context,
|
||||
PATH_FUN_CREATE_ADVANCED_TEAM_ACTION,
|
||||
() -> TeamIconUtils.getDefaultRandomIconUrl(false));
|
||||
registerCreateNormalTeamRouter(
|
||||
context,
|
||||
PATH_FUN_CREATE_NORMAL_TEAM_ACTION,
|
||||
() -> TeamIconUtils.getDefaultRandomIconUrl(false));
|
||||
registerInviteUser();
|
||||
return this;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public List<Class<? extends Initializer<?>>> dependencies() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
//将创建讨论组注册到路由器,可通过路由触发
|
||||
@SuppressWarnings("unchecked")
|
||||
public void registerCreateNormalTeamRouter(
|
||||
Context context, String path, RandomUrlProvider provider) {
|
||||
XKitRouter.registerRouter(
|
||||
path,
|
||||
new XKitRouter.RouterValue(
|
||||
path,
|
||||
(value, params, observer) -> {
|
||||
Map<String, Object> customParam = params;
|
||||
if (TeamKitClient.getTeamCustom() != null) {
|
||||
customParam = TeamKitClient.getTeamCustom().customCreateTeam(params);
|
||||
}
|
||||
try {
|
||||
|
||||
List<String> nameList =
|
||||
customParam.get(KEY_REQUEST_SELECTOR_NAME) != null
|
||||
? (List<String>) customParam.get(KEY_REQUEST_SELECTOR_NAME)
|
||||
: new ArrayList<>();
|
||||
List<String> accIdList =
|
||||
customParam.get(REQUEST_CONTACT_SELECTOR_KEY) != null
|
||||
? (List<String>) customParam.get(REQUEST_CONTACT_SELECTOR_KEY)
|
||||
: new ArrayList<>();
|
||||
|
||||
Map<TeamFieldEnum, Serializable> fieldMap =
|
||||
customParam.get(KEY_TEAM_FIELDS) != null
|
||||
? (Map<TeamFieldEnum, Serializable>) customParam.get(KEY_TEAM_FIELDS)
|
||||
: new HashMap<>();
|
||||
String teamName =
|
||||
customParam.get(KEY_TEAM_NAME) != null
|
||||
? String.valueOf(customParam.get(KEY_TEAM_NAME))
|
||||
: TeamUtils.generateNameFromAccIdList(
|
||||
nameList, context.getString(R.string.group_team));
|
||||
String iconUrl =
|
||||
customParam.get(KEY_TEAM_ICON) != null
|
||||
? String.valueOf(customParam.get(KEY_TEAM_ICON))
|
||||
: provider.getRandomUrl();
|
||||
|
||||
if (fieldMap == null) {
|
||||
fieldMap = new HashMap<>();
|
||||
}
|
||||
|
||||
fieldMap.put(TeamFieldEnum.BeInviteMode, TeamBeInviteModeEnum.NoAuth);
|
||||
fieldMap.put(TeamFieldEnum.InviteMode, TeamInviteModeEnum.All);
|
||||
fieldMap.put(TeamFieldEnum.VerifyType, VerifyTypeEnum.Free);
|
||||
fieldMap.put(TeamFieldEnum.TeamUpdateMode, TeamUpdateModeEnum.All);
|
||||
fieldMap.put(
|
||||
TeamFieldEnum.TeamExtensionUpdateMode, TeamExtensionUpdateModeEnum.All);
|
||||
if (fieldMap.containsKey(TeamFieldEnum.Extension)) {
|
||||
String extension =
|
||||
fieldMap.get(TeamFieldEnum.Extension)
|
||||
+ IMKitConstant.TEAM_EXTENSION_SPLIT_TAG
|
||||
+ IMKitConstant.TEAM_GROUP_TAG;
|
||||
fieldMap.put(TeamFieldEnum.Extension, extension);
|
||||
} else {
|
||||
fieldMap.put(TeamFieldEnum.Extension, IMKitConstant.TEAM_GROUP_TAG);
|
||||
}
|
||||
|
||||
if (accIdList == null) {
|
||||
accIdList = new ArrayList<>();
|
||||
}
|
||||
|
||||
TeamRepo.createAdvanceTeam(
|
||||
teamName,
|
||||
iconUrl,
|
||||
accIdList,
|
||||
fieldMap,
|
||||
new FetchCallback<CreateTeamResult>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable CreateTeamResult param) {
|
||||
if (observer != null) {
|
||||
observer.onResult(new ResultInfo<>(param, true));
|
||||
}
|
||||
ALog.e(TeamKitClient.LIB_TAG, TAG, "createNormalTeam onSuccess");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
if (observer != null) {
|
||||
observer.onResult(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
ALog.e(TeamKitClient.LIB_TAG, TAG, "createNormalTeam onFailed:" + code);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
if (observer != null) {
|
||||
observer.onResult(
|
||||
new ResultInfo<>(
|
||||
null, false, new ErrorMsg(-1, "onException", exception)));
|
||||
}
|
||||
ALog.e(TeamKitClient.LIB_TAG, TAG, "createNormalTeam onException:");
|
||||
}
|
||||
});
|
||||
} catch (Exception exception) {
|
||||
ALog.e(
|
||||
TeamKitClient.LIB_TAG,
|
||||
TAG,
|
||||
"createNormalTeam exception:" + exception.getMessage());
|
||||
}
|
||||
|
||||
return true;
|
||||
}));
|
||||
}
|
||||
|
||||
//将创建高级群注册到路由器,可通过路由触发
|
||||
@SuppressWarnings("unchecked")
|
||||
public void registerCreateAdvanceTeamRouter(
|
||||
Context context, String path, RandomUrlProvider provider) {
|
||||
XKitRouter.registerRouter(
|
||||
path,
|
||||
new XKitRouter.RouterValue(
|
||||
path,
|
||||
(value, params, observer) -> {
|
||||
Map<String, Object> customParam = params;
|
||||
if (TeamKitClient.getTeamCustom() != null) {
|
||||
customParam = TeamKitClient.getTeamCustom().customCreateTeam(params);
|
||||
}
|
||||
List<String> nameList =
|
||||
customParam.get(KEY_REQUEST_SELECTOR_NAME) != null
|
||||
? (List<String>) customParam.get(KEY_REQUEST_SELECTOR_NAME)
|
||||
: new ArrayList<>();
|
||||
List<String> accIdList =
|
||||
customParam.get(REQUEST_CONTACT_SELECTOR_KEY) != null
|
||||
? (List<String>) customParam.get(REQUEST_CONTACT_SELECTOR_KEY)
|
||||
: new ArrayList<>();
|
||||
|
||||
Map<TeamFieldEnum, Serializable> fieldMap =
|
||||
customParam.get(KEY_TEAM_FIELDS) != null
|
||||
? (Map<TeamFieldEnum, Serializable>) customParam.get(KEY_TEAM_FIELDS)
|
||||
: new HashMap<>();
|
||||
String teamName =
|
||||
customParam.get(KEY_TEAM_NAME) != null
|
||||
? String.valueOf(customParam.get(KEY_TEAM_NAME))
|
||||
: TeamUtils.generateNameFromAccIdList(
|
||||
nameList, context.getString(R.string.advanced_team));
|
||||
String iconUrl =
|
||||
customParam.get(KEY_TEAM_ICON) != null
|
||||
? String.valueOf(customParam.get(KEY_TEAM_ICON))
|
||||
: provider.getRandomUrl();
|
||||
|
||||
// if (fieldMap != null && !fieldMap.containsKey(TeamFieldEnum.BeInviteMode)) {
|
||||
// fieldMap.put(TeamFieldEnum.BeInviteMode, TeamBeInviteModeEnum.NoAuth);
|
||||
// }
|
||||
//验证模式 。被邀请
|
||||
fieldMap.put(TeamFieldEnum.BeInviteMode, TeamBeInviteModeEnum.NoAuth); //被邀请人不需要验证
|
||||
fieldMap.put(TeamFieldEnum.VerifyType, VerifyTypeEnum.Free);//
|
||||
fieldMap.put(TeamFieldEnum.InviteMode, TeamInviteModeEnum.All); //每个人都可以邀请入群
|
||||
fieldMap.put(TeamFieldEnum.Extension, "1"); //控制是否展示行动码与链接
|
||||
if (customParam.get("autoinvited") != null) {
|
||||
boolean verifyType = (boolean) customParam.get("autoinvited");
|
||||
fieldMap.put(TeamFieldEnum.BeInviteMode, verifyType ? TeamBeInviteModeEnum.NoAuth :TeamBeInviteModeEnum.NeedAuth);
|
||||
}
|
||||
fieldMap.put(TeamFieldEnum.TeamExtensionUpdateMode, TeamExtensionUpdateModeEnum.Manager);
|
||||
|
||||
TeamRepo.createAdvanceTeam(
|
||||
teamName,
|
||||
iconUrl,
|
||||
accIdList,
|
||||
fieldMap,
|
||||
new FetchCallback<CreateTeamResult>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable CreateTeamResult param) {
|
||||
if (observer != null) {
|
||||
observer.onResult(new ResultInfo<>(param, true));
|
||||
}
|
||||
ALog.e(TeamKitClient.LIB_TAG, TAG, "createNormalTeam onSuccess");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
if (observer != null) {
|
||||
observer.onResult(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
ALog.e(TeamKitClient.LIB_TAG, TAG, "createNormalTeam onFailed:" + code);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
if (observer != null) {
|
||||
observer.onResult(
|
||||
new ResultInfo<>(
|
||||
null, false, new ErrorMsg(-1, "onException", exception)));
|
||||
}
|
||||
ALog.e(TeamKitClient.LIB_TAG, TAG, "createNormalTeam onException:");
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
}));
|
||||
}
|
||||
|
||||
public void registerInviteUser() {
|
||||
XKitRouter.registerRouter(
|
||||
PATH_TEAM_INVITE_ACTION,
|
||||
new XKitRouter.RouterValue(
|
||||
PATH_TEAM_INVITE_ACTION,
|
||||
(value, params, observer) -> {
|
||||
Map<String, Object> customParam = params;
|
||||
List<String> accIdList =
|
||||
customParam.get(REQUEST_CONTACT_SELECTOR_KEY) != null
|
||||
? (List<String>) customParam.get(REQUEST_CONTACT_SELECTOR_KEY)
|
||||
: new ArrayList<>();
|
||||
Object teamIdObject = customParam.get(RouterConstant.KEY_TEAM_ID);
|
||||
if (teamIdObject != null && accIdList != null && accIdList.size() > 0) {
|
||||
String teamId = teamIdObject.toString();
|
||||
TeamRepo.inviteUser(teamId, accIdList, null);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}));
|
||||
}
|
||||
|
||||
interface RandomUrlProvider {
|
||||
String getRandomUrl();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,216 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.activity;
|
||||
|
||||
import static com.netease.yunxin.kit.corekit.im.utils.RouterConstant.KEY_TEAM_ICON;
|
||||
import static com.netease.yunxin.kit.corekit.im.utils.RouterConstant.KEY_TEAM_ID;
|
||||
import static com.netease.yunxin.kit.corekit.im.utils.RouterConstant.KEY_TEAM_NAME;
|
||||
import static com.netease.yunxin.kit.teamkit.ui.activity.BaseTeamUpdateIntroduceActivity.KEY_TEAM_INTRODUCE;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.TextView;
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.netease.nimlib.sdk.team.constant.TeamTypeEnum;
|
||||
import com.netease.yunxin.kit.common.ui.activities.BaseActivity;
|
||||
import com.netease.yunxin.kit.common.ui.widgets.ContactAvatarView;
|
||||
import com.netease.yunxin.kit.teamkit.ui.R;
|
||||
import com.netease.yunxin.kit.teamkit.ui.utils.ColorUtils;
|
||||
import java.util.Objects;
|
||||
|
||||
/** team info activity */
|
||||
public abstract class BaseTeamInfoActivity extends BaseActivity {
|
||||
public static final String KEY_TEAM_UPDATE_INFO_PRIVILEGE = "update_info_privilege";
|
||||
public static final String KEY_TEAM_TYPE = "team_type";
|
||||
public static final String KEY_TEAM_IS_GROUP = "team_group_tag";
|
||||
private View rootView;
|
||||
protected View line2;
|
||||
protected View ivBack;
|
||||
protected ContactAvatarView ivIcon;
|
||||
protected TextView tvTitle;
|
||||
protected TextView tvIcon;
|
||||
protected TextView tvName;
|
||||
protected TextView tvIntroduce;
|
||||
|
||||
protected ActivityResultLauncher<Intent> launcher;
|
||||
|
||||
protected String teamId;
|
||||
protected String teamIconUrl;
|
||||
protected String teamIntroduce;
|
||||
protected String teamName;
|
||||
protected TeamTypeEnum teamTypeEnum;
|
||||
protected boolean isGroup = false;
|
||||
|
||||
protected boolean canUpdate = false;
|
||||
protected boolean hasUpdatePrivilege = false;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
rootView = initViewAndGetRootView(savedInstanceState);
|
||||
checkViews();
|
||||
setContentView(rootView);
|
||||
launcher =
|
||||
registerForActivityResult(
|
||||
new ActivityResultContracts.StartActivityForResult(),
|
||||
result -> {
|
||||
Intent data = result.getData();
|
||||
if (result.getResultCode() != RESULT_OK || data == null) {
|
||||
return;
|
||||
}
|
||||
canUpdate = true;
|
||||
Object iconObj = data.getStringExtra(KEY_TEAM_ICON);
|
||||
if (iconObj != null) {
|
||||
teamIconUrl = String.valueOf(iconObj);
|
||||
ivIcon.setData(teamIconUrl, teamName, ColorUtils.avatarColor(teamId));
|
||||
}
|
||||
Object introduceObj = data.getStringExtra(KEY_TEAM_INTRODUCE);
|
||||
if (introduceObj != null) {
|
||||
teamIntroduce = String.valueOf(introduceObj);
|
||||
}
|
||||
Object nameObj = data.getStringExtra(KEY_TEAM_NAME);
|
||||
if (nameObj != null) {
|
||||
teamName = String.valueOf(nameObj);
|
||||
}
|
||||
});
|
||||
|
||||
changeStatusBarColor(R.color.color_eff1f4);
|
||||
|
||||
Intent intent = getIntent();
|
||||
hasUpdatePrivilege = intent.getBooleanExtra(KEY_TEAM_UPDATE_INFO_PRIVILEGE, false);
|
||||
teamId = intent.getStringExtra(KEY_TEAM_ID);
|
||||
teamIconUrl = intent.getStringExtra(KEY_TEAM_ICON);
|
||||
teamIntroduce = intent.getStringExtra(KEY_TEAM_INTRODUCE);
|
||||
teamName = intent.getStringExtra(KEY_TEAM_NAME);
|
||||
isGroup = intent.getBooleanExtra(KEY_TEAM_IS_GROUP, false);
|
||||
teamTypeEnum = (TeamTypeEnum) intent.getSerializableExtra(KEY_TEAM_TYPE);
|
||||
|
||||
ivIcon.setData(teamIconUrl, teamName, ColorUtils.avatarColor(teamId));
|
||||
if (teamTypeEnum == TeamTypeEnum.Advanced && !isGroup) {
|
||||
tvTitle.setText(R.string.team_info_title);
|
||||
tvIcon.setText(R.string.team_icon_title);
|
||||
tvName.setText(R.string.team_name_title);
|
||||
tvIntroduce.setVisibility(View.VISIBLE);
|
||||
line2.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
tvTitle.setText(R.string.team_group_info_title);
|
||||
tvIcon.setText(R.string.team_group_icon_title);
|
||||
tvName.setText(R.string.team_group_name_title);
|
||||
tvIntroduce.setVisibility(View.GONE);
|
||||
line2.setVisibility(View.GONE);
|
||||
}
|
||||
tvIcon.setOnClickListener(
|
||||
v ->
|
||||
BaseTeamUpdateIconActivity.launch(
|
||||
BaseTeamInfoActivity.this,
|
||||
getUpdateIconActivity(),
|
||||
hasUpdatePrivilege,
|
||||
teamId,
|
||||
teamIconUrl,
|
||||
teamName,
|
||||
launcher));
|
||||
tvName.setOnClickListener(
|
||||
v ->
|
||||
BaseTeamUpdateNameActivity.launch(
|
||||
BaseTeamInfoActivity.this,
|
||||
getUpdateNameActivity(),
|
||||
hasUpdatePrivilege,
|
||||
teamTypeEnum,
|
||||
teamId,
|
||||
teamName,
|
||||
isGroup,
|
||||
launcher));
|
||||
tvIntroduce.setOnClickListener(
|
||||
v ->
|
||||
BaseTeamUpdateIntroduceActivity.launch(
|
||||
BaseTeamInfoActivity.this,
|
||||
getUpdateIntroduceActivity(),
|
||||
hasUpdatePrivilege,
|
||||
teamId,
|
||||
teamIntroduce,
|
||||
launcher));
|
||||
ivBack.setOnClickListener(v -> finish());
|
||||
}
|
||||
|
||||
protected abstract View initViewAndGetRootView(Bundle savedInstanceState);
|
||||
|
||||
protected void checkViews() {
|
||||
Objects.requireNonNull(rootView);
|
||||
Objects.requireNonNull(line2);
|
||||
Objects.requireNonNull(ivBack);
|
||||
Objects.requireNonNull(ivIcon);
|
||||
Objects.requireNonNull(tvTitle);
|
||||
Objects.requireNonNull(tvIcon);
|
||||
Objects.requireNonNull(tvName);
|
||||
Objects.requireNonNull(tvIntroduce);
|
||||
}
|
||||
|
||||
protected Class<? extends Activity> getUpdateNameActivity() {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected Class<? extends Activity> getUpdateIconActivity() {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected Class<? extends Activity> getUpdateIntroduceActivity() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finish() {
|
||||
if (canUpdate) {
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra(KEY_TEAM_ICON, teamIconUrl);
|
||||
intent.putExtra(KEY_TEAM_NAME, teamName);
|
||||
intent.putExtra(KEY_TEAM_INTRODUCE, teamIntroduce);
|
||||
setResult(RESULT_OK, intent);
|
||||
}
|
||||
super.finish();
|
||||
}
|
||||
|
||||
public static void launch(
|
||||
Context context,
|
||||
Class<? extends Activity> activity,
|
||||
boolean hasUpdatePrivilege,
|
||||
TeamTypeEnum teamTypeEnum,
|
||||
String teamId,
|
||||
String teamName,
|
||||
String teamIntroduce,
|
||||
String teamIcon,
|
||||
boolean isGroup,
|
||||
ActivityResultLauncher<Intent> launcher) {
|
||||
Intent intent = new Intent(context, activity);
|
||||
intent.putExtra(KEY_TEAM_UPDATE_INFO_PRIVILEGE, hasUpdatePrivilege);
|
||||
intent.putExtra(KEY_TEAM_TYPE, teamTypeEnum);
|
||||
intent.putExtra(KEY_TEAM_ID, teamId);
|
||||
intent.putExtra(KEY_TEAM_ICON, teamIcon);
|
||||
intent.putExtra(KEY_TEAM_NAME, teamName);
|
||||
intent.putExtra(KEY_TEAM_INTRODUCE, teamIntroduce);
|
||||
intent.putExtra(KEY_TEAM_IS_GROUP, isGroup);
|
||||
if (!(context instanceof Activity)) {
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
}
|
||||
launcher.launch(intent);
|
||||
}
|
||||
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if(null != this.getCurrentFocus()){
|
||||
/**
|
||||
* 点击空白位置 隐藏软键盘
|
||||
*/
|
||||
InputMethodManager mInputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
|
||||
return mInputMethodManager.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), 0);
|
||||
}
|
||||
return super .onTouchEvent(event);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.activity;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.viewbinding.ViewBinding;
|
||||
import com.netease.nimlib.sdk.team.constant.TeamTypeEnum;
|
||||
import com.netease.nimlib.sdk.team.model.Team;
|
||||
import com.netease.yunxin.kit.common.ui.activities.BaseActivity;
|
||||
import com.netease.yunxin.kit.common.utils.NetworkUtils;
|
||||
import com.netease.yunxin.kit.corekit.event.BaseEvent;
|
||||
import com.netease.yunxin.kit.corekit.event.EventCenter;
|
||||
import com.netease.yunxin.kit.corekit.event.EventNotify;
|
||||
import com.netease.yunxin.kit.teamkit.ui.R;
|
||||
import com.netease.yunxin.kit.teamkit.ui.adapter.BaseTeamMemberListAdapter;
|
||||
import com.netease.yunxin.kit.teamkit.ui.model.EventDef;
|
||||
import com.netease.yunxin.kit.teamkit.ui.utils.TeamUtils;
|
||||
import com.netease.yunxin.kit.teamkit.ui.utils.viewmodel.TeamSettingViewModel;
|
||||
import java.util.Objects;
|
||||
|
||||
/** team member list activity */
|
||||
public abstract class BaseTeamMemberListActivity extends BaseActivity {
|
||||
public static final String KEY_TEAM_INFO = "team_info";
|
||||
protected final TeamSettingViewModel model = new TeamSettingViewModel();
|
||||
protected String teamId;
|
||||
protected boolean teamGroup = false;
|
||||
protected BaseTeamMemberListAdapter<? extends ViewBinding> adapter;
|
||||
protected TeamTypeEnum teamTypeEnum;
|
||||
|
||||
private View rootView;
|
||||
protected View ivBack;
|
||||
protected View ivClear;
|
||||
protected View groupEmtpy;
|
||||
protected RecyclerView rvMemberList;
|
||||
protected EditText etSearch;
|
||||
|
||||
protected final EventNotify<BaseEvent> closeEventNotify =
|
||||
new EventNotify<BaseEvent>() {
|
||||
@Override
|
||||
public void onNotify(@NonNull BaseEvent message) {
|
||||
finish();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String getEventType() {
|
||||
return EventDef.EVENT_TYPE_CLOSE_CHAT_PAGE;
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
EventCenter.registerEventNotify(closeEventNotify);
|
||||
rootView = initViewAndGetRootView(savedInstanceState);
|
||||
checkViews();
|
||||
setContentView(rootView);
|
||||
|
||||
changeStatusBarColor(R.color.color_white);
|
||||
|
||||
Team teamInfo = (Team) getIntent().getSerializableExtra(KEY_TEAM_INFO);
|
||||
teamId = teamInfo.getId();
|
||||
teamTypeEnum = teamInfo.getType();
|
||||
teamGroup = TeamUtils.isTeamGroup(teamInfo);
|
||||
initUI();
|
||||
configViewModel();
|
||||
}
|
||||
|
||||
protected abstract View initViewAndGetRootView(Bundle savedInstanceState);
|
||||
|
||||
protected void checkViews() {
|
||||
Objects.requireNonNull(rootView);
|
||||
Objects.requireNonNull(ivBack);
|
||||
Objects.requireNonNull(groupEmtpy);
|
||||
Objects.requireNonNull(ivClear);
|
||||
Objects.requireNonNull(rvMemberList);
|
||||
Objects.requireNonNull(etSearch);
|
||||
}
|
||||
|
||||
protected BaseTeamMemberListAdapter<? extends ViewBinding> getMemberListAdapter(
|
||||
TeamTypeEnum typeEnum) {
|
||||
return null;
|
||||
}
|
||||
|
||||
private void initUI() {
|
||||
ivBack.setOnClickListener(v -> finish());
|
||||
rvMemberList.setLayoutManager(
|
||||
new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
|
||||
adapter = getMemberListAdapter(teamTypeEnum);
|
||||
adapter.setGroupIdentify(teamGroup);
|
||||
rvMemberList.setAdapter(adapter);
|
||||
ivClear.setOnClickListener(v -> etSearch.setText(null));
|
||||
etSearch.addTextChangedListener(
|
||||
new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
if (adapter != null) {
|
||||
adapter.filter(s);
|
||||
int count = adapter.getItemCount();
|
||||
if (count <= 0) {
|
||||
groupEmtpy.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
groupEmtpy.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
if (TextUtils.isEmpty(String.valueOf(s))) {
|
||||
ivClear.setVisibility(View.GONE);
|
||||
} else {
|
||||
ivClear.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void configViewModel() {
|
||||
showLoading();
|
||||
if (NetworkUtils.isConnected()) {
|
||||
model.requestTeamMembers(teamId);
|
||||
} else {
|
||||
dismissLoading();
|
||||
Toast.makeText(
|
||||
getApplicationContext(), getString(R.string.team_network_error), Toast.LENGTH_SHORT)
|
||||
.show();
|
||||
}
|
||||
model
|
||||
.getUserInfoData()
|
||||
.observe(
|
||||
this,
|
||||
listResultInfo -> {
|
||||
dismissLoading();
|
||||
if (listResultInfo.getSuccess()) {
|
||||
adapter.addDataList(listResultInfo.getValue(), true);
|
||||
if (adapter.getItemCount() > 0) {
|
||||
groupEmtpy.setVisibility(View.GONE);
|
||||
} else {
|
||||
groupEmtpy.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void launch(Context context, Class<? extends Activity> activity, Team team) {
|
||||
Intent intent = new Intent(context, activity);
|
||||
intent.putExtra(KEY_TEAM_INFO, team);
|
||||
if (!(context instanceof Activity)) {
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
}
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if(null != this.getCurrentFocus()){
|
||||
/**
|
||||
* 点击空白位置 隐藏软键盘
|
||||
*/
|
||||
InputMethodManager mInputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
|
||||
return mInputMethodManager.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), 0);
|
||||
}
|
||||
return super .onTouchEvent(event);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,363 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.activity;
|
||||
|
||||
import static com.netease.yunxin.kit.corekit.im.utils.RouterConstant.KEY_TEAM_ICON;
|
||||
import static com.netease.yunxin.kit.corekit.im.utils.RouterConstant.KEY_TEAM_ID;
|
||||
import static com.netease.yunxin.kit.corekit.im.utils.RouterConstant.KEY_TEAM_NAME;
|
||||
import static com.netease.yunxin.kit.teamkit.ui.activity.BaseTeamInfoActivity.KEY_TEAM_UPDATE_INFO_PRIVILEGE;
|
||||
import static com.netease.yunxin.kit.teamkit.ui.utils.NetworkUtilsWrapper.handleNetworkBrokenResult;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.activity.result.ActivityResultRegistry;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.Group;
|
||||
|
||||
import com.netease.yunxin.kit.common.ui.activities.BaseActivity;
|
||||
import com.netease.yunxin.kit.common.ui.photo.BasePhotoChoiceDialog;
|
||||
import com.netease.yunxin.kit.common.ui.photo.PhotoChoiceDialog;
|
||||
import com.netease.yunxin.kit.common.ui.photo.PhotoPicker;
|
||||
import com.netease.yunxin.kit.common.ui.utils.CommonCallback;
|
||||
import com.netease.yunxin.kit.common.ui.utils.Permission;
|
||||
import com.netease.yunxin.kit.common.ui.utils.ToastX;
|
||||
import com.netease.yunxin.kit.common.ui.widgets.ContactAvatarView;
|
||||
import com.netease.yunxin.kit.common.utils.NetworkUtils;
|
||||
import com.netease.yunxin.kit.common.utils.PermissionUtils;
|
||||
import com.netease.yunxin.kit.corekit.im.provider.FetchCallback;
|
||||
import com.netease.yunxin.kit.corekit.im.repo.CommonRepo;
|
||||
import com.netease.yunxin.kit.teamkit.ui.R;
|
||||
import com.netease.yunxin.kit.teamkit.ui.dialog.PhotoChoiceHighToolsDialog;
|
||||
import com.netease.yunxin.kit.teamkit.ui.utils.ColorUtils;
|
||||
import com.netease.yunxin.kit.teamkit.ui.utils.TeamIconUtils;
|
||||
import com.netease.yunxin.kit.teamkit.ui.utils.TeamUtils;
|
||||
import com.netease.yunxin.kit.teamkit.ui.utils.viewmodel.TeamSettingViewModel;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* set team icon activity
|
||||
*/
|
||||
public abstract class BaseTeamUpdateIconActivity extends BaseActivity implements CommonCallback<File> {
|
||||
protected final TeamSettingViewModel model = new TeamSettingViewModel();
|
||||
|
||||
private View rootView;
|
||||
protected View cancelView;
|
||||
protected Group groupPrivilege;
|
||||
protected ContactAvatarView ivIcon;
|
||||
protected ImageView ivCamera;
|
||||
protected ImageView ivDefault1;
|
||||
protected ImageView ivDefault2;
|
||||
protected ImageView ivDefault3;
|
||||
protected ImageView ivDefault4;
|
||||
protected ImageView ivDefault5;
|
||||
protected TextView tvSave;
|
||||
|
||||
protected View lastFocusView;
|
||||
protected String lastUrl;
|
||||
protected String iconUrl;
|
||||
protected String teamId;
|
||||
protected String teamName;
|
||||
|
||||
protected ActivityResultLauncher<String[]> permissionLauncher;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
rootView = initViewAndGetRootView(savedInstanceState);
|
||||
checkViews();
|
||||
setContentView(rootView);
|
||||
|
||||
lastUrl = getIntent().getStringExtra(KEY_TEAM_ICON);
|
||||
iconUrl = lastUrl;
|
||||
teamId = getIntent().getStringExtra(KEY_TEAM_ID);
|
||||
teamName = getIntent().getStringExtra(KEY_TEAM_NAME);
|
||||
boolean hasUpdatePrivilege = getIntent().getBooleanExtra(KEY_TEAM_UPDATE_INFO_PRIVILEGE, false);
|
||||
groupPrivilege.setVisibility(hasUpdatePrivilege ? View.VISIBLE : View.GONE);
|
||||
|
||||
ivIcon.setData(lastUrl, teamName, ColorUtils.avatarColor(teamId));
|
||||
changeStatusBarColor(R.color.color_eff1f4);
|
||||
ivCamera.setOnClickListener(v -> choicePhoto());
|
||||
|
||||
int index = TeamIconUtils.getDefaultIconUrlIndex(lastUrl, isCircle());
|
||||
switch (index) {
|
||||
case 0:
|
||||
updateFocusBg(ivDefault1, lastUrl);
|
||||
break;
|
||||
case 1:
|
||||
updateFocusBg(ivDefault2, lastUrl);
|
||||
break;
|
||||
case 2:
|
||||
updateFocusBg(ivDefault3, lastUrl);
|
||||
break;
|
||||
case 3:
|
||||
updateFocusBg(ivDefault4, lastUrl);
|
||||
break;
|
||||
case 4:
|
||||
updateFocusBg(ivDefault5, lastUrl);
|
||||
break;
|
||||
}
|
||||
|
||||
ivDefault1.setOnClickListener(v -> updateFocusBg(v, TeamIconUtils.getDefaultIconUrl(0, isCircle())));
|
||||
ivDefault2.setOnClickListener(v -> updateFocusBg(v, TeamIconUtils.getDefaultIconUrl(1, isCircle())));
|
||||
ivDefault3.setOnClickListener(v -> updateFocusBg(v, TeamIconUtils.getDefaultIconUrl(2, isCircle())));
|
||||
ivDefault4.setOnClickListener(v -> updateFocusBg(v, TeamIconUtils.getDefaultIconUrl(3, isCircle())));
|
||||
ivDefault5.setOnClickListener(v -> updateFocusBg(v, TeamIconUtils.getDefaultIconUrl(4, isCircle())));
|
||||
|
||||
cancelView.setOnClickListener(v -> finish());
|
||||
|
||||
tvSave.setOnClickListener(v -> {
|
||||
if (!NetworkUtils.isConnected()) {
|
||||
Toast.makeText(this, R.string.team_network_error, Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
if (!TextUtils.isEmpty(iconUrl)) {
|
||||
showLoading();
|
||||
model.updateIcon(teamId, iconUrl);
|
||||
} else {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
model.getIconData().observe(this, stringResultInfo -> {
|
||||
dismissLoading();
|
||||
if (!stringResultInfo.getSuccess()) {
|
||||
handleNetworkBrokenResult(this, stringResultInfo);
|
||||
return;
|
||||
}
|
||||
if (!TextUtils.equals(lastUrl, iconUrl)) {
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra(KEY_TEAM_ICON, iconUrl);
|
||||
setResult(RESULT_OK, intent);
|
||||
}
|
||||
finish();
|
||||
});
|
||||
permissionLauncher = registerForActivityResult(new ActivityResultContracts.RequestMultiplePermissions(), result -> {
|
||||
if (result != null) {
|
||||
for (Map.Entry<String, Boolean> entry : result.entrySet()) {
|
||||
String permission = entry.getKey().toString();
|
||||
boolean grant = (Boolean) entry.getValue();
|
||||
if (grant) {
|
||||
if (TextUtils.equals(
|
||||
permission, Manifest.permission.READ_MEDIA_IMAGES) || TextUtils.equals(
|
||||
permission, Manifest.permission.READ_MEDIA_VIDEO)) {
|
||||
PhotoPicker.getInstance().getAPhotoFromAlbumCropAndUpload(this, this);
|
||||
}
|
||||
if (TextUtils.equals(
|
||||
permission, Manifest.permission.CAMERA)) {
|
||||
PhotoPicker.getInstance().takePhotoCorpAndUpload(this, this);
|
||||
|
||||
}
|
||||
} else {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
if (shouldShowRequestPermissionRationale(permission)) {
|
||||
ToastX.showShortToast(getResources().getString(com.netease.yunxin.kit.common.ui.R.string.dialog_permission_tips));
|
||||
} else {
|
||||
ToastX.showShortToast(getString(com.netease.yunxin.kit.common.ui.R.string.dialog_permission_tips));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
protected abstract View initViewAndGetRootView(Bundle savedInstanceState);
|
||||
|
||||
protected void checkViews() {
|
||||
Objects.requireNonNull(rootView);
|
||||
Objects.requireNonNull(cancelView);
|
||||
Objects.requireNonNull(groupPrivilege);
|
||||
Objects.requireNonNull(ivIcon);
|
||||
Objects.requireNonNull(ivCamera);
|
||||
Objects.requireNonNull(ivDefault1);
|
||||
Objects.requireNonNull(ivDefault2);
|
||||
Objects.requireNonNull(ivDefault3);
|
||||
Objects.requireNonNull(ivDefault4);
|
||||
Objects.requireNonNull(ivDefault5);
|
||||
Objects.requireNonNull(tvSave);
|
||||
}
|
||||
|
||||
protected boolean isCircle() {
|
||||
return true;
|
||||
}
|
||||
|
||||
private void updateFocusBg(View view, String url) {
|
||||
if (lastFocusView != null) {
|
||||
lastFocusView.setBackground(null);
|
||||
}
|
||||
if (view != null) {
|
||||
view.setBackgroundResource(R.drawable.bg_team_default);
|
||||
}
|
||||
iconUrl = url;
|
||||
ivIcon.setData(iconUrl, teamName, ColorUtils.avatarColor(teamId));
|
||||
lastFocusView = view;
|
||||
}
|
||||
|
||||
|
||||
private void choicePhoto() {
|
||||
TeamUtils.updateHead(this, permissionLauncher, this);
|
||||
// (
|
||||
// new CommonCallback<File>() {
|
||||
// @Override
|
||||
// public void onSuccess(@Nullable File param) {
|
||||
// if (NetworkUtils.isConnected() && param != null) {
|
||||
// CommonRepo.uploadImage(
|
||||
// param,
|
||||
// new FetchCallback<String>() {
|
||||
// @Override
|
||||
// public void onSuccess(@Nullable String urlParam) {
|
||||
// updateFocusBg(null, urlParam);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFailed(int code) {
|
||||
// Toast.makeText(
|
||||
// getApplicationContext(),
|
||||
// getString(R.string.team_request_fail),
|
||||
// Toast.LENGTH_SHORT)
|
||||
// .show();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onException(@Nullable Throwable exception) {
|
||||
// Toast.makeText(
|
||||
// getApplicationContext(),
|
||||
// getString(R.string.team_request_fail),
|
||||
// Toast.LENGTH_SHORT)
|
||||
// .show();
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// Toast.makeText(
|
||||
// getApplicationContext(),
|
||||
// getString(R.string.team_network_error),
|
||||
// Toast.LENGTH_SHORT)
|
||||
// .show();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFailed(int code) {
|
||||
// Toast.makeText(
|
||||
// getApplicationContext(),
|
||||
// getString(R.string.team_request_fail),
|
||||
// Toast.LENGTH_SHORT)
|
||||
// .show();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onException(@Nullable Throwable exception) {
|
||||
// Toast.makeText(
|
||||
// getApplicationContext(),
|
||||
// getString(R.string.team_request_fail),
|
||||
// Toast.LENGTH_SHORT)
|
||||
// .show();
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
// protected PhotoChoiceHighToolsDialog getPhotoChoiceDialog() {
|
||||
// return new PhotoChoiceHighToolsDialog(this);
|
||||
// }
|
||||
|
||||
public static void launch(Context context, Class<? extends Activity> activity, boolean hasUpdatePrivilege, String teamId, String url, String teamName, ActivityResultLauncher<Intent> launcher) {
|
||||
Intent intent = new Intent(context, activity);
|
||||
intent.putExtra(KEY_TEAM_UPDATE_INFO_PRIVILEGE, hasUpdatePrivilege);
|
||||
intent.putExtra(KEY_TEAM_ICON, url);
|
||||
intent.putExtra(KEY_TEAM_ID, teamId);
|
||||
intent.putExtra(KEY_TEAM_NAME, teamName);
|
||||
if (!(context instanceof Activity)) {
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
}
|
||||
launcher.launch(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable throwable) {
|
||||
Toast.makeText(
|
||||
getApplicationContext(),
|
||||
getString(R.string.team_request_fail),
|
||||
Toast.LENGTH_SHORT)
|
||||
.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int i) {
|
||||
Toast.makeText(
|
||||
getApplicationContext(),
|
||||
getString(R.string.team_request_fail),
|
||||
Toast.LENGTH_SHORT)
|
||||
.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(@Nullable File file) {
|
||||
//选取成功
|
||||
if (NetworkUtils.isConnected() && file != null) {
|
||||
CommonRepo.uploadImage(
|
||||
file,
|
||||
new FetchCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable String urlParam) {
|
||||
updateFocusBg(null, urlParam);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
Toast.makeText(
|
||||
getApplicationContext(),
|
||||
getString(R.string.team_request_fail),
|
||||
Toast.LENGTH_SHORT)
|
||||
.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
Toast.makeText(
|
||||
getApplicationContext(),
|
||||
getString(R.string.team_request_fail),
|
||||
Toast.LENGTH_SHORT)
|
||||
.show();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Toast.makeText(
|
||||
getApplicationContext(),
|
||||
getString(R.string.team_network_error),
|
||||
Toast.LENGTH_SHORT)
|
||||
.show();
|
||||
}
|
||||
}
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if(null != this.getCurrentFocus()){
|
||||
/**
|
||||
* 点击空白位置 隐藏软键盘
|
||||
*/
|
||||
InputMethodManager mInputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
|
||||
return mInputMethodManager.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), 0);
|
||||
}
|
||||
return super .onTouchEvent(event);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.activity;
|
||||
|
||||
import static com.netease.yunxin.kit.corekit.im.utils.RouterConstant.KEY_TEAM_ID;
|
||||
import static com.netease.yunxin.kit.teamkit.ui.activity.BaseTeamInfoActivity.KEY_TEAM_UPDATE_INFO_PRIVILEGE;
|
||||
import static com.netease.yunxin.kit.teamkit.ui.utils.NetworkUtilsWrapper.handleNetworkBrokenResult;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.netease.yunxin.kit.common.ui.activities.BaseActivity;
|
||||
import com.netease.yunxin.kit.teamkit.ui.R;
|
||||
import com.netease.yunxin.kit.teamkit.ui.utils.viewmodel.TeamSettingViewModel;
|
||||
import java.util.Objects;
|
||||
|
||||
/** set team introduce activity */
|
||||
public abstract class BaseTeamUpdateIntroduceActivity extends BaseActivity {
|
||||
public static final String KEY_TEAM_INTRODUCE = "team/teamIntroduce";
|
||||
protected static final String MAX_COUNT_STR = "/100";
|
||||
protected final TeamSettingViewModel model = new TeamSettingViewModel();
|
||||
protected boolean canUpdate = false;
|
||||
protected String lastTeamIntroduce;
|
||||
protected String teamId;
|
||||
|
||||
protected String teamIntroduce;
|
||||
protected boolean hasPrivilege;
|
||||
|
||||
private View rootView;
|
||||
protected View cancelView;
|
||||
protected View ivClear;
|
||||
protected TextView tvFlag;
|
||||
protected TextView tvSave;
|
||||
protected EditText etIntroduce;
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
rootView = initViewAndGetRootView(savedInstanceState);
|
||||
checkViews();
|
||||
setContentView(rootView);
|
||||
|
||||
changeStatusBarColor(R.color.color_eff1f4);
|
||||
hasPrivilege = getIntent().getBooleanExtra(KEY_TEAM_UPDATE_INFO_PRIVILEGE, false);
|
||||
teamId = getIntent().getStringExtra(KEY_TEAM_ID);
|
||||
lastTeamIntroduce = getIntent().getStringExtra(KEY_TEAM_INTRODUCE);
|
||||
teamIntroduce = lastTeamIntroduce;
|
||||
cancelView.setOnClickListener(v -> finish());
|
||||
if (!TextUtils.isEmpty(lastTeamIntroduce)) {
|
||||
etIntroduce.setText(lastTeamIntroduce);
|
||||
ivClear.setVisibility(View.VISIBLE);
|
||||
tvFlag.setText(lastTeamIntroduce.length() + MAX_COUNT_STR);
|
||||
}
|
||||
if (!hasPrivilege) {
|
||||
tvSave.setVisibility(View.GONE);
|
||||
etIntroduce.setEnabled(false);
|
||||
ivClear.setVisibility(View.GONE);
|
||||
}
|
||||
etIntroduce.requestFocus();
|
||||
ivClear.setOnClickListener(v -> etIntroduce.setText(""));
|
||||
etIntroduce.addTextChangedListener(
|
||||
new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
if (TextUtils.isEmpty(String.valueOf(s))) {
|
||||
ivClear.setVisibility(View.GONE);
|
||||
} else {
|
||||
ivClear.setVisibility(View.VISIBLE);
|
||||
}
|
||||
tvFlag.setText(String.valueOf(s).length() + MAX_COUNT_STR);
|
||||
}
|
||||
});
|
||||
tvSave.setOnClickListener(
|
||||
v -> model.updateIntroduce(teamId, String.valueOf(etIntroduce.getText())));
|
||||
model
|
||||
.getIntroduceData()
|
||||
.observe(
|
||||
this,
|
||||
stringResultInfo -> {
|
||||
if (!stringResultInfo.getSuccess()) {
|
||||
handleNetworkBrokenResult(this, stringResultInfo);
|
||||
return;
|
||||
}
|
||||
if (!TextUtils.equals(lastTeamIntroduce, String.valueOf(etIntroduce.getText()))) {
|
||||
canUpdate = true;
|
||||
}
|
||||
teamIntroduce = String.valueOf(etIntroduce.getText());
|
||||
finish();
|
||||
});
|
||||
}
|
||||
|
||||
protected abstract View initViewAndGetRootView(Bundle savedInstanceState);
|
||||
|
||||
protected void checkViews() {
|
||||
Objects.requireNonNull(rootView);
|
||||
Objects.requireNonNull(cancelView);
|
||||
Objects.requireNonNull(ivClear);
|
||||
Objects.requireNonNull(tvFlag);
|
||||
Objects.requireNonNull(tvSave);
|
||||
Objects.requireNonNull(etIntroduce);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finish() {
|
||||
if (hasPrivilege && canUpdate) {
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra(KEY_TEAM_INTRODUCE, teamIntroduce);
|
||||
setResult(RESULT_OK, intent);
|
||||
}
|
||||
super.finish();
|
||||
}
|
||||
|
||||
public static void launch(
|
||||
Context context,
|
||||
Class<? extends Activity> activity,
|
||||
boolean hasPrivilege,
|
||||
String teamId,
|
||||
String introduce,
|
||||
ActivityResultLauncher<Intent> launcher) {
|
||||
Intent intent = new Intent(context, activity);
|
||||
intent.putExtra(KEY_TEAM_UPDATE_INFO_PRIVILEGE, hasPrivilege);
|
||||
intent.putExtra(KEY_TEAM_INTRODUCE, introduce);
|
||||
intent.putExtra(KEY_TEAM_ID, teamId);
|
||||
if (!(context instanceof Activity)) {
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
}
|
||||
launcher.launch(intent);
|
||||
}
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if(null != this.getCurrentFocus()){
|
||||
/**
|
||||
* 点击空白位置 隐藏软键盘
|
||||
*/
|
||||
InputMethodManager mInputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
|
||||
return mInputMethodManager.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), 0);
|
||||
}
|
||||
return super .onTouchEvent(event);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,181 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.activity;
|
||||
|
||||
import static com.netease.yunxin.kit.corekit.im.utils.RouterConstant.KEY_TEAM_ID;
|
||||
import static com.netease.yunxin.kit.corekit.im.utils.RouterConstant.KEY_TEAM_NAME;
|
||||
import static com.netease.yunxin.kit.teamkit.ui.activity.BaseTeamInfoActivity.KEY_TEAM_IS_GROUP;
|
||||
import static com.netease.yunxin.kit.teamkit.ui.activity.BaseTeamInfoActivity.KEY_TEAM_TYPE;
|
||||
import static com.netease.yunxin.kit.teamkit.ui.activity.BaseTeamInfoActivity.KEY_TEAM_UPDATE_INFO_PRIVILEGE;
|
||||
import static com.netease.yunxin.kit.teamkit.ui.utils.NetworkUtilsWrapper.handleNetworkBrokenResult;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.netease.nimlib.sdk.team.constant.TeamTypeEnum;
|
||||
import com.netease.yunxin.kit.common.ui.activities.BaseActivity;
|
||||
import com.netease.yunxin.kit.teamkit.ui.R;
|
||||
import com.netease.yunxin.kit.teamkit.ui.utils.viewmodel.TeamSettingViewModel;
|
||||
import java.util.Objects;
|
||||
|
||||
/** set team name activity */
|
||||
public abstract class BaseTeamUpdateNameActivity extends BaseActivity {
|
||||
protected static final String MAX_COUNT_STR = "/30";
|
||||
protected final TeamSettingViewModel model = new TeamSettingViewModel();
|
||||
protected boolean canUpdate = false;
|
||||
protected String lastTeamName;
|
||||
protected String teamId;
|
||||
|
||||
private View rootView;
|
||||
protected View cancelView;
|
||||
protected View ivClear;
|
||||
protected TextView tvTitle;
|
||||
protected TextView tvFlag;
|
||||
protected TextView tvSave;
|
||||
protected EditText etName;
|
||||
|
||||
protected String teamName;
|
||||
protected boolean isGroup;
|
||||
protected boolean hasPrivilege;
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
rootView = initViewAndGetRootView(savedInstanceState);
|
||||
checkViews();
|
||||
setContentView(rootView);
|
||||
|
||||
changeStatusBarColor(R.color.color_eff1f4);
|
||||
hasPrivilege = getIntent().getBooleanExtra(KEY_TEAM_UPDATE_INFO_PRIVILEGE, false);
|
||||
teamId = getIntent().getStringExtra(KEY_TEAM_ID);
|
||||
lastTeamName = getIntent().getStringExtra(KEY_TEAM_NAME);
|
||||
isGroup = getIntent().getBooleanExtra(KEY_TEAM_IS_GROUP, false);
|
||||
TeamTypeEnum typeEnum = (TeamTypeEnum) getIntent().getSerializableExtra(KEY_TEAM_TYPE);
|
||||
|
||||
if (typeEnum == TeamTypeEnum.Advanced && !isGroup) {
|
||||
tvTitle.setText(R.string.team_name_title);
|
||||
} else {
|
||||
tvTitle.setText(R.string.team_group_name_title);
|
||||
}
|
||||
teamName = lastTeamName;
|
||||
cancelView.setOnClickListener(v -> finish());
|
||||
if (!TextUtils.isEmpty(lastTeamName)) {
|
||||
etName.setText(lastTeamName);
|
||||
ivClear.setVisibility(View.VISIBLE);
|
||||
tvFlag.setText(lastTeamName.length() + MAX_COUNT_STR);
|
||||
}
|
||||
if (!hasPrivilege) {
|
||||
tvSave.setVisibility(View.GONE);
|
||||
etName.setEnabled(false);
|
||||
ivClear.setVisibility(View.GONE);
|
||||
}
|
||||
etName.requestFocus();
|
||||
ivClear.setOnClickListener(v -> etName.setText(""));
|
||||
etName.addTextChangedListener(
|
||||
new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
if (TextUtils.isEmpty(String.valueOf(s).trim())) {
|
||||
ivClear.setVisibility(View.GONE);
|
||||
tvSave.setAlpha(0.5f);
|
||||
tvSave.setEnabled(false);
|
||||
} else {
|
||||
ivClear.setVisibility(View.VISIBLE);
|
||||
tvSave.setAlpha(1f);
|
||||
tvSave.setEnabled(true);
|
||||
}
|
||||
tvFlag.setText(String.valueOf(s).length() + MAX_COUNT_STR);
|
||||
}
|
||||
});
|
||||
tvSave.setOnClickListener(v -> model.updateName(teamId, String.valueOf(etName.getText())));
|
||||
model
|
||||
.getNameData()
|
||||
.observe(
|
||||
this,
|
||||
voidResultInfo -> {
|
||||
if (!voidResultInfo.getSuccess()) {
|
||||
handleNetworkBrokenResult(this, voidResultInfo);
|
||||
return;
|
||||
}
|
||||
if (!TextUtils.equals(lastTeamName, voidResultInfo.getValue())) {
|
||||
canUpdate = true;
|
||||
}
|
||||
teamName = String.valueOf(etName.getText());
|
||||
finish();
|
||||
});
|
||||
}
|
||||
|
||||
protected abstract View initViewAndGetRootView(Bundle savedInstanceState);
|
||||
|
||||
protected void checkViews() {
|
||||
Objects.requireNonNull(rootView);
|
||||
Objects.requireNonNull(cancelView);
|
||||
Objects.requireNonNull(ivClear);
|
||||
Objects.requireNonNull(tvFlag);
|
||||
Objects.requireNonNull(tvSave);
|
||||
Objects.requireNonNull(etName);
|
||||
Objects.requireNonNull(tvTitle);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finish() {
|
||||
if (hasPrivilege && canUpdate) {
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra(KEY_TEAM_NAME, teamName);
|
||||
setResult(RESULT_OK, intent);
|
||||
}
|
||||
super.finish();
|
||||
}
|
||||
|
||||
public static void launch(
|
||||
Context context,
|
||||
Class<? extends Activity> activity,
|
||||
boolean hasPrivilege,
|
||||
TeamTypeEnum typeEnum,
|
||||
String teamId,
|
||||
String name,
|
||||
boolean isGroup,
|
||||
ActivityResultLauncher<Intent> launcher) {
|
||||
Intent intent = new Intent(context, activity);
|
||||
intent.putExtra(KEY_TEAM_UPDATE_INFO_PRIVILEGE, hasPrivilege);
|
||||
intent.putExtra(KEY_TEAM_TYPE, typeEnum);
|
||||
intent.putExtra(KEY_TEAM_NAME, name);
|
||||
intent.putExtra(KEY_TEAM_ID, teamId);
|
||||
intent.putExtra(KEY_TEAM_IS_GROUP, isGroup);
|
||||
if (!(context instanceof Activity)) {
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
}
|
||||
launcher.launch(intent);
|
||||
}
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if(null != this.getCurrentFocus()){
|
||||
/**
|
||||
* 点击空白位置 隐藏软键盘
|
||||
*/
|
||||
InputMethodManager mInputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
|
||||
return mInputMethodManager.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), 0);
|
||||
}
|
||||
return super .onTouchEvent(event);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.activity;
|
||||
|
||||
import static com.netease.yunxin.kit.corekit.im.utils.RouterConstant.KEY_TEAM_ID;
|
||||
import static com.netease.yunxin.kit.teamkit.ui.utils.NetworkUtilsWrapper.handleNetworkBrokenResult;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.netease.yunxin.kit.common.ui.activities.BaseActivity;
|
||||
import com.netease.yunxin.kit.teamkit.ui.R;
|
||||
import com.netease.yunxin.kit.teamkit.ui.utils.viewmodel.TeamSettingViewModel;
|
||||
import java.util.Objects;
|
||||
|
||||
/** set nick name activity */
|
||||
public abstract class BaseTeamUpdateNicknameActivity extends BaseActivity {
|
||||
public static final String KEY_TEAM_MY_NICKNAME = "my_team_nickname";
|
||||
protected static final String MAX_COUNT_STR = "/30";
|
||||
protected final TeamSettingViewModel model = new TeamSettingViewModel();
|
||||
|
||||
private View rootView;
|
||||
protected View ivClear;
|
||||
protected View cancelView;
|
||||
protected TextView tvFlag;
|
||||
protected TextView tvSave;
|
||||
protected EditText etNickname;
|
||||
|
||||
protected boolean canUpdate = false;
|
||||
protected String lastTeamNickname;
|
||||
protected String teamId;
|
||||
|
||||
protected String teamNickname;
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
rootView = initViewAndGetRootView(savedInstanceState);
|
||||
checkViews();
|
||||
setContentView(rootView);
|
||||
|
||||
changeStatusBarColor(R.color.color_eff1f4);
|
||||
teamId = getIntent().getStringExtra(KEY_TEAM_ID);
|
||||
lastTeamNickname = getIntent().getStringExtra(KEY_TEAM_MY_NICKNAME);
|
||||
teamNickname = lastTeamNickname;
|
||||
cancelView.setOnClickListener(v -> finish());
|
||||
if (!TextUtils.isEmpty(lastTeamNickname)) {
|
||||
etNickname.setText(lastTeamNickname);
|
||||
ivClear.setVisibility(View.VISIBLE);
|
||||
tvFlag.setText(lastTeamNickname.length() + MAX_COUNT_STR);
|
||||
}
|
||||
etNickname.requestFocus();
|
||||
ivClear.setOnClickListener(v -> etNickname.setText(""));
|
||||
etNickname.addTextChangedListener(
|
||||
new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
if (TextUtils.isEmpty(String.valueOf(s))) {
|
||||
ivClear.setVisibility(View.GONE);
|
||||
} else {
|
||||
ivClear.setVisibility(View.VISIBLE);
|
||||
}
|
||||
tvFlag.setText(String.valueOf(s).length() + MAX_COUNT_STR);
|
||||
}
|
||||
});
|
||||
tvSave.setOnClickListener(
|
||||
v -> model.updateNickname(teamId, String.valueOf(etNickname.getText()).trim()));
|
||||
model
|
||||
.getNicknameData()
|
||||
.observe(
|
||||
this,
|
||||
stringResultInfo -> {
|
||||
if (!stringResultInfo.getSuccess()) {
|
||||
handleNetworkBrokenResult(this, stringResultInfo);
|
||||
return;
|
||||
}
|
||||
if (!TextUtils.equals(lastTeamNickname, stringResultInfo.getValue())) {
|
||||
canUpdate = true;
|
||||
}
|
||||
teamNickname = String.valueOf(etNickname.getText());
|
||||
finish();
|
||||
});
|
||||
}
|
||||
|
||||
protected abstract View initViewAndGetRootView(Bundle savedInstanceState);
|
||||
|
||||
protected void checkViews() {
|
||||
Objects.requireNonNull(rootView);
|
||||
Objects.requireNonNull(cancelView);
|
||||
Objects.requireNonNull(ivClear);
|
||||
Objects.requireNonNull(tvFlag);
|
||||
Objects.requireNonNull(tvSave);
|
||||
Objects.requireNonNull(etNickname);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finish() {
|
||||
if (canUpdate) {
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra(KEY_TEAM_MY_NICKNAME, teamNickname);
|
||||
setResult(RESULT_OK, intent);
|
||||
}
|
||||
super.finish();
|
||||
}
|
||||
|
||||
public static void launch(
|
||||
Context context,
|
||||
Class<? extends Activity> activity,
|
||||
String teamId,
|
||||
String teamNickname,
|
||||
ActivityResultLauncher<Intent> launcher) {
|
||||
Intent intent = new Intent(context, activity);
|
||||
intent.putExtra(KEY_TEAM_MY_NICKNAME, teamNickname);
|
||||
intent.putExtra(KEY_TEAM_ID, teamId);
|
||||
if (!(context instanceof Activity)) {
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
}
|
||||
launcher.launch(intent);
|
||||
}
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if(null != this.getCurrentFocus()){
|
||||
/**
|
||||
* 点击空白位置 隐藏软键盘
|
||||
*/
|
||||
InputMethodManager mInputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
|
||||
return mInputMethodManager.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), 0);
|
||||
}
|
||||
return super .onTouchEvent(event);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.adapter;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import androidx.viewbinding.ViewBinding;
|
||||
import com.netease.nimlib.sdk.team.constant.TeamTypeEnum;
|
||||
import com.netease.yunxin.kit.chatkit.model.UserInfoWithTeam;
|
||||
import com.netease.yunxin.kit.teamkit.ui.utils.FilterUtils;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class BaseTeamMemberListAdapter<R extends ViewBinding>
|
||||
extends TeamCommonAdapter<UserInfoWithTeam, R> {
|
||||
protected final TeamTypeEnum teamTypeEnum;
|
||||
protected List<UserInfoWithTeam> backupTotalData;
|
||||
protected boolean showGroupIdentify = false;
|
||||
|
||||
public BaseTeamMemberListAdapter(
|
||||
Context context, TeamTypeEnum teamTypeEnum, Class<R> viewBinding) {
|
||||
super(context, viewBinding);
|
||||
this.teamTypeEnum = teamTypeEnum;
|
||||
}
|
||||
|
||||
public void setGroupIdentify(boolean identify) {
|
||||
showGroupIdentify = identify;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(
|
||||
R binding, int position, UserInfoWithTeam data, int bingingAdapterPosition) {}
|
||||
|
||||
@Override
|
||||
public void addDataList(List<UserInfoWithTeam> data, boolean clearOld) {
|
||||
super.addDataList(data, clearOld);
|
||||
backupTotalData = new ArrayList<>(data);
|
||||
}
|
||||
|
||||
public void filter(CharSequence sequence) {
|
||||
if (TextUtils.isEmpty(sequence)) {
|
||||
updateDataAndNotify(backupTotalData);
|
||||
return;
|
||||
}
|
||||
|
||||
List<UserInfoWithTeam> filterResult =
|
||||
FilterUtils.filter(
|
||||
backupTotalData,
|
||||
userInfoWithTeam -> {
|
||||
boolean nameContains = userInfoWithTeam.getName().contains(sequence);
|
||||
if (nameContains) {
|
||||
userInfoWithTeam.setSearchPoint(userInfoWithTeam.getName().length());
|
||||
return true;
|
||||
}
|
||||
|
||||
boolean accIdContains =
|
||||
userInfoWithTeam.getTeamInfo().getAccount().contains(sequence);
|
||||
if (accIdContains) {
|
||||
userInfoWithTeam.setSearchPoint(
|
||||
100 + userInfoWithTeam.getTeamInfo().getAccount().length());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
Collections.sort(
|
||||
filterResult,
|
||||
(o1, o2) -> {
|
||||
if (o1 == o2) {
|
||||
return 0;
|
||||
}
|
||||
if (o1 == null) {
|
||||
return 1;
|
||||
}
|
||||
if (o2 == null) {
|
||||
return -1;
|
||||
}
|
||||
return o1.getSearchPoint() - o2.getSearchPoint();
|
||||
});
|
||||
updateDataAndNotify(filterResult);
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
protected void updateDataAndNotify(List<UserInfoWithTeam> list) {
|
||||
dataSource.clear();
|
||||
dataSource.addAll(list);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.adapter;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.viewbinding.ViewBinding;
|
||||
import com.netease.yunxin.kit.alog.ALog;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class TeamCommonAdapter<T, R extends ViewBinding>
|
||||
extends RecyclerView.Adapter<TeamCommonAdapter.ItemViewHolder<R>> {
|
||||
private static final String TAG = "QChatCommonAdapter";
|
||||
private static final String NAME_METHOD_INFLATE = "inflate";
|
||||
protected final List<T> dataSource = new ArrayList<>();
|
||||
protected final Context context;
|
||||
protected OnClickListener<T, R> clickListener;
|
||||
protected Method inflateMethod;
|
||||
|
||||
public TeamCommonAdapter(Context context, Class<R> viewBinding) {
|
||||
this.context = context;
|
||||
try {
|
||||
inflateMethod =
|
||||
viewBinding.getMethod(
|
||||
NAME_METHOD_INFLATE, LayoutInflater.class, ViewGroup.class, boolean.class);
|
||||
} catch (NoSuchMethodException e) {
|
||||
ALog.e(TAG, "Execute construction func fail with viewBinding");
|
||||
throw new IllegalStateException("create adapter error", e);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
public void addDataList(List<T> data, boolean clearOld) {
|
||||
if (clearOld) {
|
||||
dataSource.clear();
|
||||
}
|
||||
if (data == null) {
|
||||
return;
|
||||
}
|
||||
dataSource.addAll(data);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void setItemClickListener(OnClickListener<T, R> listener) {
|
||||
this.clickListener = listener;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public ItemViewHolder<R> onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
R binding;
|
||||
try {
|
||||
binding = (R) inflateMethod.invoke(null, LayoutInflater.from(context), parent, false);
|
||||
} catch (IllegalAccessException | InvocationTargetException e) {
|
||||
ALog.e(TAG, "Execute onCreateViewHolder func fail with viewBinding");
|
||||
throw new IllegalStateException("create view holder error", e);
|
||||
}
|
||||
return new ItemViewHolder<>(Objects.requireNonNull(binding));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ItemViewHolder<R> holder, int position) {
|
||||
T item = getItemData(position);
|
||||
holder.itemView.setOnClickListener(
|
||||
v -> {
|
||||
if (clickListener != null) {
|
||||
clickListener.onClick(item, holder);
|
||||
}
|
||||
});
|
||||
if (item == null) {
|
||||
return;
|
||||
}
|
||||
onBindViewHolder(holder, position, item);
|
||||
}
|
||||
|
||||
public void onBindViewHolder(@NonNull ItemViewHolder<R> holder, int position, T data) {
|
||||
onBindViewHolder(holder.binding, position, data, holder.getBindingAdapterPosition());
|
||||
}
|
||||
|
||||
public void onBindViewHolder(R binding, int position, T data, int bingingAdapterPosition) {}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return dataSource.size();
|
||||
}
|
||||
|
||||
public T getItemData(int position) {
|
||||
if (position < 0 || position >= dataSource.size()) {
|
||||
return null;
|
||||
}
|
||||
return dataSource.get(position);
|
||||
}
|
||||
|
||||
public static class ItemViewHolder<T extends ViewBinding> extends RecyclerView.ViewHolder {
|
||||
public final T binding;
|
||||
|
||||
public ItemViewHolder(T binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
}
|
||||
}
|
||||
|
||||
public interface OnClickListener<T, R extends ViewBinding> {
|
||||
void onClick(T data, ItemViewHolder<R> holder);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.custom;
|
||||
|
||||
public class TeamConfigManager {
|
||||
/** 从其他页面返回群设置页面时,页面中的成员列表是否刷新,默认不刷新 */
|
||||
public static boolean REFRESH_MEMBER_DATA_REAL_TIME_FOR_BACK = false;
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.dialog;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import androidx.annotation.NonNull;
|
||||
import com.netease.yunxin.kit.alog.ALog;
|
||||
import java.util.Objects;
|
||||
|
||||
public abstract class BaseTeamIdentifyDialog extends Dialog {
|
||||
private static final String TAG = "TeamIdentifyDialog";
|
||||
public static final int TYPE_TEAM_OWNER = 0;
|
||||
public static final int TYPE_TEAM_ALL_MEMBER = 1;
|
||||
|
||||
protected TeamChoiceListener callback;
|
||||
private final View rootView;
|
||||
protected View tvTeamAllMember;
|
||||
protected View tvTeamOwner;
|
||||
protected View tvCancel;
|
||||
|
||||
public BaseTeamIdentifyDialog(@NonNull Activity activity, int themeResId) {
|
||||
super(activity, themeResId);
|
||||
rootView = initViewAndGetRootView();
|
||||
checkViews();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
Window window = getWindow();
|
||||
if (window != null) {
|
||||
WindowManager.LayoutParams wlp = window.getAttributes();
|
||||
wlp.gravity = Gravity.BOTTOM;
|
||||
wlp.flags |= WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS;
|
||||
wlp.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||
wlp.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
window.setAttributes(wlp);
|
||||
}
|
||||
setContentView(rootView);
|
||||
setCanceledOnTouchOutside(true);
|
||||
setCancelable(true);
|
||||
|
||||
setOnDismissListener(dialog -> callback = null);
|
||||
}
|
||||
|
||||
protected abstract View initViewAndGetRootView();
|
||||
|
||||
protected void checkViews() {
|
||||
Objects.requireNonNull(rootView);
|
||||
Objects.requireNonNull(tvTeamAllMember);
|
||||
Objects.requireNonNull(tvTeamOwner);
|
||||
Objects.requireNonNull(tvCancel);
|
||||
}
|
||||
|
||||
/** render page */
|
||||
private void renderRootView() {
|
||||
tvTeamAllMember.setOnClickListener(
|
||||
v -> {
|
||||
if (callback != null) {
|
||||
callback.onTypeChoice(TYPE_TEAM_ALL_MEMBER);
|
||||
}
|
||||
dismiss();
|
||||
});
|
||||
tvTeamOwner.setOnClickListener(
|
||||
v -> {
|
||||
if (callback != null) {
|
||||
callback.onTypeChoice(TYPE_TEAM_OWNER);
|
||||
}
|
||||
dismiss();
|
||||
});
|
||||
tvCancel.setOnClickListener(v -> dismiss());
|
||||
}
|
||||
|
||||
public void show(TeamChoiceListener callback) {
|
||||
if (isShowing()) {
|
||||
return;
|
||||
}
|
||||
this.callback = callback;
|
||||
renderRootView();
|
||||
try {
|
||||
super.show();
|
||||
} catch (Throwable throwable) {
|
||||
ALog.e(TAG, "show TeamIdentifyDialog", throwable);
|
||||
}
|
||||
}
|
||||
|
||||
public void dismiss() {
|
||||
if (!isShowing()) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
super.dismiss();
|
||||
} catch (Throwable throwable) {
|
||||
ALog.e(TAG, "dismiss TeamIdentifyDialog", throwable);
|
||||
}
|
||||
}
|
||||
|
||||
public interface TeamChoiceListener {
|
||||
void onTypeChoice(int type);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.netease.yunxin.kit.teamkit.ui.dialog;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.netease.yunxin.kit.common.ui.utils.CommonCallback;
|
||||
import com.netease.yunxin.kit.teamkit.ui.R;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.FunDialogPhotoChoiceBinding;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
//选择拍照或者相册
|
||||
public class PhotoChoiceHighToolsDialog extends Dialog {
|
||||
|
||||
|
||||
private FunDialogPhotoChoiceBinding binding;
|
||||
|
||||
private photochoiceListener photochoiceListener;
|
||||
|
||||
|
||||
public void setPhotochoiceListener(photochoiceListener listener) {
|
||||
this.photochoiceListener = listener;
|
||||
}
|
||||
|
||||
|
||||
public PhotoChoiceHighToolsDialog(@NonNull Activity activity) {
|
||||
super(activity, R.style.FunBottomDialogTheme);
|
||||
binding = FunDialogPhotoChoiceBinding.inflate(getLayoutInflater());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
Window window = getWindow();
|
||||
if (window != null) {
|
||||
WindowManager.LayoutParams wlp = window.getAttributes();
|
||||
wlp.gravity = Gravity.BOTTOM;
|
||||
wlp.flags |= WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS;
|
||||
wlp.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||
wlp.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
window.setAttributes(wlp);
|
||||
}
|
||||
setContentView(binding.getRoot());
|
||||
setCanceledOnTouchOutside(true);
|
||||
setCancelable(true);
|
||||
binding.tvTakePhoto.setOnClickListener(view -> {
|
||||
if (photochoiceListener != null) {
|
||||
photochoiceListener.takephoto();
|
||||
dismiss();
|
||||
}
|
||||
|
||||
});
|
||||
binding.tvGetFromAlbum.setOnClickListener(view -> {
|
||||
if (photochoiceListener != null) {
|
||||
photochoiceListener.getAlbum();
|
||||
dismiss();
|
||||
}
|
||||
|
||||
});
|
||||
binding.tvCancel.setOnClickListener((v) -> {
|
||||
this.dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
public interface photochoiceListener {
|
||||
void takephoto();
|
||||
|
||||
void getAlbum();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.fun.activity;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.netease.yunxin.kit.teamkit.ui.R;
|
||||
import com.netease.yunxin.kit.teamkit.ui.activity.BaseTeamInfoActivity;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.FunTeamInfoActivityBinding;
|
||||
|
||||
/** team info activity */
|
||||
public class FunTeamInfoActivity extends BaseTeamInfoActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
changeStatusBarColor(R.color.color_white);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected View initViewAndGetRootView(Bundle savedInstanceState) {
|
||||
FunTeamInfoActivityBinding binding = FunTeamInfoActivityBinding.inflate(getLayoutInflater());
|
||||
line2 = binding.line2;
|
||||
ivBack = binding.ivBack;
|
||||
ivIcon = binding.ivIcon;
|
||||
tvTitle = binding.tvTitle;
|
||||
tvIcon = binding.tvIcon;
|
||||
tvName = binding.tvName;
|
||||
tvIntroduce = binding.tvIntroduce;
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
protected Class<? extends Activity> getUpdateNameActivity() {
|
||||
return FunTeamUpdateNameActivity.class;
|
||||
}
|
||||
|
||||
protected Class<? extends Activity> getUpdateIconActivity() {
|
||||
return FunTeamUpdateIconActivity.class;
|
||||
}
|
||||
|
||||
protected Class<? extends Activity> getUpdateIntroduceActivity() {
|
||||
return FunTeamUpdateIntroduceActivity.class;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.fun.activity;
|
||||
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.viewbinding.ViewBinding;
|
||||
import com.netease.nimlib.sdk.team.constant.TeamTypeEnum;
|
||||
import com.netease.yunxin.kit.teamkit.ui.R;
|
||||
import com.netease.yunxin.kit.teamkit.ui.activity.BaseTeamMemberListActivity;
|
||||
import com.netease.yunxin.kit.teamkit.ui.adapter.BaseTeamMemberListAdapter;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.FunTeamMemberListActivityBinding;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.FunTeamMemberListItemBinding;
|
||||
import com.netease.yunxin.kit.teamkit.ui.fun.adapter.FunTeamMemberListAdapter;
|
||||
|
||||
/** team member list activity */
|
||||
public class FunTeamMemberListActivity extends BaseTeamMemberListActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
changeStatusBarColor(R.color.color_ededed);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected View initViewAndGetRootView(Bundle savedInstanceState) {
|
||||
FunTeamMemberListActivityBinding binding =
|
||||
FunTeamMemberListActivityBinding.inflate(getLayoutInflater());
|
||||
ivBack = binding.ivBack;
|
||||
ivClear = binding.ivClear;
|
||||
groupEmtpy = binding.groupEmtpy;
|
||||
rvMemberList = binding.rvMemberList;
|
||||
rvMemberList.addItemDecoration(
|
||||
new RecyclerView.ItemDecoration() {
|
||||
@Override
|
||||
public void getItemOffsets(
|
||||
@NonNull Rect outRect,
|
||||
@NonNull View view,
|
||||
@NonNull RecyclerView parent,
|
||||
@NonNull RecyclerView.State state) {
|
||||
super.getItemOffsets(outRect, view, parent, state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDraw(
|
||||
@NonNull Canvas c, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
|
||||
super.onDraw(c, parent, state);
|
||||
}
|
||||
});
|
||||
etSearch = binding.etSearch;
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BaseTeamMemberListAdapter<? extends ViewBinding> getMemberListAdapter(
|
||||
TeamTypeEnum typeEnum) {
|
||||
return new FunTeamMemberListAdapter(this, typeEnum, FunTeamMemberListItemBinding.class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.fun.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.netease.yunxin.kit.common.ui.photo.BasePhotoChoiceDialog;
|
||||
import com.netease.yunxin.kit.common.ui.photo.PhotoChoiceDialog;
|
||||
import com.netease.yunxin.kit.teamkit.ui.R;
|
||||
import com.netease.yunxin.kit.teamkit.ui.activity.BaseTeamUpdateIconActivity;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.FunTeamUpdateIconActivityBinding;
|
||||
import com.netease.yunxin.kit.teamkit.ui.dialog.PhotoChoiceHighToolsDialog;
|
||||
import com.netease.yunxin.kit.teamkit.ui.fun.dialog.FunPhotoChoiceDialog;
|
||||
|
||||
/** set team icon activity */
|
||||
public class FunTeamUpdateIconActivity extends BaseTeamUpdateIconActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
changeStatusBarColor(R.color.color_white);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected View initViewAndGetRootView(Bundle savedInstanceState) {
|
||||
FunTeamUpdateIconActivityBinding binding =
|
||||
FunTeamUpdateIconActivityBinding.inflate(getLayoutInflater());
|
||||
cancelView = binding.ivCancel;
|
||||
groupPrivilege = binding.groupPrivilege;
|
||||
ivIcon = binding.ivIcon;
|
||||
ivCamera = binding.ivCamera;
|
||||
ivDefault1 = binding.ivDefault1;
|
||||
ivDefault2 = binding.ivDefault2;
|
||||
ivDefault3 = binding.ivDefault3;
|
||||
ivDefault4 = binding.ivDefault4;
|
||||
ivDefault5 = binding.ivDefault5;
|
||||
tvSave = binding.tvSave;
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isCircle() {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected PhotoChoiceHighToolsDialog getPhotoChoiceDialog() {
|
||||
return new PhotoChoiceHighToolsDialog(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.fun.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.netease.yunxin.kit.teamkit.ui.R;
|
||||
import com.netease.yunxin.kit.teamkit.ui.activity.BaseTeamUpdateIntroduceActivity;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.FunTeamUpdateIntroduceActivityBinding;
|
||||
|
||||
/** set team introduce activity */
|
||||
public class FunTeamUpdateIntroduceActivity extends BaseTeamUpdateIntroduceActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
changeStatusBarColor(R.color.color_ededed);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected View initViewAndGetRootView(Bundle savedInstanceState) {
|
||||
FunTeamUpdateIntroduceActivityBinding binding =
|
||||
FunTeamUpdateIntroduceActivityBinding.inflate(getLayoutInflater());
|
||||
cancelView = binding.ivCancel;
|
||||
ivClear = binding.ivClear;
|
||||
tvFlag = binding.tvFlag;
|
||||
tvSave = binding.tvSave;
|
||||
etIntroduce = binding.etIntroduce;
|
||||
return binding.getRoot();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.fun.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.netease.yunxin.kit.teamkit.ui.R;
|
||||
import com.netease.yunxin.kit.teamkit.ui.activity.BaseTeamUpdateNameActivity;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.FunTeamUpdateNameActivityBinding;
|
||||
|
||||
/** set team name activity */
|
||||
public class FunTeamUpdateNameActivity extends BaseTeamUpdateNameActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
changeStatusBarColor(R.color.color_ededed);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected View initViewAndGetRootView(Bundle savedInstanceState) {
|
||||
FunTeamUpdateNameActivityBinding binding =
|
||||
FunTeamUpdateNameActivityBinding.inflate(getLayoutInflater());
|
||||
cancelView = binding.ivCancel;
|
||||
ivClear = binding.ivClear;
|
||||
tvTitle = binding.tvTitle;
|
||||
tvFlag = binding.tvFlag;
|
||||
tvSave = binding.tvSave;
|
||||
etName = binding.etName;
|
||||
return binding.getRoot();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.fun.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.netease.yunxin.kit.teamkit.ui.R;
|
||||
import com.netease.yunxin.kit.teamkit.ui.activity.BaseTeamUpdateNicknameActivity;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.FunTeamUpdateNicknameActivityBinding;
|
||||
|
||||
/** set nick name activity */
|
||||
public class FunTeamUpdateNicknameActivity extends BaseTeamUpdateNicknameActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
changeStatusBarColor(R.color.color_ededed);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected View initViewAndGetRootView(Bundle savedInstanceState) {
|
||||
FunTeamUpdateNicknameActivityBinding binding =
|
||||
FunTeamUpdateNicknameActivityBinding.inflate(getLayoutInflater());
|
||||
ivClear = binding.ivClear;
|
||||
cancelView = binding.ivCancel;
|
||||
tvFlag = binding.tvFlag;
|
||||
tvSave = binding.tvSave;
|
||||
etNickname = binding.etNickname;
|
||||
return binding.getRoot();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.fun.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import com.netease.nimlib.sdk.team.constant.TeamMemberType;
|
||||
import com.netease.nimlib.sdk.team.constant.TeamTypeEnum;
|
||||
import com.netease.yunxin.kit.chatkit.model.UserInfoWithTeam;
|
||||
import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
||||
import com.netease.yunxin.kit.corekit.im.model.UserInfo;
|
||||
import com.netease.yunxin.kit.corekit.im.utils.RouterConstant;
|
||||
import com.netease.yunxin.kit.corekit.route.XKitRouter;
|
||||
import com.netease.yunxin.kit.teamkit.ui.adapter.BaseTeamMemberListAdapter;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.FunTeamMemberListItemBinding;
|
||||
import com.netease.yunxin.kit.teamkit.ui.utils.ColorUtils;
|
||||
|
||||
public class FunTeamMemberListAdapter
|
||||
extends BaseTeamMemberListAdapter<FunTeamMemberListItemBinding> {
|
||||
|
||||
public FunTeamMemberListAdapter(
|
||||
Context context, TeamTypeEnum teamTypeEnum, Class<FunTeamMemberListItemBinding> viewBinding) {
|
||||
super(context, teamTypeEnum, viewBinding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(
|
||||
FunTeamMemberListItemBinding binding,
|
||||
int position,
|
||||
UserInfoWithTeam data,
|
||||
int bingingAdapterPosition) {
|
||||
binding.tvUserName.setText(data.getName());
|
||||
if (!showGroupIdentify
|
||||
&& data.getTeamInfo().getType() == TeamMemberType.Owner
|
||||
&& teamTypeEnum == TeamTypeEnum.Advanced) {
|
||||
binding.tvIdentify.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
binding.tvIdentify.setVisibility(View.GONE);
|
||||
}
|
||||
UserInfo userInfo = data.getUserInfo();
|
||||
if (userInfo != null) {
|
||||
binding.cavUserIcon.setData(
|
||||
userInfo.getAvatar(), data.getName(), ColorUtils.avatarColor(userInfo.getAccount()));
|
||||
View.OnClickListener clickListener =
|
||||
v -> {
|
||||
if (TextUtils.equals(userInfo.getAccount(), IMKitClient.account())) {
|
||||
XKitRouter.withKey(RouterConstant.PATH_MINE_INFO_PAGE)
|
||||
.withContext(v.getContext())
|
||||
.navigate();
|
||||
} else {
|
||||
XKitRouter.withKey(RouterConstant.PATH_FUN_USER_INFO_PAGE)
|
||||
.withContext(v.getContext())
|
||||
.withParam("uid", userInfo.getAccount())
|
||||
.navigate();
|
||||
}
|
||||
};
|
||||
binding.cavUserIcon.setOnClickListener(clickListener);
|
||||
binding.tvUserName.setOnClickListener(clickListener);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.fun.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.netease.nimlib.sdk.uinfo.model.NimUserInfo;
|
||||
import com.netease.yunxin.kit.chatkit.model.UserInfoWithTeam;
|
||||
import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
||||
import com.netease.yunxin.kit.corekit.im.utils.RouterConstant;
|
||||
import com.netease.yunxin.kit.corekit.route.XKitRouter;
|
||||
import com.netease.yunxin.kit.teamkit.ui.adapter.TeamCommonAdapter;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.FunTeamSettingUserItemBinding;
|
||||
import com.netease.yunxin.kit.teamkit.ui.utils.ColorUtils;
|
||||
|
||||
public class FunTeamSettingMemberAdapter
|
||||
extends TeamCommonAdapter<UserInfoWithTeam, FunTeamSettingUserItemBinding> {
|
||||
public FunTeamSettingMemberAdapter(
|
||||
Context context, Class<FunTeamSettingUserItemBinding> viewBinding) {
|
||||
super(context, viewBinding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(
|
||||
FunTeamSettingUserItemBinding binding,
|
||||
int position,
|
||||
UserInfoWithTeam data,
|
||||
int bingingAdapterPosition) {
|
||||
NimUserInfo userInfo = data.getUserInfo();
|
||||
if (userInfo != null) {
|
||||
binding.cavUserIcon.setData(
|
||||
userInfo.getAvatar(),
|
||||
data.getName(),
|
||||
ColorUtils.avatarColor(data.getUserInfo().getAccount()));
|
||||
binding.cavUserIcon.setOnClickListener(
|
||||
v -> {
|
||||
if (TextUtils.equals(userInfo.getAccount(), IMKitClient.account())) {
|
||||
XKitRouter.withKey(RouterConstant.PATH_MINE_INFO_PAGE)
|
||||
.withContext(v.getContext())
|
||||
.navigate();
|
||||
} else {
|
||||
XKitRouter.withKey(RouterConstant.PATH_USER_INFO_PAGE)
|
||||
.withContext(v.getContext())
|
||||
.withParam("uid", userInfo.getAccount())
|
||||
.navigate();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.fun.dialog;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.view.View;
|
||||
import androidx.annotation.NonNull;
|
||||
import com.netease.yunxin.kit.common.ui.photo.BasePhotoChoiceDialog;
|
||||
import com.netease.yunxin.kit.teamkit.ui.R;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.FunDialogPhotoChoiceBinding;
|
||||
|
||||
/** This dialog supports to take photos or get a image from album and upload to nos service. */
|
||||
public class FunPhotoChoiceDialog extends BasePhotoChoiceDialog {
|
||||
public FunPhotoChoiceDialog(@NonNull Activity activity) {
|
||||
super(activity, R.style.FunBottomDialogTheme);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected View initViewAndGetRootView() {
|
||||
FunDialogPhotoChoiceBinding binding = FunDialogPhotoChoiceBinding.inflate(getLayoutInflater());
|
||||
takePhotoView = binding.tvTakePhoto;
|
||||
getFromAlbumView = binding.tvGetFromAlbum;
|
||||
cancelView = binding.tvCancel;
|
||||
return binding.getRoot();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.fun.dialog;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.view.View;
|
||||
import androidx.annotation.NonNull;
|
||||
import com.netease.yunxin.kit.teamkit.ui.R;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.FunTeamIdentifyChoiceDialogBinding;
|
||||
import com.netease.yunxin.kit.teamkit.ui.dialog.BaseTeamIdentifyDialog;
|
||||
|
||||
public class FunTeamIdentifyDialog extends BaseTeamIdentifyDialog {
|
||||
|
||||
public FunTeamIdentifyDialog(@NonNull Activity activity) {
|
||||
super(activity, R.style.FunBottomDialogTheme);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected View initViewAndGetRootView() {
|
||||
FunTeamIdentifyChoiceDialogBinding binding =
|
||||
FunTeamIdentifyChoiceDialogBinding.inflate(getLayoutInflater());
|
||||
tvTeamAllMember = binding.tvTeamAllMember;
|
||||
tvTeamOwner = binding.tvTeamOwner;
|
||||
tvCancel = binding.tvCancel;
|
||||
return binding.getRoot();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.model;
|
||||
|
||||
public class EventDef {
|
||||
public static final String EVENT_TYPE_CLOSE_CHAT_PAGE = "CloseChatPageEvent";
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.normal.activity;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import com.netease.yunxin.kit.teamkit.ui.activity.BaseTeamInfoActivity;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.TeamInfoActivityBinding;
|
||||
|
||||
/** team info activity */
|
||||
public class TeamInfoActivity extends BaseTeamInfoActivity {
|
||||
|
||||
@Override
|
||||
protected View initViewAndGetRootView(Bundle savedInstanceState) {
|
||||
TeamInfoActivityBinding binding = TeamInfoActivityBinding.inflate(getLayoutInflater());
|
||||
line2 = binding.line2;
|
||||
ivBack = binding.ivBack;
|
||||
ivIcon = binding.ivIcon;
|
||||
tvTitle = binding.tvTitle;
|
||||
tvIcon = binding.tvIcon;
|
||||
tvName = binding.tvName;
|
||||
tvIntroduce = binding.tvIntroduce;
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
protected Class<? extends Activity> getUpdateNameActivity() {
|
||||
return TeamUpdateNameActivity.class;
|
||||
}
|
||||
|
||||
protected Class<? extends Activity> getUpdateIconActivity() {
|
||||
return TeamUpdateIconActivity.class;
|
||||
}
|
||||
|
||||
protected Class<? extends Activity> getUpdateIntroduceActivity() {
|
||||
return TeamUpdateIntroduceActivity.class;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.normal.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import androidx.viewbinding.ViewBinding;
|
||||
import com.netease.nimlib.sdk.team.constant.TeamTypeEnum;
|
||||
import com.netease.yunxin.kit.teamkit.ui.activity.BaseTeamMemberListActivity;
|
||||
import com.netease.yunxin.kit.teamkit.ui.adapter.BaseTeamMemberListAdapter;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.TeamMemberListActivityBinding;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.TeamMemberListItemBinding;
|
||||
import com.netease.yunxin.kit.teamkit.ui.normal.adapter.TeamMemberListAdapter;
|
||||
|
||||
/** team member list activity */
|
||||
public class TeamMemberListActivity extends BaseTeamMemberListActivity {
|
||||
|
||||
@Override
|
||||
protected View initViewAndGetRootView(Bundle savedInstanceState) {
|
||||
TeamMemberListActivityBinding binding =
|
||||
TeamMemberListActivityBinding.inflate(getLayoutInflater());
|
||||
ivBack = binding.ivBack;
|
||||
ivClear = binding.ivClear;
|
||||
rvMemberList = binding.rvMemberList;
|
||||
groupEmtpy = binding.groupEmtpy;
|
||||
etSearch = binding.etSearch;
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BaseTeamMemberListAdapter<? extends ViewBinding> getMemberListAdapter(
|
||||
TeamTypeEnum typeEnum) {
|
||||
return new TeamMemberListAdapter(this, typeEnum, TeamMemberListItemBinding.class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.normal.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import com.netease.yunxin.kit.common.ui.photo.BasePhotoChoiceDialog;
|
||||
import com.netease.yunxin.kit.common.ui.photo.PhotoChoiceDialog;
|
||||
import com.netease.yunxin.kit.teamkit.ui.activity.BaseTeamUpdateIconActivity;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.TeamUpdateIconActivityBinding;
|
||||
import com.netease.yunxin.kit.teamkit.ui.dialog.PhotoChoiceHighToolsDialog;
|
||||
|
||||
/** set team icon activity */
|
||||
public class TeamUpdateIconActivity extends BaseTeamUpdateIconActivity {
|
||||
@Override
|
||||
protected View initViewAndGetRootView(Bundle savedInstanceState) {
|
||||
TeamUpdateIconActivityBinding binding =
|
||||
TeamUpdateIconActivityBinding.inflate(getLayoutInflater());
|
||||
cancelView = binding.tvCancel;
|
||||
groupPrivilege = binding.groupPrivilege;
|
||||
ivIcon = binding.ivIcon;
|
||||
ivCamera = binding.ivCamera;
|
||||
ivDefault1 = binding.ivDefault1;
|
||||
ivDefault2 = binding.ivDefault2;
|
||||
ivDefault3 = binding.ivDefault3;
|
||||
ivDefault4 = binding.ivDefault4;
|
||||
ivDefault5 = binding.ivDefault5;
|
||||
tvSave = binding.tvSave;
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isCircle() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// protected PhotoChoiceHighToolsDialog getPhotoChoiceDialog() {
|
||||
// return new PhotoChoiceHighToolsDialog(this);
|
||||
// }
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.normal.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import com.netease.yunxin.kit.teamkit.ui.activity.BaseTeamUpdateIntroduceActivity;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.TeamUpdateIntroduceActivityBinding;
|
||||
|
||||
/** set team introduce activity */
|
||||
public class TeamUpdateIntroduceActivity extends BaseTeamUpdateIntroduceActivity {
|
||||
|
||||
@Override
|
||||
protected View initViewAndGetRootView(Bundle savedInstanceState) {
|
||||
TeamUpdateIntroduceActivityBinding binding =
|
||||
TeamUpdateIntroduceActivityBinding.inflate(getLayoutInflater());
|
||||
cancelView = binding.tvCancel;
|
||||
ivClear = binding.ivClear;
|
||||
tvFlag = binding.tvFlag;
|
||||
tvSave = binding.tvSave;
|
||||
etIntroduce = binding.etIntroduce;
|
||||
return binding.getRoot();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.normal.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import com.netease.yunxin.kit.teamkit.ui.activity.BaseTeamUpdateNameActivity;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.TeamUpdateNameActivityBinding;
|
||||
|
||||
/** set team name activity */
|
||||
public class TeamUpdateNameActivity extends BaseTeamUpdateNameActivity {
|
||||
|
||||
@Override
|
||||
protected View initViewAndGetRootView(Bundle savedInstanceState) {
|
||||
TeamUpdateNameActivityBinding binding =
|
||||
TeamUpdateNameActivityBinding.inflate(getLayoutInflater());
|
||||
cancelView = binding.tvCancel;
|
||||
ivClear = binding.ivClear;
|
||||
tvTitle = binding.tvTitle;
|
||||
tvFlag = binding.tvFlag;
|
||||
tvSave = binding.tvSave;
|
||||
etName = binding.etName;
|
||||
return binding.getRoot();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.normal.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import com.netease.yunxin.kit.teamkit.ui.activity.BaseTeamUpdateNicknameActivity;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.TeamUpdateNicknameActivityBinding;
|
||||
|
||||
/** set nick name activity */
|
||||
public class TeamUpdateNicknameActivity extends BaseTeamUpdateNicknameActivity {
|
||||
|
||||
@Override
|
||||
protected View initViewAndGetRootView(Bundle savedInstanceState) {
|
||||
TeamUpdateNicknameActivityBinding binding =
|
||||
TeamUpdateNicknameActivityBinding.inflate(getLayoutInflater());
|
||||
ivClear = binding.ivClear;
|
||||
cancelView = binding.tvCancel;
|
||||
tvFlag = binding.tvFlag;
|
||||
tvSave = binding.tvSave;
|
||||
etNickname = binding.etNickname;
|
||||
return binding.getRoot();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.normal.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import com.netease.nimlib.sdk.team.constant.TeamMemberType;
|
||||
import com.netease.nimlib.sdk.team.constant.TeamTypeEnum;
|
||||
import com.netease.yunxin.kit.chatkit.model.UserInfoWithTeam;
|
||||
import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
||||
import com.netease.yunxin.kit.corekit.im.model.UserInfo;
|
||||
import com.netease.yunxin.kit.corekit.im.utils.RouterConstant;
|
||||
import com.netease.yunxin.kit.corekit.route.XKitRouter;
|
||||
import com.netease.yunxin.kit.teamkit.ui.adapter.BaseTeamMemberListAdapter;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.TeamMemberListItemBinding;
|
||||
import com.netease.yunxin.kit.teamkit.ui.utils.ColorUtils;
|
||||
|
||||
public class TeamMemberListAdapter extends BaseTeamMemberListAdapter<TeamMemberListItemBinding> {
|
||||
|
||||
public TeamMemberListAdapter(
|
||||
Context context, TeamTypeEnum teamTypeEnum, Class<TeamMemberListItemBinding> viewBinding) {
|
||||
super(context, teamTypeEnum, viewBinding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(
|
||||
TeamMemberListItemBinding binding,
|
||||
int position,
|
||||
UserInfoWithTeam data,
|
||||
int bingingAdapterPosition) {
|
||||
binding.tvUserName.setText(data.getName());
|
||||
if (!showGroupIdentify
|
||||
&& data.getTeamInfo().getType() == TeamMemberType.Owner
|
||||
&& teamTypeEnum == TeamTypeEnum.Advanced) {
|
||||
binding.tvIdentify.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
binding.tvIdentify.setVisibility(View.GONE);
|
||||
}
|
||||
UserInfo userInfo = data.getUserInfo();
|
||||
if (userInfo != null) {
|
||||
binding.cavUserIcon.setData(
|
||||
userInfo.getAvatar(), data.getName(), ColorUtils.avatarColor(userInfo.getAccount()));
|
||||
View.OnClickListener clickListener =
|
||||
v -> {
|
||||
if (TextUtils.equals(userInfo.getAccount(), IMKitClient.account())) {
|
||||
XKitRouter.withKey(RouterConstant.PATH_MINE_INFO_PAGE)
|
||||
.withContext(v.getContext())
|
||||
.navigate();
|
||||
} else {
|
||||
XKitRouter.withKey(RouterConstant.PATH_USER_INFO_PAGE)
|
||||
.withContext(v.getContext())
|
||||
.withParam("uid", userInfo.getAccount())
|
||||
.navigate();
|
||||
}
|
||||
};
|
||||
binding.cavUserIcon.setOnClickListener(clickListener);
|
||||
binding.tvUserName.setOnClickListener(clickListener);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.normal.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.netease.nimlib.sdk.uinfo.model.NimUserInfo;
|
||||
import com.netease.yunxin.kit.chatkit.model.UserInfoWithTeam;
|
||||
import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
||||
import com.netease.yunxin.kit.corekit.im.utils.RouterConstant;
|
||||
import com.netease.yunxin.kit.corekit.route.XKitRouter;
|
||||
import com.netease.yunxin.kit.teamkit.ui.adapter.TeamCommonAdapter;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.TeamSettingUserItemBinding;
|
||||
import com.netease.yunxin.kit.teamkit.ui.utils.ColorUtils;
|
||||
|
||||
public class TeamSettingMemberAdapter
|
||||
extends TeamCommonAdapter<UserInfoWithTeam, TeamSettingUserItemBinding> {
|
||||
public TeamSettingMemberAdapter(Context context, Class<TeamSettingUserItemBinding> viewBinding) {
|
||||
super(context, viewBinding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(
|
||||
TeamSettingUserItemBinding binding,
|
||||
int position,
|
||||
UserInfoWithTeam data,
|
||||
int bingingAdapterPosition) {
|
||||
NimUserInfo userInfo = data.getUserInfo();
|
||||
if (userInfo != null) {
|
||||
binding.cavUserIcon.setData(
|
||||
userInfo.getAvatar(),
|
||||
data.getName(),
|
||||
ColorUtils.avatarColor(data.getUserInfo().getAccount()));
|
||||
binding.cavUserIcon.setOnClickListener(
|
||||
v -> {
|
||||
if (TextUtils.equals(userInfo.getAccount(), IMKitClient.account())) {
|
||||
XKitRouter.withKey(RouterConstant.PATH_MINE_INFO_PAGE)
|
||||
.withContext(v.getContext())
|
||||
.navigate();
|
||||
} else {
|
||||
XKitRouter.withKey(RouterConstant.PATH_USER_INFO_PAGE)
|
||||
.withContext(v.getContext())
|
||||
.withParam("uid", userInfo.getAccount())
|
||||
.navigate();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.normal.dialog;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.view.View;
|
||||
import androidx.annotation.NonNull;
|
||||
import com.netease.yunxin.kit.teamkit.ui.R;
|
||||
import com.netease.yunxin.kit.teamkit.ui.databinding.TeamIdentifyChoiceDialogBinding;
|
||||
import com.netease.yunxin.kit.teamkit.ui.dialog.BaseTeamIdentifyDialog;
|
||||
|
||||
public class TeamIdentifyDialog extends BaseTeamIdentifyDialog {
|
||||
|
||||
public TeamIdentifyDialog(@NonNull Activity activity) {
|
||||
super(activity, R.style.BottomDialogTheme);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected View initViewAndGetRootView() {
|
||||
TeamIdentifyChoiceDialogBinding binding =
|
||||
TeamIdentifyChoiceDialogBinding.inflate(getLayoutInflater());
|
||||
tvTeamAllMember = binding.tvTeamAllMember;
|
||||
tvTeamOwner = binding.tvTeamOwner;
|
||||
tvCancel = binding.tvCancel;
|
||||
return binding.getRoot();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.utils;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
public class ColorUtils {
|
||||
|
||||
public static int avatarColor(String content) {
|
||||
if (!TextUtils.isEmpty(content)) {
|
||||
return content.charAt(content.length() - 1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
* Use of this source code is governed by a MIT license that can be
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.utils
|
||||
|
||||
object FilterUtils {
|
||||
|
||||
@JvmStatic
|
||||
fun <T> filter(sourceList: List<T>, predicate: (T) -> Boolean): List<T> {
|
||||
return sourceList.filter {
|
||||
predicate(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.widget.Toast;
|
||||
import androidx.annotation.NonNull;
|
||||
import com.netease.yunxin.kit.common.utils.NetworkUtils;
|
||||
import com.netease.yunxin.kit.corekit.model.ResultInfo;
|
||||
import com.netease.yunxin.kit.teamkit.ui.R;
|
||||
|
||||
public final class NetworkUtilsWrapper {
|
||||
|
||||
public static void doActionAndFilterNetworkBroken(Context context, @NonNull Runnable runnable) {
|
||||
if (NetworkUtils.isConnected()) {
|
||||
runnable.run();
|
||||
} else {
|
||||
Toast.makeText(context, R.string.team_network_error, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean handleNetworkBrokenResult(Context context, ResultInfo<?> resultInfo) {
|
||||
if (resultInfo == null) {
|
||||
return false;
|
||||
}
|
||||
if (!resultInfo.getSuccess()) {
|
||||
if (!NetworkUtils.isConnected()) {
|
||||
Toast.makeText(context, R.string.team_network_error, Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(context, R.string.team_request_fail, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.utils;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import kotlin.random.Random;
|
||||
|
||||
public class TeamIconUtils {
|
||||
|
||||
public static final String[] DEFAULT_ICON_URL_ARRAY =
|
||||
new String[] {
|
||||
"https://s.netease.im/safe/ABg8YjWQWvcqO6sAAAAAAAAAAAA?_im_url=1",
|
||||
"https://s.netease.im/safe/ABg8YjmQWvcqO6sAAAAAAAABAAA?_im_url=1",
|
||||
"https://s.netease.im/safe/ABg8YjyQWvcqO6sAAAAAAAABAAA?_im_url=1",
|
||||
"https://s.netease.im/safe/ABg8YkCQWvcqO6sAAAAAAAABAAA?_im_url=1",
|
||||
"https://s.netease.im/safe/ABg8YkSQWvcqO6sAAAAAAAABAAA?_im_url=1"
|
||||
};
|
||||
public static final String[] DEFAULT_ICON_URL_ARRAY_SQUARE =
|
||||
new String[] {
|
||||
"https://nim-nosdn.netease.im/MjYxNDkzNzE=/bmltYV8xNDIxMTk0NzAzMzhfMTY4NDgyNzc0MTczNV8yY2FlMjczZS01MDk0LTQ5NWMtODMzMS1mYTBmMTE1NmEyNDQ=",
|
||||
"https://nim-nosdn.netease.im/MjYxNDkzNzE=/bmltYV8xNDIxMTk0NzAzMzhfMTY4NDgyNzc0MTczNV9jYWJmNjViNy1kMGM3LTRiNDEtYmVmMi1jYjhiNzRjY2EwY2M=",
|
||||
"https://nim-nosdn.netease.im/MjYxNDkzNzE=/bmltYV8xNDIxMTk0NzAzMzhfMTY4NDgyNzc0MTczNV8yMzY1YmY5YS0xNGE1LTQxYTctYTg2My1hMzMyZWE5YzhhOTQ=",
|
||||
"https://nim-nosdn.netease.im/MjYxNDkzNzE=/bmltYV8xNDIxMTk0NzAzMzhfMTY4NDgyNzc0MTczNV80NTQxMDhhNy1mNWMzLTQxMzMtOWU3NS1hNThiN2FiNjI5MWY=",
|
||||
"https://nim-nosdn.netease.im/MjYxNDkzNzE=/bmltYV8xNDIxMTk0NzAzMzhfMTY4NDgyNzc0MTczNV8wMGVlNWUyOS0wYzg3LTQxMzUtYmVjOS00YjI1MjcxMDhhNTM="
|
||||
};
|
||||
|
||||
public static String getDefaultIconUrl(int index, boolean isCircle) {
|
||||
if (index < 0 || index > 4) {
|
||||
return null;
|
||||
}
|
||||
return getDefaultIconUrlArray(isCircle)[index];
|
||||
}
|
||||
|
||||
public static int getDefaultIconUrlIndex(String url, boolean isCircle) {
|
||||
String[] array = getDefaultIconUrlArray(isCircle);
|
||||
for (int index = 0; index < array.length; index++) {
|
||||
if (TextUtils.equals(url, array[index])) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static String getDefaultRandomIconUrl(boolean isCircle) {
|
||||
return getDefaultIconUrlArray(isCircle)[Random.Default.nextInt(0, 5)];
|
||||
}
|
||||
|
||||
private static String[] getDefaultIconUrlArray(boolean isCircle) {
|
||||
return isCircle ? DEFAULT_ICON_URL_ARRAY : DEFAULT_ICON_URL_ARRAY_SQUARE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.utils;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.os.Build;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
|
||||
import com.netease.nimlib.sdk.team.constant.TeamTypeEnum;
|
||||
import com.netease.nimlib.sdk.team.model.Team;
|
||||
import com.netease.yunxin.kit.common.ui.photo.PhotoPicker;
|
||||
import com.netease.yunxin.kit.common.ui.utils.CommonCallback;
|
||||
import com.netease.yunxin.kit.common.utils.PermissionUtils;
|
||||
import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
||||
import com.netease.yunxin.kit.corekit.im.model.UserInfo;
|
||||
import com.netease.yunxin.kit.corekit.im.utils.IMKitConstant;
|
||||
import com.netease.yunxin.kit.teamkit.ui.dialog.PhotoChoiceHighToolsDialog;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
public class TeamUtils {
|
||||
|
||||
//是否为讨论组
|
||||
public static boolean isTeamGroup(Team teamInfo) {
|
||||
String teamExtension = teamInfo.getExtension();
|
||||
if ((teamExtension != null && teamExtension.contains(IMKitConstant.TEAM_GROUP_TAG))
|
||||
|| teamInfo.getType() == TeamTypeEnum.Normal) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String generateNameFromAccIdList(List<String> nameList, String defaultName) {
|
||||
|
||||
int maxTeamNameLength = 30;
|
||||
if (nameList == null || nameList.size() < 1) {
|
||||
return defaultName;
|
||||
}
|
||||
int nameLength = Math.min(nameList.size(), maxTeamNameLength);
|
||||
List<String> names = nameList.subList(0, nameLength);
|
||||
String myName = IMKitClient.account();
|
||||
UserInfo userInfo = IMKitClient.getUserInfo();
|
||||
if (userInfo != null && !TextUtils.isEmpty(userInfo.getName())) {
|
||||
myName = userInfo.getName();
|
||||
}
|
||||
StringBuilder nameBuilder = new StringBuilder(myName);
|
||||
for (String item : names) {
|
||||
nameBuilder.append("、");
|
||||
nameBuilder.append(item);
|
||||
}
|
||||
return nameBuilder.substring(0, Math.min(maxTeamNameLength, nameBuilder.length()));
|
||||
}
|
||||
|
||||
protected static String[] permissionForCamera = new String[]{Manifest.permission.CAMERA};
|
||||
protected static String[] permissionForAlbum = new String[]{Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.READ_MEDIA_VIDEO};
|
||||
protected static String[] permissionForAlbumLower = new String[]{Manifest.permission.READ_EXTERNAL_STORAGE};
|
||||
|
||||
public static void updateHead(Activity activity, ActivityResultLauncher permissionLauncer, CommonCallback<File> fileCommonCallback) {
|
||||
PhotoChoiceHighToolsDialog dialog = new PhotoChoiceHighToolsDialog(activity);
|
||||
dialog.setPhotochoiceListener(new PhotoChoiceHighToolsDialog.photochoiceListener() {
|
||||
@Override
|
||||
public void takephoto() {
|
||||
doRequestPermission(activity, true, permissionLauncer, fileCommonCallback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAlbum() {
|
||||
doRequestPermission(activity, false, permissionLauncer, fileCommonCallback);
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
public static void doRequestPermission(Activity activity, boolean isTakePhoto, ActivityResultLauncher permissionLauncer, CommonCallback<File> fileCommonCallback) {
|
||||
if (isTakePhoto) {
|
||||
if (PermissionUtils.hasPermissions(activity, permissionForCamera)) {
|
||||
PhotoPicker.getInstance().takePhotoCorpAndUpload(activity, fileCommonCallback);
|
||||
} else {
|
||||
permissionLauncer.launch(permissionForCamera);
|
||||
}
|
||||
} else {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
// if (PermissionUtils.hasPermissions(
|
||||
// activity, permissionForAlbum)) {
|
||||
// PhotoPicker.getInstance().getAPhotoFromAlbumCropAndUpload(activity, fileCommonCallback);
|
||||
// } else {
|
||||
// permissionLauncer.launch(permissionForAlbum);
|
||||
// }
|
||||
PhotoPicker.getInstance().getAPhotoFromAlbumCropAndUpload(activity, fileCommonCallback);
|
||||
} else {
|
||||
if (PermissionUtils.hasPermissions(
|
||||
activity, permissionForAlbumLower)) {
|
||||
PhotoPicker.getInstance().getAPhotoFromAlbumCropAndUpload(activity, fileCommonCallback);
|
||||
} else {
|
||||
permissionLauncer.launch(permissionForAlbumLower);
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (PermissionUtils.hasPermissions(activity, isTakePhoto ? permissionForCamera : permissionForAlbum)) {
|
||||
// if (isTakePhoto) {
|
||||
// PhotoPicker.getInstance().takePhotoCorpAndUpload(activity, fileCommonCallback);
|
||||
// } else {
|
||||
// PhotoPicker.getInstance().getAPhotoFromAlbumCropAndUpload(activity, fileCommonCallback);
|
||||
// }
|
||||
// } else {
|
||||
// permissionLauncer.launch(isTakePhoto ? permissionForCamera : permissionForAlbum);
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,840 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.netease.yunxin.kit.teamkit.ui.utils.viewmodel;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
import com.netease.nimlib.sdk.NIMClient;
|
||||
import com.netease.nimlib.sdk.RequestCallback;
|
||||
import com.netease.nimlib.sdk.msg.MsgService;
|
||||
import com.netease.nimlib.sdk.msg.constant.DeleteTypeEnum;
|
||||
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
|
||||
import com.netease.nimlib.sdk.msg.model.StickTopSessionInfo;
|
||||
import com.netease.nimlib.sdk.team.TeamService;
|
||||
import com.netease.nimlib.sdk.team.constant.TeamFieldEnum;
|
||||
import com.netease.nimlib.sdk.team.constant.TeamInviteModeEnum;
|
||||
import com.netease.nimlib.sdk.team.constant.TeamTypeEnum;
|
||||
import com.netease.nimlib.sdk.team.constant.TeamUpdateModeEnum;
|
||||
import com.netease.nimlib.sdk.team.model.Team;
|
||||
import com.netease.nimlib.sdk.team.model.TeamMember;
|
||||
import com.netease.yunxin.kit.alog.ALog;
|
||||
import com.netease.yunxin.kit.chatkit.model.TeamWithCurrentMember;
|
||||
import com.netease.yunxin.kit.chatkit.model.UserInfoWithTeam;
|
||||
import com.netease.yunxin.kit.chatkit.repo.ConversationRepo;
|
||||
import com.netease.yunxin.kit.chatkit.repo.TeamRepo;
|
||||
import com.netease.yunxin.kit.common.ui.viewmodel.BaseViewModel;
|
||||
import com.netease.yunxin.kit.common.ui.viewmodel.FetchResult;
|
||||
import com.netease.yunxin.kit.common.ui.viewmodel.LoadStatus;
|
||||
import com.netease.yunxin.kit.corekit.event.EventCenter;
|
||||
import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
||||
import com.netease.yunxin.kit.corekit.im.custom.TeamEvent;
|
||||
import com.netease.yunxin.kit.corekit.im.custom.TeamEventAction;
|
||||
import com.netease.yunxin.kit.corekit.im.model.UserInfo;
|
||||
import com.netease.yunxin.kit.corekit.im.provider.FetchCallback;
|
||||
import com.netease.yunxin.kit.corekit.model.ErrorMsg;
|
||||
import com.netease.yunxin.kit.corekit.model.ResultInfo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
public class TeamSettingViewModel extends BaseViewModel {
|
||||
private static final String TAG = "TeamSettingViewModel";
|
||||
private static final String LIB_TAG = "TeamKit-UI";
|
||||
private final MutableLiveData<ResultInfo<TeamWithCurrentMember>> teamWithMemberData =
|
||||
new MutableLiveData<>();
|
||||
private final MutableLiveData<ResultInfo<List<UserInfoWithTeam>>> userInfoData =
|
||||
new MutableLiveData<>();
|
||||
private final MutableLiveData<ResultInfo<String>> nameData = new MutableLiveData<>();
|
||||
private final MutableLiveData<ResultInfo<String>> introduceData = new MutableLiveData<>();
|
||||
private final MutableLiveData<ResultInfo<String>> nicknameData = new MutableLiveData<>();
|
||||
private final MutableLiveData<ResultInfo<String>> iconData = new MutableLiveData<>();
|
||||
private final MutableLiveData<ResultInfo<Void>> quitTeamData = new MutableLiveData<>();
|
||||
private final MutableLiveData<ResultInfo<Void>> removeMemberTeamData = new MutableLiveData<>();
|
||||
private final MutableLiveData<ResultInfo<Void>> dismissTeamData = new MutableLiveData<>();
|
||||
private final MutableLiveData<ResultInfo<Void>> updateTeamAnnouncement = new MutableLiveData<>();
|
||||
private final MutableLiveData<ResultInfo<Integer>> updateInvitePrivilegeData =
|
||||
new MutableLiveData<>();
|
||||
private final MutableLiveData<ResultInfo<Integer>> updateInfoPrivilegeData =
|
||||
new MutableLiveData<>();
|
||||
private final MutableLiveData<ResultInfo<Boolean>> muteTeamData = new MutableLiveData<>();
|
||||
private final MutableLiveData<ResultInfo<Boolean>> beInvitedNeedAgreedData =
|
||||
new MutableLiveData<>();
|
||||
private final MutableLiveData<ResultInfo<Boolean>> stickData = new MutableLiveData<>();
|
||||
private final MutableLiveData<ResultInfo<List<String>>> addMembersData = new MutableLiveData<>();
|
||||
private final MutableLiveData<ResultInfo<Boolean>> muteTeamAllMemberData =
|
||||
new MutableLiveData<>();
|
||||
private final MutableLiveData<ResultInfo<List<UserInfo>>> liveUserInfoData = new MutableLiveData<>();
|
||||
private final MutableLiveData<ResultInfo<Map<TeamFieldEnum, Serializable>>> updateExtensionData = new MutableLiveData<>();
|
||||
|
||||
public void requestTeamData(String teamId) {
|
||||
ALog.d(LIB_TAG, TAG, "requestTeamData:" + teamId);
|
||||
TeamRepo.queryTeamWithMember(
|
||||
teamId,
|
||||
Objects.requireNonNull(IMKitClient.account()),
|
||||
new FetchCallback<TeamWithCurrentMember>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable TeamWithCurrentMember param) {
|
||||
ALog.d(LIB_TAG, TAG, "requestTeamData,onSuccess:" + (param == null));
|
||||
teamWithMemberData.postValue(new ResultInfo<>(param));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "requestTeamData,onFailed:" + code);
|
||||
teamWithMemberData.postValue(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "requestTeamData,onException");
|
||||
teamWithMemberData.postValue(
|
||||
new ResultInfo<>(null, false, new ErrorMsg(-1, "", exception)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void requestTeamMembers(String teamId) {
|
||||
ALog.d(LIB_TAG, TAG, "requestTeamMembers:" + teamId);
|
||||
TeamRepo.getMemberList(
|
||||
teamId,
|
||||
new FetchCallback<List<UserInfoWithTeam>>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable List<UserInfoWithTeam> param) {
|
||||
ALog.d(
|
||||
LIB_TAG,
|
||||
TAG,
|
||||
"requestTeamMembers,onSuccess:" + (param == null ? "null" : param.size()));
|
||||
userInfoData.postValue(new ResultInfo<>(param));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "requestTeamMembers,onFailed:" + code);
|
||||
userInfoData.postValue(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "requestTeamMembers,onException");
|
||||
userInfoData.postValue(new ResultInfo<>(null, false, new ErrorMsg(-1, "", exception)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void updateName(String teamId, String name) {
|
||||
ALog.d(LIB_TAG, TAG, "updateName:" + teamId);
|
||||
TeamRepo.updateTeamName(
|
||||
teamId,
|
||||
name,
|
||||
new FetchCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Void param) {
|
||||
ALog.d(LIB_TAG, TAG, "updateName,onSuccess");
|
||||
nameData.postValue(new ResultInfo<>(name));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "updateName,onFailed:" + code);
|
||||
nameData.postValue(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "updateName,onException");
|
||||
nameData.postValue(new ResultInfo<>(null, false, new ErrorMsg(-1, "", exception)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void updateIntroduce(String teamId, String introduce) {
|
||||
ALog.d(LIB_TAG, TAG, "updateIntroduce:" + teamId);
|
||||
TeamRepo.updateTeamIntroduce(
|
||||
teamId,
|
||||
introduce,
|
||||
new FetchCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Void param) {
|
||||
ALog.d(LIB_TAG, TAG, "updateIntroduce,onSuccess");
|
||||
introduceData.postValue(new ResultInfo<>(introduce));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "updateIntroduce,onFailed:" + code);
|
||||
introduceData.postValue(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "updateIntroduce,onException");
|
||||
introduceData.postValue(new ResultInfo<>(null, false, new ErrorMsg(-1, "", exception)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void updateNickname(String teamId, String nickname) {
|
||||
ALog.d(LIB_TAG, TAG, "updateNickname:" + teamId);
|
||||
TeamRepo.updateMemberNick(
|
||||
teamId,
|
||||
Objects.requireNonNull(IMKitClient.account()),
|
||||
nickname,
|
||||
new FetchCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Void param) {
|
||||
ALog.d(LIB_TAG, TAG, "updateNickname,onSuccess");
|
||||
nicknameData.postValue(new ResultInfo<>(nickname));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "updateNickname,onFailed:" + code);
|
||||
nicknameData.postValue(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "updateNickname,onException");
|
||||
nicknameData.postValue(new ResultInfo<>(null, false, new ErrorMsg(-1, "", exception)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void updateIcon(String teamId, String iconUrl) {
|
||||
ALog.d(LIB_TAG, TAG, "updateIcon:" + teamId);
|
||||
TeamRepo.updateTeamIcon(
|
||||
teamId,
|
||||
iconUrl,
|
||||
new FetchCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Void param) {
|
||||
ALog.d(LIB_TAG, TAG, "updateIcon,onSuccess");
|
||||
iconData.postValue(new ResultInfo<>(iconUrl));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "updateIcon,onFailed:" + code);
|
||||
iconData.postValue(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "updateIcon,onException");
|
||||
iconData.postValue(new ResultInfo<>(null, false, new ErrorMsg(-1, "", exception)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void transferTeam(String teamId, String account, boolean isQuit) {
|
||||
TeamRepo.transferTeam(
|
||||
teamId,
|
||||
account,
|
||||
isQuit,
|
||||
new FetchCallback<List<TeamMember>>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable List<TeamMember> param) {
|
||||
if (isQuit) {
|
||||
quitTeam(teamId);
|
||||
} else {
|
||||
quitTeamData.postValue(new ResultInfo<>(null, true, null));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "quitTeam transferTeam,onFailed:" + code);
|
||||
quitTeamData.postValue(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "quitTeam transferTeam,onException");
|
||||
quitTeamData.postValue(
|
||||
new ResultInfo<>(null, false, new ErrorMsg(-1, "", exception)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//主动解散群
|
||||
public void quitTeam(Team team) {
|
||||
ALog.d(LIB_TAG, TAG, "quitTeam:" + team.getId());
|
||||
if (team.getType() == TeamTypeEnum.Advanced
|
||||
&& TextUtils.equals(team.getCreator(), IMKitClient.account())) {
|
||||
TeamRepo.getMemberList(
|
||||
team.getId(),
|
||||
new FetchCallback<List<UserInfoWithTeam>>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable List<UserInfoWithTeam> param) {
|
||||
String account = IMKitClient.account();
|
||||
if (param == null || param.size() <= 1) {
|
||||
dismissTeam(team.getId());
|
||||
return;
|
||||
}
|
||||
for (UserInfoWithTeam user : param) {
|
||||
if (!TextUtils.equals(account, user.getTeamInfo().getAccount())) {
|
||||
account = user.getTeamInfo().getAccount();
|
||||
break;
|
||||
}
|
||||
}
|
||||
TeamRepo.transferTeam(
|
||||
team.getId(),
|
||||
account,
|
||||
true,
|
||||
new FetchCallback<List<TeamMember>>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable List<TeamMember> param) {
|
||||
quitTeam(team.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "quitTeam transferTeam,onFailed:" + code);
|
||||
quitTeamData.postValue(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "quitTeam transferTeam,onException");
|
||||
quitTeamData.postValue(
|
||||
new ResultInfo<>(null, false, new ErrorMsg(-1, "", exception)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "quitTeam getMemberList,onFailed:" + code);
|
||||
quitTeamData.postValue(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "quitTeam getMemberList,onException");
|
||||
quitTeamData.postValue(
|
||||
new ResultInfo<>(null, false, new ErrorMsg(-1, "", exception)));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
quitTeam(team.getId());
|
||||
}
|
||||
}
|
||||
|
||||
//主动退群
|
||||
public void quitTeam(String teamId) {
|
||||
EventCenter.notifyEvent(new TeamEvent(teamId, TeamEventAction.ACTION_DISMISS));
|
||||
TeamRepo.quitTeam(
|
||||
teamId,
|
||||
new FetchCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Void param) {
|
||||
ALog.d(LIB_TAG, TAG, "quitTeam,onSuccess");
|
||||
clearNotify(teamId);
|
||||
removeStickTop(teamId);
|
||||
quitTeamData.postValue(new ResultInfo<>(param));
|
||||
// //删除会话
|
||||
// NIMClient.getService(MsgService.class).deleteRecentContact2(teamId, SessionTypeEnum.Team);
|
||||
// NIMClient.getService(MsgService.class).clearServerHistory(teamId, SessionTypeEnum.Team, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "quitTeam,onFailed:" + code);
|
||||
quitTeamData.postValue(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "quitTeam,onException");
|
||||
quitTeamData.postValue(new ResultInfo<>(null, false, new ErrorMsg(-1, "", exception)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void removeStickTop(String teamId) {
|
||||
ALog.d(LIB_TAG, TAG, "removeStickTop,teamId:" + teamId);
|
||||
if (ConversationRepo.isStickTop(teamId, SessionTypeEnum.Team)) {
|
||||
ALog.d(LIB_TAG, TAG, "removeStickTop,isStickTop:" + teamId);
|
||||
ConversationRepo.removeStickTop(
|
||||
teamId,
|
||||
SessionTypeEnum.Team,
|
||||
"",
|
||||
new FetchCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Void param) {
|
||||
ALog.d(LIB_TAG, TAG, "removeStickTop,onSuccess");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "removeStickTop,onFailed:" + code);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "removeStickTop,onException");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void clearNotify(String teamId) {
|
||||
ALog.d(LIB_TAG, TAG, "clearNotify,teamId:" + teamId);
|
||||
ConversationRepo.setNotify(
|
||||
teamId,
|
||||
SessionTypeEnum.Team,
|
||||
true,
|
||||
new FetchCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Void param) {
|
||||
ALog.d(LIB_TAG, TAG, "clearNotify,onSuccess");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "clearNotify,onFailed:" + code);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "clearNotify,onException");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void dismissTeam(String teamId) {
|
||||
ALog.d(LIB_TAG, TAG, "dismissTeam:" + teamId);
|
||||
EventCenter.notifyEvent(new TeamEvent(teamId, TeamEventAction.ACTION_DISMISS));
|
||||
//删除会话
|
||||
TeamRepo.dismissTeam(
|
||||
teamId,
|
||||
new FetchCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Void param) {
|
||||
ALog.d(LIB_TAG, TAG, "dismissTeam,onSuccess");
|
||||
dismissTeamData.postValue(new ResultInfo<>(param));
|
||||
// NIMClient.getService(MsgService.class).deleteRecentContact2(teamId, SessionTypeEnum.Team);
|
||||
// NIMClient.getService(MsgService.class).clearServerHistory(teamId, SessionTypeEnum.Team, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "dismissTeam,onFailed:" + code);
|
||||
dismissTeamData.postValue(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "dismissTeam,onException");
|
||||
dismissTeamData.postValue(
|
||||
new ResultInfo<>(null, false, new ErrorMsg(-1, "", exception)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void muteTeam(String teamId, boolean mute) {
|
||||
ALog.d(LIB_TAG, TAG, "muteTeam:" + teamId);
|
||||
ConversationRepo.setNotify(
|
||||
teamId,
|
||||
SessionTypeEnum.Team,
|
||||
!mute,
|
||||
new FetchCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Void param) {
|
||||
ALog.d(LIB_TAG, TAG, "muteTeam,onSuccess");
|
||||
muteTeamData.postValue(new ResultInfo<>(mute));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "muteTeam,onFailed:" + code);
|
||||
muteTeamData.postValue(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "muteTeam,onException");
|
||||
muteTeamData.postValue(new ResultInfo<>(null, false, new ErrorMsg(-1, "", exception)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void configStick(String sessionId, boolean stick) {
|
||||
ALog.d(LIB_TAG, TAG, "configStick:" + sessionId + "," + stick);
|
||||
if (TextUtils.isEmpty(sessionId)) {
|
||||
stickData.postValue(new ResultInfo<>(null, false, new ErrorMsg(-1)));
|
||||
return;
|
||||
}
|
||||
if (stick) {
|
||||
ConversationRepo.addStickTop(
|
||||
sessionId,
|
||||
SessionTypeEnum.Team,
|
||||
"",
|
||||
new FetchCallback<StickTopSessionInfo>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable StickTopSessionInfo param) {
|
||||
ALog.d(LIB_TAG, TAG, "configStick,onSuccess");
|
||||
stickData.postValue(new ResultInfo<>(true));
|
||||
ConversationRepo.notifyStickTop(sessionId, SessionTypeEnum.Team);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "configStick,onFailed:" + code);
|
||||
stickData.postValue(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "configStick,onException");
|
||||
stickData.postValue(new ResultInfo<>(null, false, new ErrorMsg(-1, "", exception)));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ConversationRepo.removeStickTop(
|
||||
sessionId,
|
||||
SessionTypeEnum.Team,
|
||||
"",
|
||||
new FetchCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Void param) {
|
||||
ALog.d(LIB_TAG, TAG, "configStick,onSuccess");
|
||||
stickData.postValue(new ResultInfo<>(false));
|
||||
ConversationRepo.notifyStickTop(sessionId, SessionTypeEnum.Team);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "configStick,onFailed:" + code);
|
||||
stickData.postValue(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "configStick,onException");
|
||||
stickData.postValue(new ResultInfo<>(null, false, new ErrorMsg(-1, "", exception)));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void addMembers(String teamId, List<String> members) {
|
||||
ALog.d(
|
||||
LIB_TAG, TAG, "addMembers:" + teamId + "," + (members == null ? "null" : members.size()));
|
||||
TeamRepo.inviteUser(
|
||||
teamId,
|
||||
members,
|
||||
new FetchCallback<List<String>>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable List<String> param) {
|
||||
ALog.d(LIB_TAG, TAG, "addMembers,onSuccess");
|
||||
addMembersData.postValue(new ResultInfo<>(param));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "addMembers,onFailed:" + code);
|
||||
if (code == 810) {
|
||||
addMembersData.postValue(new ResultInfo<>(members, true));
|
||||
} else {
|
||||
addMembersData.postValue(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "addMembers,onException");
|
||||
addMembersData.postValue(
|
||||
new ResultInfo<>(null, false, new ErrorMsg(-1, "", exception)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//禁言设置
|
||||
public void muteTeamAllMember(String teamId, boolean mute) {
|
||||
ALog.d(LIB_TAG, TAG, "muteTeamAllMember:" + teamId + "," + mute);
|
||||
TeamRepo.muteAllMembers(
|
||||
teamId,
|
||||
mute,
|
||||
new FetchCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Void param) {
|
||||
ALog.d(LIB_TAG, TAG, "muteTeamAllMember,onSuccess");
|
||||
muteTeamAllMemberData.postValue(new ResultInfo<>(mute));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "muteTeamAllMember,onFailed:" + code);
|
||||
muteTeamAllMemberData.postValue(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "muteTeamAllMember,onException");
|
||||
muteTeamAllMemberData.postValue(
|
||||
new ResultInfo<>(null, false, new ErrorMsg(-1, "", exception)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void updateBeInviteMode(String teamId, boolean needAgree) {
|
||||
ALog.d(LIB_TAG, TAG, "updateBeInviteMode:" + teamId + "," + needAgree);
|
||||
TeamRepo.updateBeInviteMode(
|
||||
teamId,
|
||||
needAgree,
|
||||
new FetchCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Void param) {
|
||||
ALog.d(LIB_TAG, TAG, "updateBeInviteMode,onSuccess");
|
||||
beInvitedNeedAgreedData.postValue(new ResultInfo<>(needAgree));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "updateBeInviteMode,onFailed:" + code);
|
||||
beInvitedNeedAgreedData.postValue(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "updateBeInviteMode,onException");
|
||||
beInvitedNeedAgreedData.postValue(
|
||||
new ResultInfo<>(null, false, new ErrorMsg(-1, "", exception)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void updateTeamAnnouncement(String teamId, String announcement) {
|
||||
TeamRepo.updateTeamAnnouncement(teamId, announcement, new FetchCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Void unused) {
|
||||
updateTeamAnnouncement.postValue(new ResultInfo<>(unused));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
updateTeamAnnouncement.postValue(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable throwable) {
|
||||
updateTeamAnnouncement.postValue(
|
||||
new ResultInfo<>(null, false, new ErrorMsg(-1, "", throwable)));
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void updateInvitePrivilege(String teamId, int type) {
|
||||
ALog.d(LIB_TAG, TAG, "updateInvitePrivilege:" + teamId + "," + type);
|
||||
TeamRepo.updateInviteMode(
|
||||
teamId,
|
||||
TeamInviteModeEnum.typeOfValue(type),
|
||||
new FetchCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Void param) {
|
||||
ALog.d(LIB_TAG, TAG, "updateInvitePrivilege,onSuccess");
|
||||
updateInvitePrivilegeData.postValue(new ResultInfo<>(type));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "updateInvitePrivilege,onFailed:" + code);
|
||||
updateInvitePrivilegeData.postValue(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "updateInvitePrivilege,onException");
|
||||
updateInvitePrivilegeData.postValue(
|
||||
new ResultInfo<>(null, false, new ErrorMsg(-1, "", exception)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void updateInfoPrivilege(String teamId, int type) {
|
||||
ALog.d(LIB_TAG, TAG, "updateInfoPrivilege:" + teamId + "," + type);
|
||||
TeamRepo.updateTeamInfoPrivilege(
|
||||
teamId,
|
||||
TeamUpdateModeEnum.typeOfValue(type),
|
||||
new FetchCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Void param) {
|
||||
ALog.d(LIB_TAG, TAG, "updateInfoPrivilege,onSuccess");
|
||||
updateInfoPrivilegeData.postValue(new ResultInfo<>(type));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "updateInfoPrivilege,onFailed:" + code);
|
||||
updateInfoPrivilegeData.postValue(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "updateInfoPrivilege,onException");
|
||||
updateInfoPrivilegeData.postValue(
|
||||
new ResultInfo<>(null, false, new ErrorMsg(-1, "", exception)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void removeMember(String teamId, List<String> listaccount) {
|
||||
TeamRepo.removeMembers(teamId, listaccount, new FetchCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Void param) {
|
||||
ALog.d(LIB_TAG, TAG, "removeMembers,onSuccess");
|
||||
removeMemberTeamData.postValue(new ResultInfo<>(param));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "removeMembers,onFailed:" + code);
|
||||
removeMemberTeamData.postValue(new ResultInfo<>(null, false, new ErrorMsg(code)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "removeMembers,onException");
|
||||
removeMemberTeamData.postValue(
|
||||
new ResultInfo<>(null, false, new ErrorMsg(-1, "", exception)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void UpdateTeamFileExtension(String teamId, TeamFieldEnum fieldEnum, String value) {
|
||||
// NIMClient.getService(TeamService.class).updateTeam(teamId, fieldEnum, value).setCallback(new RequestCallback<Void>() {
|
||||
// @Override
|
||||
// public void onSuccess(@Nullable Void param) {
|
||||
// ALog.d(LIB_TAG, TAG, "dismissTeam,onSuccess");
|
||||
// updateExtensionData.postValue(new ResultInfo<>(fieldEnum));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFailed(int code) {
|
||||
// ALog.d(LIB_TAG, TAG, "dismissTeam,onFailed:" + code);
|
||||
// updateExtensionData.postValue(new ResultInfo<>(fieldEnum, false, new ErrorMsg(code)));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onException(@Nullable Throwable exception) {
|
||||
// ALog.d(LIB_TAG, TAG, "dismissTeam,onException");
|
||||
// updateExtensionData.postValue(
|
||||
// new ResultInfo<>(fieldEnum, false, new ErrorMsg(-1, "", exception)));
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
public void UpdateTeamFilesExtension(String teamId, Map<TeamFieldEnum, Serializable> fieldsMap) {
|
||||
NIMClient.getService(TeamService.class).updateTeamFields(teamId, fieldsMap).setCallback(new RequestCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Void param) {
|
||||
ALog.d(LIB_TAG, TAG, "dismissTeam,onSuccess");
|
||||
updateExtensionData.postValue(new ResultInfo<>(fieldsMap));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int code) {
|
||||
ALog.d(LIB_TAG, TAG, "dismissTeam,onFailed:" + code);
|
||||
updateExtensionData.postValue(new ResultInfo<>(fieldsMap, false, new ErrorMsg(code)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(@Nullable Throwable exception) {
|
||||
ALog.d(LIB_TAG, TAG, "dismissTeam,onException");
|
||||
updateExtensionData.postValue(
|
||||
new ResultInfo<>(fieldsMap, false, new ErrorMsg(-1, "", exception)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public MutableLiveData<ResultInfo<Boolean>> getMuteTeamAllMemberData() {
|
||||
return muteTeamAllMemberData;
|
||||
}
|
||||
|
||||
public MutableLiveData<ResultInfo<Boolean>> getBeInvitedNeedAgreedData() {
|
||||
return beInvitedNeedAgreedData;
|
||||
}
|
||||
|
||||
public MutableLiveData<ResultInfo<TeamWithCurrentMember>> getTeamWithMemberData() {
|
||||
return teamWithMemberData;
|
||||
}
|
||||
|
||||
public MutableLiveData<ResultInfo<List<UserInfoWithTeam>>> getUserInfoData() {
|
||||
return userInfoData;
|
||||
}
|
||||
|
||||
public MutableLiveData<ResultInfo<String>> getNameData() {
|
||||
return nameData;
|
||||
}
|
||||
|
||||
public MutableLiveData<ResultInfo<String>> getIntroduceData() {
|
||||
return introduceData;
|
||||
}
|
||||
|
||||
public MutableLiveData<ResultInfo<String>> getNicknameData() {
|
||||
return nicknameData;
|
||||
}
|
||||
|
||||
public MutableLiveData<ResultInfo<String>> getIconData() {
|
||||
return iconData;
|
||||
}
|
||||
|
||||
public MutableLiveData<ResultInfo<Void>> getQuitTeamData() {
|
||||
return quitTeamData;
|
||||
}
|
||||
|
||||
public MutableLiveData<ResultInfo<Void>> getDismissTeamData() {
|
||||
return dismissTeamData;
|
||||
}
|
||||
|
||||
public MutableLiveData<ResultInfo<Void>> getUpdateTeamAnnouncement() {
|
||||
return updateTeamAnnouncement;
|
||||
}
|
||||
|
||||
public MutableLiveData<ResultInfo<Map<TeamFieldEnum, Serializable>>> getUpdateExtensionData() {
|
||||
return updateExtensionData;
|
||||
}
|
||||
|
||||
public MutableLiveData<ResultInfo<Boolean>> getMuteTeamData() {
|
||||
return muteTeamData;
|
||||
}
|
||||
|
||||
public MutableLiveData<ResultInfo<Boolean>> getStickData() {
|
||||
return stickData;
|
||||
}
|
||||
|
||||
public MutableLiveData<ResultInfo<Integer>> getUpdateInvitePrivilegeData() {
|
||||
return updateInvitePrivilegeData;
|
||||
}
|
||||
|
||||
public MutableLiveData<ResultInfo<Integer>> getUpdateInfoPrivilegeData() {
|
||||
return updateInfoPrivilegeData;
|
||||
}
|
||||
|
||||
public MutableLiveData<ResultInfo<List<String>>> getAddMembersData() {
|
||||
return addMembersData;
|
||||
}
|
||||
|
||||
public MutableLiveData<ResultInfo<Void>> getRemoveMembersData() {
|
||||
return removeMemberTeamData;
|
||||
}
|
||||
|
||||
public MutableLiveData<ResultInfo<List<UserInfo>>> getLiveUserInfoData() {
|
||||
return liveUserInfoData;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="4dp" />
|
||||
<solid android:color="@color/color_10_58be6b" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@color/color_58be6b" />
|
||||
</shape>
|
||||
14
teamkit-ui/src/main/res-fun/drawable/fun_bg_shape_search.xml
Normal file
14
teamkit-ui/src/main/res-fun/drawable/fun_bg_shape_search.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="4dp" />
|
||||
<solid android:color="@color/color_white"/>
|
||||
|
||||
</shape>
|
||||
14
teamkit-ui/src/main/res-fun/drawable/fun_bg_team_dialog.xml
Normal file
14
teamkit-ui/src/main/res-fun/drawable/fun_bg_team_dialog.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners
|
||||
android:topLeftRadius="@dimen/dimen_14_dp"
|
||||
android:topRightRadius="@dimen/dimen_14_dp" />
|
||||
<solid android:color="@color/color_white" />
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,14 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="40dp"
|
||||
android:height="40dp"
|
||||
android:viewportWidth="40"
|
||||
android:viewportHeight="40">
|
||||
<path
|
||||
android:strokeWidth="1"
|
||||
android:pathData="M4,0.5L36,0.5A3.5,3.5 0,0 1,39.5 4L39.5,36A3.5,3.5 0,0 1,36 39.5L4,39.5A3.5,3.5 0,0 1,0.5 36L0.5,4A3.5,3.5 0,0 1,4 0.5z"
|
||||
android:fillColor="#ffffff"
|
||||
android:strokeColor="#60CFA7"/>
|
||||
<path
|
||||
android:pathData="M12.941,12.654V23.833C12.941,24.018 12.997,24.197 13.111,24.343C13.792,25.219 16.462,28.401 20,29.412C23.614,28.896 26.774,24.756 27.494,23.75C27.596,23.607 27.647,23.436 27.647,23.261V12.654C27.647,12.163 27.249,11.765 26.758,11.765H13.83C13.339,11.765 12.941,12.163 12.941,12.654Z"
|
||||
android:fillColor="#60CFA7"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,17 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="40dp"
|
||||
android:height="40dp"
|
||||
android:viewportWidth="40"
|
||||
android:viewportHeight="40">
|
||||
<path
|
||||
android:strokeWidth="1"
|
||||
android:pathData="M4,0.5L36,0.5A3.5,3.5 0,0 1,39.5 4L39.5,36A3.5,3.5 0,0 1,36 39.5L4,39.5A3.5,3.5 0,0 1,0.5 36L0.5,4A3.5,3.5 0,0 1,4 0.5z"
|
||||
android:fillColor="#ffffff"
|
||||
android:strokeColor="#537FF4"/>
|
||||
<path
|
||||
android:pathData="M29.215,16.107C28.711,14.917 27.991,13.848 27.072,12.928C26.154,12.011 25.085,11.289 23.893,10.785C22.66,10.264 21.349,10 20,10C18.651,10 17.34,10.264 16.107,10.785C14.917,11.289 13.848,12.009 12.928,12.928C12.011,13.846 11.289,14.915 10.785,16.107C10.264,17.34 10,18.651 10,20C10,21.349 10.264,22.66 10.785,23.893C11.289,25.083 12.009,26.152 12.928,27.072C13.846,27.989 14.915,28.711 16.107,29.215C17.34,29.736 18.651,30 20,30C21.349,30 22.66,29.736 23.893,29.215C25.083,28.711 26.152,27.991 27.072,27.072C27.989,26.154 28.711,25.085 29.215,23.893C29.736,22.66 30,21.349 30,20C30,18.649 29.736,17.34 29.215,16.107Z"
|
||||
android:fillColor="#537FF4"/>
|
||||
<path
|
||||
android:pathData="M24.353,23.99C23.893,24.493 23.344,24.916 22.74,25.231C21.902,25.672 20.955,25.905 20.002,25.905C19.049,25.905 18.103,25.672 17.264,25.231C16.66,24.916 16.112,24.491 15.651,23.99C15.396,23.712 15.438,23.274 15.745,23.055C16.002,22.871 16.356,22.905 16.57,23.138C16.935,23.536 17.369,23.871 17.848,24.122C18.517,24.473 19.244,24.65 20.004,24.65C20.765,24.65 21.492,24.471 22.161,24.122C22.64,23.871 23.074,23.536 23.438,23.138C23.651,22.905 24.007,22.871 24.264,23.055C24.566,23.276 24.606,23.712 24.353,23.99Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,14 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="40dp"
|
||||
android:height="40dp"
|
||||
android:viewportWidth="40"
|
||||
android:viewportHeight="40">
|
||||
<path
|
||||
android:strokeWidth="1"
|
||||
android:pathData="M4,0.5L36,0.5A3.5,3.5 0,0 1,39.5 4L39.5,36A3.5,3.5 0,0 1,36 39.5L4,39.5A3.5,3.5 0,0 1,0.5 36L0.5,4A3.5,3.5 0,0 1,4 0.5z"
|
||||
android:fillColor="#ffffff"
|
||||
android:strokeColor="#854FE1"/>
|
||||
<path
|
||||
android:pathData="M28.75,18.696C28.75,13.894 24.273,10 18.75,10C13.227,10 8.75,13.894 8.75,18.696C8.75,22.663 11.805,26.01 15.981,27.053C15.55,28.417 14.403,29.564 14.403,29.564C14.403,29.564 25.587,28.865 28.212,21.514C28.56,20.63 28.75,19.682 28.75,18.696Z"
|
||||
android:fillColor="#854FE1"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,14 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="40dp"
|
||||
android:height="40dp"
|
||||
android:viewportWidth="40"
|
||||
android:viewportHeight="40">
|
||||
<path
|
||||
android:strokeWidth="1"
|
||||
android:pathData="M4,0.5L36,0.5A3.5,3.5 0,0 1,39.5 4L39.5,36A3.5,3.5 0,0 1,36 39.5L4,39.5A3.5,3.5 0,0 1,0.5 36L0.5,4A3.5,3.5 0,0 1,4 0.5z"
|
||||
android:fillColor="#ffffff"
|
||||
android:strokeColor="#E9749D"/>
|
||||
<path
|
||||
android:pathData="M16.323,22.631C17.533,23.861 17.673,25.184 16.331,26.547C15.5,27.391 14.154,27.899 12.302,28.116C12.206,28.127 12.109,28.127 12.013,28.115C11.362,28.036 10.887,27.458 10.918,26.796L10.925,26.71L10.951,26.491C11.178,24.726 11.67,23.433 12.468,22.622C13.81,21.258 15.112,21.401 16.323,22.631ZM27.412,9.707L27.621,9.772L27.826,9.84C28.078,9.928 28.306,10.073 28.494,10.262C28.682,10.452 28.824,10.682 28.91,10.935C29.726,13.319 29.466,15.735 28.151,18.13C27.608,19.116 26.915,20.05 26.07,20.931L25.837,21.17L25.615,21.387L25.609,21.454C25.455,22.888 24.367,24.785 22.363,27.238L22.189,27.45L21.868,27.833C21.506,28.263 20.831,28.143 20.619,27.635L20.594,27.566L19.473,23.989L19.372,23.919C18.742,23.47 18.142,22.981 17.576,22.454L17.298,22.189L17.025,21.918C16.219,21.098 15.493,20.202 14.858,19.243L14.796,19.146L11.146,17.966C10.632,17.8 10.467,17.165 10.793,16.766L10.836,16.717L10.883,16.673C13.885,14.05 16.1,12.75 17.687,12.858L17.789,12.867L17.848,12.874L17.982,12.739C18.702,12.023 19.455,11.414 20.243,10.914L20.507,10.751L20.749,10.609C22.948,9.362 25.18,9.055 27.412,9.708V9.707ZM20.683,14.744C19.77,15.658 19.773,17.142 20.69,18.059C21.607,18.976 23.091,18.979 24.005,18.066C24.918,17.153 24.915,15.669 23.997,14.752C23.08,13.835 21.597,13.831 20.683,14.744Z"
|
||||
android:fillColor="#E9749D"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,14 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="40dp"
|
||||
android:height="40dp"
|
||||
android:viewportWidth="40"
|
||||
android:viewportHeight="40">
|
||||
<path
|
||||
android:strokeWidth="1"
|
||||
android:pathData="M4,0.5L36,0.5A3.5,3.5 0,0 1,39.5 4L39.5,36A3.5,3.5 0,0 1,36 39.5L4,39.5A3.5,3.5 0,0 1,0.5 36L0.5,4A3.5,3.5 0,0 1,4 0.5z"
|
||||
android:fillColor="#ffffff"
|
||||
android:strokeColor="#F9B751"/>
|
||||
<path
|
||||
android:pathData="M15.696,27.89C15.696,28.529 16.219,29.052 16.858,29.052H22.767C23.406,29.052 23.929,28.529 23.929,27.89V27.211H15.696V27.89ZM19.811,8.75C15.083,8.75 11.25,12.583 11.25,17.311C11.25,20.549 13.048,23.363 15.696,24.821V26.049H23.929V24.821C26.577,23.366 28.375,20.549 28.375,17.311C28.372,12.583 24.539,8.75 19.811,8.75ZM22.099,29.934H17.523C17.203,29.934 16.942,30.196 16.942,30.515V30.669C16.942,30.989 17.203,31.25 17.523,31.25H22.096C22.416,31.25 22.677,30.989 22.677,30.669V30.515C22.68,30.196 22.419,29.934 22.099,29.934Z"
|
||||
android:fillColor="#F9B751"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size
|
||||
android:width="@dimen/dimen_20_dp"
|
||||
android:height="@dimen/dimen_20_dp" />
|
||||
|
||||
<solid android:color="@color/color_white" />
|
||||
<stroke android:width="1dp" android:color="@color/color_dbdde4"/>
|
||||
|
||||
</shape>
|
||||
17
teamkit-ui/src/main/res-fun/drawable/fun_switch_thumb_on.xml
Normal file
17
teamkit-ui/src/main/res-fun/drawable/fun_switch_thumb_on.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size
|
||||
android:width="@dimen/dimen_20_dp"
|
||||
android:height="@dimen/dimen_20_dp" />
|
||||
|
||||
<solid android:color="@color/color_white" />
|
||||
<stroke android:width="1dp" android:color="@color/color_58be6b"/>
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@drawable/fun_switch_thumb_on" android:state_checked="true" />
|
||||
|
||||
<item android:drawable="@drawable/fun_switch_thumb_off" android:state_checked="false" />
|
||||
|
||||
</selector>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="@dimen/dimen_10_dp"/>
|
||||
|
||||
<size
|
||||
android:width="@dimen/dimen_60_dp"
|
||||
android:height="@dimen/dimen_20_dp" />
|
||||
|
||||
<solid android:color="@color/color_dbdde4" />
|
||||
|
||||
</shape>
|
||||
19
teamkit-ui/src/main/res-fun/drawable/fun_switch_track_on.xml
Normal file
19
teamkit-ui/src/main/res-fun/drawable/fun_switch_track_on.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="@dimen/dimen_10_dp" />
|
||||
|
||||
<size
|
||||
android:width="@dimen/dimen_60_dp"
|
||||
android:height="@dimen/dimen_20_dp" />
|
||||
|
||||
<solid android:color="@color/color_58be6b" />
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@drawable/fun_switch_track_on" android:state_checked="true" />
|
||||
|
||||
<item android:drawable="@drawable/fun_switch_track_off" android:state_checked="false" />
|
||||
|
||||
</selector>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/fun_bg_team_dialog"
|
||||
android:paddingBottom="30dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTakePhoto"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="51dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/common_take_photo"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tvGetFromAlbum"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="@color/color_ededed"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTakePhoto" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvGetFromAlbum"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="51dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/common_get_from_album"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvCancel"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="6dp"
|
||||
android:background="@color/color_f7f7f7"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvGetFromAlbum" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCancel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="42dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/cancel"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/fun_bg_team_dialog"
|
||||
android:paddingBottom="30dp">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTeamAllMember"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="51dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_all_member"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tvTeamOwner"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="@color/color_ededed"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTeamAllMember" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTeamOwner"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="51dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_owner"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvCancel"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="6dp"
|
||||
android:background="@color/color_f7f7f7"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTeamOwner" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCancel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="42dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_cancel"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
130
teamkit-ui/src/main/res-fun/layout/fun_team_info_activity.xml
Normal file
130
teamkit-ui/src/main/res-fun/layout/fun_team_info_activity.xml
Normal file
@@ -0,0 +1,130 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_ededed">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_info_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="17dp"
|
||||
android:textStyle="bold"
|
||||
android:background="@color/color_white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:src="@drawable/ic_arrow_left"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/infoBg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="0.5dp"
|
||||
android:layout_marginBottom="-2dp"
|
||||
android:background="@color/color_white"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvIntroduce"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTitle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvIcon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="74dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:text="@string/team_icon_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:drawableEndCompat="@drawable/ic_right_arrow"
|
||||
app:layout_constraintEnd_toEndOf="@id/infoBg"
|
||||
app:layout_constraintStart_toStartOf="@id/infoBg"
|
||||
app:layout_constraintTop_toTopOf="@id/infoBg"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<com.netease.yunxin.kit.common.ui.widgets.ContactAvatarView
|
||||
android:id="@+id/ivIcon"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
app:avatarCorner="@dimen/dimen_4_dp"
|
||||
android:layout_marginEnd="44dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvIcon"
|
||||
app:layout_constraintEnd_toEndOf="@id/infoBg"
|
||||
app:layout_constraintTop_toTopOf="@id/tvIcon" />
|
||||
|
||||
<View
|
||||
android:id="@+id/line1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@color/color_e5e5e5"
|
||||
app:layout_constraintEnd_toEndOf="@id/infoBg"
|
||||
app:layout_constraintStart_toStartOf="@id/infoBg"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvIcon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:text="@string/team_name_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:drawableEndCompat="@drawable/ic_right_arrow"
|
||||
app:layout_constraintEnd_toEndOf="@id/infoBg"
|
||||
app:layout_constraintStart_toStartOf="@id/infoBg"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvIcon"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:id="@+id/line2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@color/color_e5e5e5"
|
||||
app:layout_constraintEnd_toEndOf="@id/infoBg"
|
||||
app:layout_constraintStart_toStartOf="@id/infoBg"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvIntroduce"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:text="@string/team_introduce_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
android:visibility="visible"
|
||||
app:drawableEndCompat="@drawable/ic_right_arrow"
|
||||
app:layout_constraintEnd_toEndOf="@id/infoBg"
|
||||
app:layout_constraintStart_toStartOf="@id/infoBg"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvName"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_ededed">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_member_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="17dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:src="@drawable/ic_arrow_left"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etSearch"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/fun_bg_shape_search"
|
||||
android:drawableStart="@drawable/ic_search"
|
||||
android:drawablePadding="5dp"
|
||||
android:hint="@string/team_search_friend"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textColorHint="@color/color_a6adb6"
|
||||
android:textSize="14dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvTitle"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivClear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:src="@drawable/ic_clear"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/etSearch"
|
||||
app:layout_constraintEnd_toEndOf="@id/etSearch"
|
||||
app:layout_constraintTop_toTopOf="@id/etSearch" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvMemberList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:scrollbars="vertical"
|
||||
app:layout_constraintVertical_bias="0"
|
||||
app:layout_constraintHeight_default="wrap"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:background="@color/color_white"
|
||||
android:layout_marginTop="12dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/etSearch" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivEmpty"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="@dimen/dimen_191_dp"
|
||||
android:layout_width="@dimen/dimen_118_dp"
|
||||
android:src="@drawable/fun_ic_contact_empty"
|
||||
android:layout_height="@dimen/dimen_96_dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvEmpty"
|
||||
android:layout_width="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:gravity="center"
|
||||
app:layout_constraintTop_toBottomOf="@id/ivEmpty"
|
||||
android:text="@string/team_search_result_empty"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/groupEmtpy"
|
||||
app:constraint_referenced_ids="ivEmpty,tvEmpty"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.netease.yunxin.kit.common.ui.widgets.ContactAvatarView
|
||||
android:id="@+id/cavUserIcon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_marginTop="12dp"
|
||||
app:avatarCorner="4dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="20dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUserName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="17dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/cavUserIcon"
|
||||
app:layout_constraintEnd_toStartOf="@id/tvIdentify"
|
||||
app:layout_constraintStart_toEndOf="@id/cavUserIcon"
|
||||
app:layout_constraintTop_toTopOf="@id/cavUserIcon"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvIdentify"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="@drawable/fun_bg_item_team_owner"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:text="@string/team_owner"
|
||||
android:textColor="@color/color_58be6b"
|
||||
android:textSize="12dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/cavUserIcon"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/cavUserIcon"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@color/color_e5e5e5"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/cavUserIcon"
|
||||
app:layout_constraintTop_toBottomOf="@id/cavUserIcon" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
533
teamkit-ui/src/main/res-fun/layout/fun_team_setting_activity.xml
Normal file
533
teamkit-ui/src/main/res-fun/layout/fun_team_setting_activity.xml
Normal file
@@ -0,0 +1,533 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_ededed">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="@color/color_white"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_setting_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="17dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:src="@drawable/ic_arrow_left"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="0.5dp"
|
||||
android:overScrollMode="never"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTitle">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="20dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/bg1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="190dp"
|
||||
android:background="@color/color_white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="82dp"
|
||||
android:layout_marginStart="11dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:drawableEndCompat="@drawable/ic_right_arrow"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg1"
|
||||
app:layout_constraintStart_toEndOf="@id/ivIcon"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<com.netease.yunxin.kit.common.ui.widgets.ContactAvatarView
|
||||
android:id="@+id/ivIcon"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
app:avatarCorner="4dp"
|
||||
android:layout_marginStart="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvName"
|
||||
app:layout_constraintStart_toStartOf="@id/bg1"
|
||||
app:layout_constraintTop_toTopOf="@id/tvName" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@color/color_e5e5e5"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg1"
|
||||
app:layout_constraintStart_toStartOf="@id/bg1"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMember"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:singleLine="true"
|
||||
android:text="@string/team_member_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintStart_toStartOf="@id/bg1"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvName"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCount"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="end"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="16dp"
|
||||
app:drawableEndCompat="@drawable/ic_right_arrow"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvMember"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg1"
|
||||
app:layout_constraintStart_toEndOf="@id/tvMember"
|
||||
app:layout_constraintTop_toTopOf="@id/tvMember"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivAdd"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/fun_ic_add_member"
|
||||
app:layout_constraintStart_toStartOf="@id/bg1"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvMember" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvMemberList"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:overScrollMode="never"
|
||||
app:layout_constraintBottom_toBottomOf="@id/bg1"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg1"
|
||||
app:layout_constraintStart_toEndOf="@id/ivAdd"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvCount" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bg2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@color/color_white"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvSessionPin"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bg1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMark"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:text="@string/team_mark"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:drawableEndCompat="@drawable/ic_right_arrow"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg2"
|
||||
app:layout_constraintStart_toStartOf="@id/bg2"
|
||||
app:layout_constraintTop_toTopOf="@id/bg2"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:id="@+id/markLine"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@color/color_e5e5e5"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg2"
|
||||
app:layout_constraintStart_toStartOf="@id/bg2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvMark" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/markGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="visible"
|
||||
app:constraint_referenced_ids="tvMark,markLine" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvHistory"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:text="@string/team_history"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:drawableEndCompat="@drawable/ic_right_arrow"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg2"
|
||||
app:layout_constraintStart_toStartOf="@id/bg2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvMark"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:id="@+id/historyLine"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@color/color_e5e5e5"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg2"
|
||||
app:layout_constraintStart_toStartOf="@id/bg2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvHistory" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/historyGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="visible"
|
||||
app:constraint_referenced_ids="tvHistory,historyLine" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMessageTip"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:text="@string/team_message_tip"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg2"
|
||||
app:layout_constraintStart_toStartOf="@id/bg2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvHistory"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swMessageTip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:thumb="@drawable/fun_switch_thumb_selector"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvMessageTip"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg2"
|
||||
app:layout_constraintTop_toTopOf="@id/tvMessageTip"
|
||||
app:track="@drawable/fun_switch_track_selector" />
|
||||
|
||||
<View
|
||||
android:id="@+id/messageTipLine"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@color/color_e5e5e5"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg2"
|
||||
app:layout_constraintStart_toStartOf="@id/bg2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvMessageTip" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/messageTipGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:constraint_referenced_ids="tvMessageTip,swMessageTip,messageTipLine" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSessionPin"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:text="@string/team_session_pin"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg2"
|
||||
app:layout_constraintStart_toStartOf="@id/bg2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvMessageTip"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swSessionPin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:thumb="@drawable/fun_switch_thumb_selector"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvSessionPin"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg2"
|
||||
app:layout_constraintTop_toTopOf="@id/tvSessionPin"
|
||||
app:track="@drawable/fun_switch_track_selector" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bg3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@color/color_white"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvTeamMute"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bg2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTeamNickname"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:text="@string/team_my_nickname_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:drawableEndCompat="@drawable/ic_right_arrow"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg3"
|
||||
app:layout_constraintStart_toStartOf="@id/bg3"
|
||||
app:layout_constraintTop_toTopOf="@id/bg3"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:id="@+id/nicknameLine"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@color/color_e5e5e5"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg3"
|
||||
app:layout_constraintStart_toStartOf="@id/bg3"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTeamNickname" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/nicknameGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="tvTeamNickname,nicknameLine" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTeamMute"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:text="@string/team_mute"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg3"
|
||||
app:layout_constraintStart_toStartOf="@id/bg3"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTeamNickname"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swTeamMute"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:thumb="@drawable/fun_switch_thumb_selector"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvTeamMute"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg3"
|
||||
app:layout_constraintTop_toTopOf="@id/tvTeamMute"
|
||||
app:track="@drawable/fun_switch_track_selector" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/teamMuteGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="tvTeamMute,swTeamMute" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bg4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@color/color_white"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvInviteAgree"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bg3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvInviteOtherPermission"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="78dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:text="@string/team_invite_other_permission"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:drawableEndCompat="@drawable/ic_right_arrow"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg4"
|
||||
app:layout_constraintStart_toStartOf="@id/bg4"
|
||||
app:layout_constraintTop_toTopOf="@id/bg4"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvInviteOtherValue"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="14dp"
|
||||
android:text="@string/team_all_member"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="14dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvInviteOtherPermission"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg4"
|
||||
app:layout_constraintStart_toStartOf="@id/bg4"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:id="@+id/inviteLine"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@color/color_e5e5e5"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg4"
|
||||
app:layout_constraintStart_toStartOf="@id/bg4"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvInviteOtherPermission" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/inviteGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="tvInviteOtherPermission,inviteLine,tvInviteOtherValue" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUpdateInfoPermission"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="78dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingTop="14dp"
|
||||
android:text="@string/team_update_info_permission"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:drawableEndCompat="@drawable/ic_right_arrow"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg4"
|
||||
app:layout_constraintStart_toStartOf="@id/bg4"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvInviteOtherPermission"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUpdateInfoValue"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
android:text="@string/team_owner"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="14dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvUpdateInfoPermission"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg4"
|
||||
app:layout_constraintStart_toStartOf="@id/bg4"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:id="@+id/updateLine"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@color/color_e5e5e5"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg4"
|
||||
app:layout_constraintStart_toStartOf="@id/bg4"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvUpdateInfoPermission" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/updateGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="tvUpdateInfoPermission,updateLine,tvUpdateInfoValue" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvInviteAgree"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:text="@string/team_need_agreed_when_be_invited_permission"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg4"
|
||||
app:layout_constraintStart_toStartOf="@id/bg4"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvUpdateInfoPermission"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swInviteAgree"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:thumb="@drawable/fun_switch_thumb_selector"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvInviteAgree"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg4"
|
||||
app:layout_constraintTop_toTopOf="@id/tvInviteAgree"
|
||||
app:track="@drawable/fun_switch_track_selector" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/inviteAgreeGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="tvInviteAgree,swInviteAgree" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvQuit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@color/color_white"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_advanced_quit"
|
||||
android:textColor="@color/color_e6605c"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bg4"
|
||||
tools:ignore="SpUsage" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<com.netease.yunxin.kit.common.ui.widgets.ContactAvatarView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/cavUserIcon"
|
||||
android:layout_width="36dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
app:avatarCorner="@dimen/dimen_4_dp"
|
||||
android:layout_height="36dp" />
|
||||
@@ -0,0 +1,177 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_ededed">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_update_icon"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="17dp"
|
||||
android:background="@color/color_white"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivCancel"
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:src="@drawable/ic_arrow_left"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSave"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/team_save"
|
||||
android:textColor="@color/color_58be6b"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bg1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="128dp"
|
||||
android:layout_marginTop="0.5dp"
|
||||
android:background="@color/color_white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTitle" />
|
||||
|
||||
<com.netease.yunxin.kit.common.ui.widgets.ContactAvatarView
|
||||
android:id="@+id/ivIcon"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
app:avatarCorner="@dimen/dimen_4_dp"
|
||||
app:avatarTextSize="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/bg1"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg1"
|
||||
app:layout_constraintStart_toStartOf="@id/bg1"
|
||||
app:layout_constraintTop_toTopOf="@id/bg1" />
|
||||
|
||||
<View
|
||||
android:id="@+id/spacer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="22dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivIcon"
|
||||
app:layout_constraintEnd_toEndOf="@id/ivIcon" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivCamera"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_team_camera"
|
||||
app:layout_constraintTop_toBottomOf="@id/spacer"
|
||||
app:layout_constraintStart_toEndOf="@id/spacer" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bg2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="122dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@color/color_white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bg1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDefaultIconTip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/team_default_icon"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintStart_toStartOf="@id/bg2"
|
||||
app:layout_constraintTop_toTopOf="@id/bg2"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivDefault1"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/fun_ic_team_default_1"
|
||||
app:layout_constraintEnd_toStartOf="@id/ivDefault2"
|
||||
app:layout_constraintStart_toStartOf="@id/bg1"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDefaultIconTip" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivDefault2"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/fun_ic_team_default_2"
|
||||
app:layout_constraintEnd_toStartOf="@id/ivDefault3"
|
||||
app:layout_constraintStart_toEndOf="@id/ivDefault1"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDefaultIconTip" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivDefault3"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/fun_ic_team_default_3"
|
||||
app:layout_constraintEnd_toStartOf="@id/ivDefault4"
|
||||
app:layout_constraintStart_toEndOf="@id/ivDefault2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDefaultIconTip" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivDefault4"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/fun_ic_team_default_4"
|
||||
app:layout_constraintEnd_toStartOf="@id/ivDefault5"
|
||||
app:layout_constraintStart_toEndOf="@id/ivDefault3"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDefaultIconTip" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivDefault5"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/fun_ic_team_default_5"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg2"
|
||||
app:layout_constraintStart_toEndOf="@id/ivDefault4"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDefaultIconTip" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/groupPrivilege"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="visible"
|
||||
app:constraint_referenced_ids="tvSave,ivCamera,bg2,tvDefaultIconTip,ivDefault1,ivDefault2,ivDefault3,ivDefault4,ivDefault5" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_ededed">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_introduce_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="17dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivCancel"
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="@string/team_cancel"
|
||||
android:src="@drawable/ic_arrow_left"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSave"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/team_save"
|
||||
android:textColor="@color/color_58be6b"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@color/color_white"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvFlag"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTitle" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etIntroduce"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="15dp"
|
||||
android:background="@null"
|
||||
android:maxLength="100"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="14dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/ivClear"
|
||||
app:layout_constraintStart_toStartOf="@id/bg"
|
||||
app:layout_constraintTop_toTopOf="@id/bg"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivClear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:src="@drawable/ic_clear"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/etIntroduce"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg"
|
||||
app:layout_constraintTop_toTopOf="@id/etIntroduce" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvFlag"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="0/100"
|
||||
android:textColor="@color/color_b3b7bc"
|
||||
android:textSize="12dp"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/etIntroduce"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_ededed">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_name_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="17dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivCancel"
|
||||
android:layout_width="26dp"
|
||||
android:src="@drawable/ic_arrow_left"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="20dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSave"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/team_save"
|
||||
android:textColor="@color/color_58be6b"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@color/color_white"
|
||||
android:minHeight="60dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvFlag"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTitle" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="15dp"
|
||||
android:background="@null"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/color_333333"
|
||||
android:maxLength="30"
|
||||
android:textSize="14dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/ivClear"
|
||||
app:layout_constraintStart_toStartOf="@id/bg"
|
||||
app:layout_constraintTop_toTopOf="@id/bg"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivClear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:src="@drawable/ic_clear"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/etName"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg"
|
||||
app:layout_constraintTop_toTopOf="@id/etName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvFlag"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:textColor="@color/color_b3b7bc"
|
||||
android:textSize="12dp"
|
||||
android:text="0/30"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/etName"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_ededed">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_my_nickname_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="17dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivCancel"
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:src="@drawable/ic_arrow_left"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSave"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/team_save"
|
||||
android:textColor="@color/color_58be6b"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@color/color_white"
|
||||
android:minHeight="60dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvFlag"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTitle" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etNickname"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="15dp"
|
||||
android:background="@null"
|
||||
android:maxLength="30"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="14dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/ivClear"
|
||||
app:layout_constraintStart_toStartOf="@id/bg"
|
||||
app:layout_constraintTop_toTopOf="@id/bg"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivClear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:src="@drawable/ic_clear"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/etNickname"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg"
|
||||
app:layout_constraintTop_toTopOf="@id/etNickname" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvFlag"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="0/30"
|
||||
android:textColor="@color/color_b3b7bc"
|
||||
android:textSize="12dp"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/etNickname"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="4dp" />
|
||||
<solid android:color="@color/color_e0ecff" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@color/color_b9d3ff" />
|
||||
</shape>
|
||||
14
teamkit-ui/src/main/res-normal/drawable/bg_shape_search.xml
Normal file
14
teamkit-ui/src/main/res-normal/drawable/bg_shape_search.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="4dp" />
|
||||
<solid android:color="@color/color_f2f4f5"/>
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,20 @@
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="32"
|
||||
android:viewportHeight="32">
|
||||
<path
|
||||
android:strokeWidth="1"
|
||||
android:pathData="M16,16m-15.5,0a15.5,15.5 0,1 1,31 0a15.5,15.5 0,1 1,-31 0"
|
||||
android:fillColor="#ffffff"
|
||||
android:strokeColor="#60CFA7"/>
|
||||
<path
|
||||
android:pathData="M10.353,10.301V19.0096C10.353,19.1949 10.4105,19.3751 10.5251,19.5207C11.1233,20.2805 13.2286,22.7379 16.0001,23.5298C18.8428,23.1237 21.335,19.914 21.9647,19.0419C22.0674,18.8996 22.1177,18.7302 22.1177,18.5547V10.301C22.1177,9.8101 21.7198,9.4121 21.2288,9.4121H11.2419C10.751,9.4121 10.353,9.8101 10.353,10.301Z"
|
||||
android:fillColor="#60CFA7"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,23 @@
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="32"
|
||||
android:viewportHeight="32">
|
||||
<path
|
||||
android:strokeWidth="1"
|
||||
android:pathData="M16,16m-15.5,0a15.5,15.5 0,1 1,31 0a15.5,15.5 0,1 1,-31 0"
|
||||
android:fillColor="#ffffff"
|
||||
android:strokeColor="#537FF4"/>
|
||||
<path
|
||||
android:pathData="M23.3718,12.8859C22.9691,11.9338 22.3928,11.0783 21.6573,10.3427C20.9235,9.6089 20.068,9.0309 19.1141,8.6282C18.128,8.2112 17.0792,8 16,8C14.9208,8 13.872,8.2112 12.8859,8.6282C11.9338,9.0309 11.0783,9.6072 10.3427,10.3427C9.6089,11.0765 9.0309,11.932 8.6282,12.8859C8.2112,13.872 8,14.9208 8,16C8,17.0792 8.2112,18.128 8.6282,19.1141C9.0309,20.0662 9.6072,20.9217 10.3427,21.6573C11.0765,22.3911 11.932,22.9691 12.8859,23.3718C13.872,23.7888 14.9208,24 16,24C17.0792,24 18.128,23.7888 19.1141,23.3718C20.0662,22.9691 20.9217,22.3928 21.6573,21.6573C22.3911,20.9235 22.9691,20.068 23.3718,19.1141C23.7888,18.128 24,17.0792 24,16C24,14.919 23.7888,13.872 23.3718,12.8859Z"
|
||||
android:fillColor="#537FF4"/>
|
||||
<path
|
||||
android:pathData="M19.4827,19.1915C19.1141,19.5942 18.6756,19.9324 18.1924,20.1848C17.5212,20.5374 16.7642,20.7235 16.0018,20.7235C15.2393,20.7235 14.4823,20.5374 13.8112,20.1848C13.3279,19.9324 12.8895,19.5924 12.5208,19.1915C12.3167,18.9696 12.3508,18.6188 12.5959,18.4434C12.8018,18.2966 13.0845,18.3235 13.2563,18.5096C13.5481,18.8282 13.8953,19.0966 14.2783,19.2971C14.8134,19.5781 15.395,19.7195 16.0035,19.7195C16.6121,19.7195 17.1937,19.5763 17.7288,19.2971C18.1118,19.0966 18.459,18.8282 18.7508,18.5096C18.9208,18.3235 19.2053,18.2966 19.4112,18.4434C19.6528,18.6206 19.685,18.9696 19.4827,19.1915Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,20 @@
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="32"
|
||||
android:viewportHeight="32">
|
||||
<path
|
||||
android:strokeWidth="1"
|
||||
android:pathData="M16,16m-15.5,0a15.5,15.5 0,1 1,31 0a15.5,15.5 0,1 1,-31 0"
|
||||
android:fillColor="#ffffff"
|
||||
android:strokeColor="#854FE1"/>
|
||||
<path
|
||||
android:pathData="M24,14.9566C24,11.1155 20.4182,8 16,8C11.5818,8 8,11.1155 8,14.9566C8,18.1308 10.4439,20.8078 13.7844,21.6426C13.4404,22.7332 12.5225,23.6511 12.5225,23.6511C12.5225,23.6511 21.4697,23.0919 23.5696,17.2113C23.8484,16.5038 24,15.7457 24,14.9566Z"
|
||||
android:fillColor="#854FE1"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,20 @@
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="32"
|
||||
android:viewportHeight="32">
|
||||
<path
|
||||
android:strokeWidth="1"
|
||||
android:pathData="M16,16m-15.5,0a15.5,15.5 0,1 1,31 0a15.5,15.5 0,1 1,-31 0"
|
||||
android:fillColor="#ffffff"
|
||||
android:strokeColor="#E9749D"/>
|
||||
<path
|
||||
android:pathData="M13.058,18.1047C14.0263,19.0889 14.1384,20.1468 13.0651,21.2376C12.4001,21.913 11.3234,22.3189 9.8418,22.4926C9.7651,22.5018 9.6876,22.5014 9.6105,22.4922C9.0897,22.4289 8.7093,21.9659 8.7343,21.4372L8.7397,21.368L8.7609,21.193C8.9426,19.7805 9.3359,18.7464 9.9747,18.0972C11.048,17.0068 12.0893,17.1209 13.058,18.1047ZM21.9293,7.7659L22.0968,7.8172L22.2605,7.8718C22.4621,7.9424 22.6449,8.0581 22.7951,8.2099C22.9453,8.3617 23.059,8.5457 23.1276,8.748C23.7805,10.6555 23.573,12.588 22.5205,14.5039C22.0868,15.293 21.5318,16.0401 20.8563,16.7447L20.6693,16.9359L20.4922,17.1093L20.4872,17.163C20.3643,18.3105 19.4938,19.828 17.8901,21.7901L17.7509,21.9597L17.4947,22.2659C17.2047,22.6101 16.6647,22.5143 16.4955,22.1076L16.4755,22.053L15.5788,19.1914L15.4976,19.1351C14.9938,18.7762 14.5138,18.3848 14.0609,17.9634L13.838,17.7509L13.6197,17.5343C12.9748,16.878 12.3943,16.1614 11.8863,15.3943L11.8368,15.3172L8.9168,14.373C8.5059,14.2397 8.3734,13.7318 8.6343,13.4126L8.6688,13.3734L8.7063,13.3384C11.108,11.2401 12.8801,10.1997 14.1493,10.2864L14.2309,10.2934L14.2784,10.2993L14.3855,10.1909C14.9613,9.6184 15.5643,9.1314 16.1947,8.7309L16.4055,8.6005L16.5993,8.4872C18.3584,7.4897 20.1443,7.2443 21.9293,7.7664V7.7659ZM16.5463,11.7955C15.8159,12.5264 15.8184,13.7134 16.5522,14.4472C17.2859,15.1809 18.473,15.1834 19.2038,14.453C19.9343,13.7222 19.9318,12.5351 19.198,11.8014C18.4643,11.0676 17.2772,11.0651 16.5463,11.7955Z"
|
||||
android:fillColor="#E9749D"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,20 @@
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="32"
|
||||
android:viewportHeight="32">
|
||||
<path
|
||||
android:strokeWidth="1"
|
||||
android:pathData="M16,16m-15.5,0a15.5,15.5 0,1 1,31 0a15.5,15.5 0,1 1,-31 0"
|
||||
android:fillColor="#ffffff"
|
||||
android:strokeColor="#F9B751"/>
|
||||
<path
|
||||
android:pathData="M12.5568,22.3121C12.5568,22.8232 12.975,23.2414 13.4861,23.2414H18.2137C18.7248,23.2414 19.143,22.8232 19.143,22.3121V21.7685H12.5568V22.3121ZM15.8487,7C12.0666,7 9,10.0666 9,13.8487C9,16.4391 10.438,18.6902 12.5568,19.8565V20.8392H19.143V19.8565C21.2617,18.6926 22.6998,16.4391 22.6998,13.8487C22.6975,10.0666 19.6309,7 15.8487,7ZM17.6794,23.9476H14.0181C13.7625,23.9476 13.5534,24.1567 13.5534,24.4122V24.5354C13.5534,24.7909 13.7625,25 14.0181,25H17.6771C17.9326,25 18.1417,24.7909 18.1417,24.5354V24.4122C18.144,24.1567 17.935,23.9476 17.6794,23.9476Z"
|
||||
android:fillColor="#F9B751"/>
|
||||
</vector>
|
||||
17
teamkit-ui/src/main/res-normal/drawable/switch_thumb_off.xml
Normal file
17
teamkit-ui/src/main/res-normal/drawable/switch_thumb_off.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size
|
||||
android:width="@dimen/dimen_20_dp"
|
||||
android:height="@dimen/dimen_20_dp" />
|
||||
|
||||
<solid android:color="@color/color_white" />
|
||||
<stroke android:width="1dp" android:color="@color/color_dbdde4"/>
|
||||
|
||||
</shape>
|
||||
17
teamkit-ui/src/main/res-normal/drawable/switch_thumb_on.xml
Normal file
17
teamkit-ui/src/main/res-normal/drawable/switch_thumb_on.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<size
|
||||
android:width="@dimen/dimen_20_dp"
|
||||
android:height="@dimen/dimen_20_dp" />
|
||||
|
||||
<solid android:color="@color/color_white" />
|
||||
<stroke android:width="1dp" android:color="@color/color_337eff"/>
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@drawable/switch_thumb_on" android:state_checked="true" />
|
||||
|
||||
<item android:drawable="@drawable/switch_thumb_off" android:state_checked="false" />
|
||||
|
||||
</selector>
|
||||
19
teamkit-ui/src/main/res-normal/drawable/switch_track_off.xml
Normal file
19
teamkit-ui/src/main/res-normal/drawable/switch_track_off.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="@dimen/dimen_12_dp"/>
|
||||
|
||||
<size
|
||||
android:width="@dimen/dimen_44_dp"
|
||||
android:height="@dimen/dimen_24_dp" />
|
||||
|
||||
<solid android:color="#EEEEEE" />
|
||||
|
||||
</shape>
|
||||
19
teamkit-ui/src/main/res-normal/drawable/switch_track_on.xml
Normal file
19
teamkit-ui/src/main/res-normal/drawable/switch_track_on.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="@dimen/dimen_12_dp" />
|
||||
|
||||
<size
|
||||
android:width="@dimen/dimen_44_dp"
|
||||
android:height="@dimen/dimen_24_dp" />
|
||||
|
||||
<solid android:color="#09BB07" />
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@drawable/switch_track_on" android:state_checked="true" />
|
||||
|
||||
<item android:drawable="@drawable/switch_track_off" android:state_checked="false" />
|
||||
|
||||
</selector>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/bg_team_identify_choice_dialog"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvTeamOwner"
|
||||
app:layout_constraintTop_toTopOf="@id/tvTeamAllMember" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTeamAllMember"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="42dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_all_member"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="14dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tvTeamOwner"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="@color/color_dedede"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTeamAllMember" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTeamOwner"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_owner"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="14dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvCancel"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCancel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="42dp"
|
||||
android:background="@drawable/bg_team_identify_choice_dialog"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_cancel"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="14dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
130
teamkit-ui/src/main/res-normal/layout/team_info_activity.xml
Normal file
130
teamkit-ui/src/main/res-normal/layout/team_info_activity.xml
Normal file
@@ -0,0 +1,130 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_eff1f4">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_info_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:src="@drawable/ic_arrow_left"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/infoBg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="-2dp"
|
||||
android:background="@drawable/bg_team_setting_block"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvIntroduce"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTitle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvIcon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="74dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:text="@string/team_icon_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:drawableEndCompat="@drawable/ic_right_arrow"
|
||||
app:layout_constraintEnd_toEndOf="@id/infoBg"
|
||||
app:layout_constraintStart_toStartOf="@id/infoBg"
|
||||
app:layout_constraintTop_toTopOf="@id/infoBg"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<com.netease.yunxin.kit.common.ui.widgets.ContactAvatarView
|
||||
android:id="@+id/ivIcon"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginEnd="44dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvIcon"
|
||||
app:layout_constraintEnd_toEndOf="@id/infoBg"
|
||||
app:layout_constraintTop_toTopOf="@id/tvIcon" />
|
||||
|
||||
<View
|
||||
android:id="@+id/line1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@color/color_f5f8fc"
|
||||
app:layout_constraintEnd_toEndOf="@id/infoBg"
|
||||
app:layout_constraintStart_toStartOf="@id/infoBg"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvIcon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="46dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:text="@string/team_name_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:drawableEndCompat="@drawable/ic_right_arrow"
|
||||
app:layout_constraintEnd_toEndOf="@id/infoBg"
|
||||
app:layout_constraintStart_toStartOf="@id/infoBg"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvIcon"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:id="@+id/line2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@color/color_f5f8fc"
|
||||
app:layout_constraintEnd_toEndOf="@id/infoBg"
|
||||
app:layout_constraintStart_toStartOf="@id/infoBg"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvIntroduce"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="46dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:text="@string/team_introduce_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
android:visibility="gone"
|
||||
app:drawableEndCompat="@drawable/ic_right_arrow"
|
||||
app:layout_constraintEnd_toEndOf="@id/infoBg"
|
||||
app:layout_constraintStart_toStartOf="@id/infoBg"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvName"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_white">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_member_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:src="@drawable/ic_arrow_left"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etSearch"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="@drawable/bg_shape_search"
|
||||
android:drawableStart="@drawable/ic_search"
|
||||
android:drawablePadding="5dp"
|
||||
android:hint="@string/team_search_friend"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textColorHint="@color/color_a6adb6"
|
||||
android:textSize="14dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvTitle"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivClear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:src="@drawable/ic_clear"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/etSearch"
|
||||
app:layout_constraintEnd_toEndOf="@id/etSearch"
|
||||
app:layout_constraintTop_toTopOf="@id/etSearch" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvMemberList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:scrollbars="vertical"
|
||||
android:layout_marginTop="10dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/etSearch" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivEmpty"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="@dimen/dimen_191_dp"
|
||||
android:layout_width="@dimen/dimen_118_dp"
|
||||
android:src="@drawable/ic_contact_empty"
|
||||
android:layout_height="@dimen/dimen_96_dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvEmpty"
|
||||
android:layout_width="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:gravity="center"
|
||||
app:layout_constraintTop_toBottomOf="@id/ivEmpty"
|
||||
android:text="@string/team_search_result_empty"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/groupEmtpy"
|
||||
app:constraint_referenced_ids="ivEmpty,tvEmpty"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<com.netease.yunxin.kit.common.ui.widgets.ContactAvatarView
|
||||
android:id="@+id/cavUserIcon"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginStart="20dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUserName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/cavUserIcon"
|
||||
app:layout_constraintEnd_toStartOf="@id/tvIdentify"
|
||||
app:layout_constraintStart_toEndOf="@id/cavUserIcon"
|
||||
app:layout_constraintTop_toTopOf="@id/cavUserIcon"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvIdentify"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="@drawable/bg_item_team_owner"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:text="@string/team_owner"
|
||||
android:textColor="@color/color_337eff"
|
||||
android:textSize="12dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/cavUserIcon"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/cavUserIcon"
|
||||
tools:ignore="SpUsage" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
540
teamkit-ui/src/main/res-normal/layout/team_setting_activity.xml
Normal file
540
teamkit-ui/src/main/res-normal/layout/team_setting_activity.xml
Normal file
@@ -0,0 +1,540 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_eff1f4">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_setting_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:src="@drawable/ic_arrow_left"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:overScrollMode="never"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTitle">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="20dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/bg1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="160dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="@drawable/bg_team_setting_block"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginStart="11dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:drawableEndCompat="@drawable/ic_right_arrow"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg1"
|
||||
app:layout_constraintStart_toEndOf="@id/ivIcon"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<com.netease.yunxin.kit.common.ui.widgets.ContactAvatarView
|
||||
android:id="@+id/ivIcon"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginStart="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvName"
|
||||
app:layout_constraintStart_toStartOf="@id/bg1"
|
||||
app:layout_constraintTop_toTopOf="@id/tvName" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@color/color_f5f8fc"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg1"
|
||||
app:layout_constraintStart_toStartOf="@id/bg1"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMember"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:singleLine="true"
|
||||
android:text="@string/team_member_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintStart_toStartOf="@id/bg1"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvName"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCount"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="end"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="16dp"
|
||||
app:drawableEndCompat="@drawable/ic_right_arrow"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvMember"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg1"
|
||||
app:layout_constraintStart_toEndOf="@id/tvMember"
|
||||
app:layout_constraintTop_toTopOf="@id/tvMember"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivAdd"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@drawable/ic_chat_setting_add_member"
|
||||
app:layout_constraintStart_toStartOf="@id/bg1"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvMember" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvMemberList"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:overScrollMode="never"
|
||||
app:layout_constraintBottom_toBottomOf="@id/bg1"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg1"
|
||||
app:layout_constraintStart_toEndOf="@id/ivAdd"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvCount" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bg2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="@drawable/bg_team_setting_block"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvSessionPin"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bg1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMark"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:text="@string/team_mark"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:drawableEndCompat="@drawable/ic_right_arrow"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg2"
|
||||
app:layout_constraintStart_toStartOf="@id/bg2"
|
||||
app:layout_constraintTop_toTopOf="@id/bg2"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:id="@+id/markLine"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@color/color_f5f8fc"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg2"
|
||||
app:layout_constraintStart_toStartOf="@id/bg2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvMark" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/markGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="visible"
|
||||
app:constraint_referenced_ids="tvMark,markLine" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvHistory"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:text="@string/team_history"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:drawableEndCompat="@drawable/ic_right_arrow"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg2"
|
||||
app:layout_constraintStart_toStartOf="@id/bg2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvMark"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:id="@+id/historyLine"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@color/color_f5f8fc"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg2"
|
||||
app:layout_constraintStart_toStartOf="@id/bg2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvHistory" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/historyGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="visible"
|
||||
app:constraint_referenced_ids="tvHistory,historyLine" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMessageTip"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:text="@string/team_message_tip"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg2"
|
||||
app:layout_constraintStart_toStartOf="@id/bg2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvHistory"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swMessageTip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:thumb="@drawable/switch_thumb_selector"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvMessageTip"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg2"
|
||||
app:layout_constraintTop_toTopOf="@id/tvMessageTip"
|
||||
app:track="@drawable/switch_track_selector" />
|
||||
|
||||
<View
|
||||
android:id="@+id/messageTipLine"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@color/color_f5f8fc"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg2"
|
||||
app:layout_constraintStart_toStartOf="@id/bg2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvMessageTip" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/messageTipGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:constraint_referenced_ids="tvMessageTip,swMessageTip,messageTipLine" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSessionPin"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:text="@string/team_session_pin"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg2"
|
||||
app:layout_constraintStart_toStartOf="@id/bg2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvMessageTip"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swSessionPin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:thumb="@drawable/switch_thumb_selector"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvSessionPin"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg2"
|
||||
app:layout_constraintTop_toTopOf="@id/tvSessionPin"
|
||||
app:track="@drawable/switch_track_selector" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bg3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="@drawable/bg_team_setting_block"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvTeamMute"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bg2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTeamNickname"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:text="@string/team_my_nickname_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:drawableEndCompat="@drawable/ic_right_arrow"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg3"
|
||||
app:layout_constraintStart_toStartOf="@id/bg3"
|
||||
app:layout_constraintTop_toTopOf="@id/bg3"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:id="@+id/nicknameLine"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@color/color_f5f8fc"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg3"
|
||||
app:layout_constraintStart_toStartOf="@id/bg3"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTeamNickname" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/nicknameGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="tvTeamNickname,nicknameLine" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTeamMute"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:text="@string/team_mute"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg3"
|
||||
app:layout_constraintStart_toStartOf="@id/bg3"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTeamNickname"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swTeamMute"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:thumb="@drawable/switch_thumb_selector"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvTeamMute"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg3"
|
||||
app:layout_constraintTop_toTopOf="@id/tvTeamMute"
|
||||
app:track="@drawable/switch_track_selector" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/teamMuteGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="tvTeamMute,swTeamMute" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bg4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="@drawable/bg_team_setting_block"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvInviteAgree"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bg3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvInviteOtherPermission"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:text="@string/team_invite_other_permission"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:drawableEndCompat="@drawable/ic_right_arrow"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg4"
|
||||
app:layout_constraintStart_toStartOf="@id/bg4"
|
||||
app:layout_constraintTop_toTopOf="@id/bg4"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvInviteOtherValue"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="14dp"
|
||||
android:text="@string/team_all_member"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="14dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvInviteOtherPermission"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg4"
|
||||
app:layout_constraintStart_toStartOf="@id/bg4"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:id="@+id/inviteLine"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@color/color_f5f8fc"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg4"
|
||||
app:layout_constraintStart_toStartOf="@id/bg4"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvInviteOtherPermission" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/inviteGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="tvInviteOtherPermission,inviteLine,tvInviteOtherValue" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUpdateInfoPermission"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="63dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingTop="14dp"
|
||||
android:text="@string/team_update_info_permission"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:drawableEndCompat="@drawable/ic_right_arrow"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg4"
|
||||
app:layout_constraintStart_toStartOf="@id/bg4"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvInviteOtherPermission"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUpdateInfoValue"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
android:text="@string/team_owner"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="14dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvUpdateInfoPermission"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg4"
|
||||
app:layout_constraintStart_toStartOf="@id/bg4"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:id="@+id/updateLine"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:background="@color/color_f5f8fc"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg4"
|
||||
app:layout_constraintStart_toStartOf="@id/bg4"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvUpdateInfoPermission" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/updateGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="tvUpdateInfoPermission,updateLine,tvUpdateInfoValue" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvInviteAgree"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center_vertical|start"
|
||||
android:text="@string/team_need_agreed_when_be_invited_permission"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg4"
|
||||
app:layout_constraintStart_toStartOf="@id/bg4"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvUpdateInfoPermission"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swInviteAgree"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:thumb="@drawable/switch_thumb_selector"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvInviteAgree"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg4"
|
||||
app:layout_constraintTop_toTopOf="@id/tvInviteAgree"
|
||||
app:track="@drawable/switch_track_selector" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/inviteAgreeGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="tvInviteAgree,swInviteAgree" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvQuit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="@drawable/bg_team_setting_block"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_advanced_quit"
|
||||
android:textColor="@color/color_e6605c"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bg4"
|
||||
tools:ignore="SpUsage" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<com.netease.yunxin.kit.common.ui.widgets.ContactAvatarView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/cavUserIcon"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp" />
|
||||
@@ -0,0 +1,174 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_eff1f4">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_update_icon"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/team_cancel"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSave"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/team_save"
|
||||
android:textColor="@color/color_337eff"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bg1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="128dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="@drawable/bg_team_setting_block"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTitle" />
|
||||
|
||||
<com.netease.yunxin.kit.common.ui.widgets.ContactAvatarView
|
||||
android:id="@+id/ivIcon"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
app:avatarCorner="@dimen/dimen_40_dp"
|
||||
app:avatarTextSize="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/bg1"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg1"
|
||||
app:layout_constraintStart_toStartOf="@id/bg1"
|
||||
app:layout_constraintTop_toTopOf="@id/bg1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivCamera"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_team_camera"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivIcon"
|
||||
app:layout_constraintEnd_toEndOf="@id/ivIcon" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bg2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="114dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="@drawable/bg_team_setting_block"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bg1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDefaultIconTip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/team_default_icon"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintStart_toStartOf="@id/bg2"
|
||||
app:layout_constraintTop_toTopOf="@id/bg2"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivDefault1"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/ic_team_default_1"
|
||||
app:layout_constraintEnd_toStartOf="@id/ivDefault2"
|
||||
app:layout_constraintStart_toStartOf="@id/bg1"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDefaultIconTip" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivDefault2"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/ic_team_default_2"
|
||||
app:layout_constraintEnd_toStartOf="@id/ivDefault3"
|
||||
app:layout_constraintStart_toEndOf="@id/ivDefault1"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDefaultIconTip" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivDefault3"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/ic_team_default_3"
|
||||
app:layout_constraintEnd_toStartOf="@id/ivDefault4"
|
||||
app:layout_constraintStart_toEndOf="@id/ivDefault2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDefaultIconTip" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivDefault4"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/ic_team_default_4"
|
||||
app:layout_constraintEnd_toStartOf="@id/ivDefault5"
|
||||
app:layout_constraintStart_toEndOf="@id/ivDefault3"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDefaultIconTip" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivDefault5"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/ic_team_default_5"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg2"
|
||||
app:layout_constraintStart_toEndOf="@id/ivDefault4"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDefaultIconTip" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/groupPrivilege"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="tvSave,ivCamera,bg2,tvDefaultIconTip,ivDefault1,ivDefault2,ivDefault3,ivDefault4,ivDefault5" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_eff1f4">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_introduce_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/team_cancel"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSave"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/team_save"
|
||||
android:textColor="@color/color_337eff"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="@drawable/bg_team_setting_block"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvFlag"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTitle" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etIntroduce"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="15dp"
|
||||
android:background="@null"
|
||||
android:maxLength="100"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="14dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/ivClear"
|
||||
app:layout_constraintStart_toStartOf="@id/bg"
|
||||
app:layout_constraintTop_toTopOf="@id/bg"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivClear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:src="@drawable/ic_clear"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/etIntroduce"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg"
|
||||
app:layout_constraintTop_toTopOf="@id/etIntroduce" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvFlag"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="0/100"
|
||||
android:textColor="@color/color_b3b7bc"
|
||||
android:textSize="12dp"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/etIntroduce"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_eff1f4">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_name_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/team_cancel"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSave"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/team_save"
|
||||
android:textColor="@color/color_337eff"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="@drawable/bg_team_setting_block"
|
||||
android:minHeight="60dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvFlag"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTitle" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="15dp"
|
||||
android:background="@null"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/color_333333"
|
||||
android:maxLength="30"
|
||||
android:textSize="14dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/ivClear"
|
||||
app:layout_constraintStart_toStartOf="@id/bg"
|
||||
app:layout_constraintTop_toTopOf="@id/bg"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivClear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:src="@drawable/ic_clear"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/etName"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg"
|
||||
app:layout_constraintTop_toTopOf="@id/etName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvFlag"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:textColor="@color/color_b3b7bc"
|
||||
android:textSize="12dp"
|
||||
android:text="0/30"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/etName"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_eff1f4">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/team_my_nickname_title"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/team_cancel"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSave"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/team_save"
|
||||
android:textColor="@color/color_337eff"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="@drawable/bg_team_setting_block"
|
||||
android:minHeight="60dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvFlag"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTitle" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etNickname"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="15dp"
|
||||
android:background="@null"
|
||||
android:maxLength="30"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="14dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/ivClear"
|
||||
app:layout_constraintStart_toStartOf="@id/bg"
|
||||
app:layout_constraintTop_toTopOf="@id/bg"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivClear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:src="@drawable/ic_clear"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/etNickname"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg"
|
||||
app:layout_constraintTop_toTopOf="@id/etNickname" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvFlag"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="0/30"
|
||||
android:textColor="@color/color_b3b7bc"
|
||||
android:textSize="12dp"
|
||||
app:layout_constraintEnd_toEndOf="@id/bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/etNickname"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
BIN
teamkit-ui/src/main/res/drawable-xxhdpi/ic_contact_empty.png
Normal file
BIN
teamkit-ui/src/main/res/drawable-xxhdpi/ic_contact_empty.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.9 KiB |
13
teamkit-ui/src/main/res/drawable/bg_team_default.xml
Normal file
13
teamkit-ui/src/main/res/drawable/bg_team_default.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="8dp" />
|
||||
<solid android:color="@color/color_fff4f4f4" />
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/color_white" />
|
||||
<corners android:radius="12dp" />
|
||||
|
||||
</shape>
|
||||
12
teamkit-ui/src/main/res/drawable/bg_team_setting_block.xml
Normal file
12
teamkit-ui/src/main/res/drawable/bg_team_setting_block.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="8dp" />
|
||||
<solid android:color="@color/color_white" />
|
||||
</shape>
|
||||
15
teamkit-ui/src/main/res/drawable/ic_arrow_left.xml
Normal file
15
teamkit-ui/src/main/res/drawable/ic_arrow_left.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="26dp"
|
||||
android:height="26dp"
|
||||
android:viewportWidth="26"
|
||||
android:viewportHeight="26">
|
||||
<path
|
||||
android:pathData="M17.7071,5.7071C18.0976,5.3166 18.0976,4.6834 17.7071,4.2929C17.3166,3.9024 16.6834,3.9024 16.2929,4.2929L17.7071,5.7071ZM9,13L8.2929,12.2929C7.9024,12.6834 7.9024,13.3166 8.2929,13.7071L9,13ZM15.7929,21.2071C16.1834,21.5976 16.8166,21.5976 17.2071,21.2071C17.5976,20.8166 17.5976,20.1834 17.2071,19.7929L15.7929,21.2071ZM16.2929,4.2929L8.2929,12.2929L9.7071,13.7071L17.7071,5.7071L16.2929,4.2929ZM8.2929,13.7071L15.7929,21.2071L17.2071,19.7929L9.7071,12.2929L8.2929,13.7071Z"
|
||||
android:fillColor="#656A72"/>
|
||||
</vector>
|
||||
15
teamkit-ui/src/main/res/drawable/ic_clear.xml
Normal file
15
teamkit-ui/src/main/res/drawable/ic_clear.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="16dp"
|
||||
android:height="16dp"
|
||||
android:viewportWidth="16"
|
||||
android:viewportHeight="16">
|
||||
<path
|
||||
android:pathData="M8,0C3.5891,0 0,3.5884 0,8C0,12.4116 3.5884,16 8,16C12.4109,16 16,12.4116 16,8C16,3.5884 12.4116,0 8,0ZM11.2633,10.464C11.3191,10.5165 11.3638,10.5796 11.3948,10.6497C11.4257,10.7198 11.4423,10.7954 11.4434,10.872C11.4446,10.9486 11.4303,11.0246 11.4015,11.0956C11.3727,11.1666 11.3299,11.2311 11.2757,11.2852C11.2215,11.3393 11.1569,11.382 11.0859,11.4107C11.0149,11.4393 10.9388,11.4535 10.8622,11.4522C10.7856,11.4509 10.71,11.4342 10.64,11.4031C10.57,11.372 10.5069,11.3272 10.4545,11.2713L7.9971,8.8058L5.5316,11.2451C5.4792,11.3017 5.4158,11.347 5.3453,11.3785C5.2748,11.4099 5.1987,11.4267 5.1216,11.428C5.0444,11.4292 4.9678,11.4148 4.8964,11.3856C4.825,11.3564 4.7602,11.3131 4.7059,11.2582C4.6517,11.2033 4.6091,11.1381 4.5808,11.0663C4.5525,10.9945 4.5389,10.9177 4.5411,10.8406C4.5432,10.7635 4.5609,10.6876 4.5932,10.6175C4.6254,10.5474 4.6715,10.4845 4.7287,10.4327L7.1905,7.9971L4.7375,5.536C4.6835,5.4831 4.6405,5.42 4.6111,5.3503C4.5816,5.2807 4.5663,5.2059 4.566,5.1302C4.5657,5.0546 4.5803,4.9797 4.6092,4.9098C4.638,4.8399 4.6804,4.7764 4.734,4.723C4.7875,4.6697 4.8511,4.6274 4.9211,4.5988C4.991,4.5701 5.066,4.5556 5.1416,4.5562C5.2172,4.5567 5.292,4.5722 5.3615,4.6018C5.4311,4.6315 5.4941,4.6746 5.5469,4.7287L8.0036,7.1934L10.4691,4.7542C10.5224,4.7015 10.5856,4.6598 10.6551,4.6315C10.7245,4.6032 10.7989,4.5888 10.8739,4.5893C10.9489,4.5897 11.0231,4.6049 11.0922,4.634C11.1613,4.6631 11.224,4.7056 11.2767,4.7589C11.3294,4.8123 11.3711,4.8755 11.3994,4.9449C11.4277,5.0144 11.4421,5.0887 11.4416,5.1637C11.4412,5.2387 11.426,5.3129 11.3969,5.382C11.3678,5.4511 11.3253,5.5138 11.272,5.5665L8.8095,8.0029L11.2633,10.464Z"
|
||||
android:fillColor="#B3B7BC" />
|
||||
</vector>
|
||||
16
teamkit-ui/src/main/res/drawable/ic_right_arrow.xml
Normal file
16
teamkit-ui/src/main/res/drawable/ic_right_arrow.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="16dp"
|
||||
android:height="16dp"
|
||||
android:viewportWidth="16"
|
||||
android:viewportHeight="16">
|
||||
|
||||
<path
|
||||
android:pathData="M5.1032,3.5123C4.8629,3.272 4.8629,2.8823 5.1032,2.642C5.3435,2.4017 5.7332,2.4017 5.9735,2.642L5.1032,3.5123ZM10.4614,8.0002L10.8966,7.5651C11.1369,7.8054 11.1369,8.1951 10.8966,8.4354L10.4614,8.0002ZM6.2812,13.0508C6.0409,13.2911 5.6512,13.2911 5.4109,13.0508C5.1706,12.8104 5.1706,12.4208 5.4109,12.1805L6.2812,13.0508ZM5.9735,2.642L10.8966,7.5651L10.0263,8.4354L5.1032,3.5123L5.9735,2.642ZM10.8966,8.4354L6.2812,13.0508L5.4109,12.1805L10.0263,7.5651L10.8966,8.4354Z"
|
||||
android:fillColor="#999999" />
|
||||
</vector>
|
||||
15
teamkit-ui/src/main/res/drawable/ic_search.xml
Normal file
15
teamkit-ui/src/main/res/drawable/ic_search.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="16dp"
|
||||
android:height="16dp"
|
||||
android:viewportWidth="16"
|
||||
android:viewportHeight="16">
|
||||
<path
|
||||
android:pathData="M6.9706,2.7743C9.12,2.7777 10.9176,4.4086 11.1293,6.5476C11.3413,8.6866 9.8984,10.6385 7.7916,11.0634C5.6845,11.4884 3.598,10.2484 2.9643,8.1945C2.3305,6.1405 3.3552,3.9405 5.3352,3.1042C5.8526,2.8853 6.4088,2.7731 6.9706,2.7743ZM6.9706,1.8046C4.1144,1.8046 1.7988,4.1201 1.7988,6.9763C1.7988,9.8324 4.1144,12.148 6.9706,12.148C9.8267,12.148 12.1423,9.8324 12.1423,6.9763C12.1423,4.1201 9.8267,1.8046 6.9706,1.8046ZM13.7099,14.2005C13.6462,14.2007 13.5831,14.1881 13.5243,14.1637C13.4654,14.1393 13.412,14.1035 13.3671,14.0583L10.9105,11.6017C10.7269,11.4114 10.7295,11.109 10.9164,10.9219C11.1035,10.7349 11.4059,10.7322 11.596,10.9161L14.0526,13.3726C14.1203,13.4405 14.1665,13.5268 14.1852,13.6209C14.2039,13.7149 14.1943,13.8123 14.1576,13.9009C14.121,13.9896 14.059,14.0654 13.9793,14.1187C13.8996,14.172 13.8058,14.2005 13.7099,14.2005Z"
|
||||
android:fillColor="#A6ADB6"/>
|
||||
</vector>
|
||||
23
teamkit-ui/src/main/res/drawable/ic_team_camera.xml
Normal file
23
teamkit-ui/src/main/res/drawable/ic_team_camera.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="28dp"
|
||||
android:height="28dp"
|
||||
android:viewportWidth="28"
|
||||
android:viewportHeight="28">
|
||||
<path
|
||||
android:pathData="M14,14m-13,0a13,13 0,1 1,26 0a13,13 0,1 1,-26 0"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#60CFA7"
|
||||
android:strokeColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M14.0073,11.9028C12.4257,11.9028 11.1369,13.1892 11.1369,14.7732C11.1369,16.3548 12.4233,17.6436 14.0073,17.6436C15.5913,17.6436 16.8777,16.3572 16.8777,14.7732C16.8753,13.1892 15.5889,11.9028 14.0073,11.9028Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M20.7224,10.1565H18.8144C18.4496,10.1565 18.116,9.9501 17.9552,9.6237L17.3384,8.3853C17.1752,8.0589 16.844,7.8525 16.4792,7.8525H11.5208C11.156,7.8525 10.8248,8.0589 10.6616,8.3829L10.0424,9.6237C9.8792,9.9501 9.548,10.1541 9.1832,10.1541H7.2776C6.7472,10.1541 6.3176,10.5837 6.3176,11.1141V19.1853C6.3176,19.7157 6.7472,20.1453 7.2776,20.1453H20.72C21.2504,20.1453 21.68,19.7157 21.68,19.1853V11.1165C21.6824,10.5861 21.2528,10.1565 20.7224,10.1565ZM14.0072,18.5997C11.8952,18.5997 10.1768,16.8813 10.1768,14.7693C10.1768,12.6573 11.8952,10.9389 14.0072,10.9389C16.1192,10.9389 17.8376,12.6573 17.8376,14.7693C17.8376,16.8813 16.1192,18.5997 14.0072,18.5997Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
||||
12
teamkit-ui/src/main/res/drawable/view_normal_selector.xml
Normal file
12
teamkit-ui/src/main/res/drawable/view_normal_selector.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<selector xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android" tools:ignore="MissingDefaultResource">
|
||||
|
||||
<item android:drawable="@color/color_white" android:state_pressed="false" />
|
||||
<item android:drawable="@color/color_ededef" android:state_pressed="true" />
|
||||
</selector>
|
||||
48
teamkit-ui/src/main/res/values-en/strings.xml
Normal file
48
teamkit-ui/src/main/res/values-en/strings.xml
Normal file
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<string name="team_setting_title">Settings</string>
|
||||
<string name="team_info_title">Group Info</string>
|
||||
<string name="team_group_info_title">Temp Group Info</string>
|
||||
<string name="team_name_title">Group Name</string>
|
||||
<string name="team_group_name_title">Temp Group Name</string>
|
||||
<string name="team_member_title">Group Member</string>
|
||||
<string name="team_group_member_title">Temp Group Member</string>
|
||||
<string name="team_icon_title">Group Avator</string>
|
||||
<string name="team_group_icon_title">Temp Group Avator</string>
|
||||
<string name="team_introduce_title">Group Introduce</string>
|
||||
<string name="team_my_nickname_title">My Alias in Group</string>
|
||||
<string name="team_mark">Pin</string>
|
||||
<string name="team_history">History</string>
|
||||
<string name="team_message_tip">Notification</string>
|
||||
<string name="team_session_pin">Sticky on Top</string>
|
||||
<string name="team_mute">Group Mute</string>
|
||||
<string name="team_invite_other_permission">Invitation Permission</string>
|
||||
<string name="team_update_info_permission">Group info setting Permission</string>
|
||||
<string name="team_need_agreed_when_be_invited_permission">Invitees agree to join</string>
|
||||
<string name="team_advanced_dismiss">Dissolve Group</string>
|
||||
<string name="team_advanced_quit">Leave Group</string>
|
||||
<string name="team_group_quit">Leave Temp Group</string>
|
||||
<string name="team_default_icon">Select Default Icon</string>
|
||||
<string name="team_all_member">Everyone</string>
|
||||
<string name="team_owner">Group Owner</string>
|
||||
<string name="team_update_icon">Modify Avator</string>
|
||||
<string name="team_cancel">Cancel</string>
|
||||
<string name="team_confirm">Yes</string>
|
||||
<string name="team_quit_advanced_team_query">Whether to leave group?</string>
|
||||
<string name="team_quit_group_team_query">Whether to leave temp group?</string>
|
||||
<string name="team_dismiss_advanced_team_query">Whether to dissolve group?</string>
|
||||
<string name="team_save">Save</string>
|
||||
<string name="team_search_friend">Search Contacts</string>
|
||||
<string name="team_search_result_empty">No results found</string>
|
||||
|
||||
<string name="team_request_fail">Failed</string>
|
||||
<string name="team_network_error">No internet</string>
|
||||
|
||||
<string name="group_team">Temp Group</string>
|
||||
<string name="advanced_team">Group</string>
|
||||
</resources>
|
||||
47
teamkit-ui/src/main/res/values-ja/strings.xml
Normal file
47
teamkit-ui/src/main/res/values-ja/strings.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<string name="team_setting_title">設定</string>
|
||||
<string name="team_info_title">グループ情報</string>
|
||||
<string name="team_group_info_title">ディスカッション グループ情報</string>
|
||||
<string name="team_name_title">グループ名</string>
|
||||
<string name="team_group_name_title">ディスカッション グループ名</string>
|
||||
<string name="team_member_title">グループメンバー</string>
|
||||
<string name="team_group_member_title">ディスカッション グループのメンバー</string>
|
||||
<string name="team_icon_title">グループのアバター</string>
|
||||
<string name="team_group_icon_title">ディスカッション グループのアバター</string>
|
||||
<string name="team_introduce_title">グループの紹介</string>
|
||||
<string name="team_my_nickname_title">グループ内の私のニックネーム</string>
|
||||
<string name="team_mark">マーク</string>
|
||||
<string name="team_history">歴史</string>
|
||||
<string name="team_message_tip">メッセージリマインダーをオンにする</string>
|
||||
<string name="team_session_pin">チャットピン</string>
|
||||
<string name="team_mute">グループのミュート</string>
|
||||
<string name="team_invite_other_permission">他の人を招待する権限</string>
|
||||
<string name="team_update_info_permission">グループ情報変更権限</string>
|
||||
<string name="team_need_agreed_when_be_invited_permission">招待者の同意が必要かどうか</string>
|
||||
<string name="team_advanced_dismiss">グループ チャットを終了する</string>
|
||||
<string name="team_advanced_quit">グループ チャットを終了する</string>
|
||||
<string name="team_group_quit">ディスカッション グループを終了します</string>
|
||||
<string name="team_default_icon">デフォルトのアイコンを選択</string>
|
||||
<string name="team_all_member">全員</string>
|
||||
<string name="team_owner">チームオーナー</string>
|
||||
<string name="team_update_icon">アバターを変更</string>
|
||||
<string name="team_cancel">キャンセル</string>
|
||||
<string name="team_confirm">確認</string>
|
||||
<string name="team_quit_advanced_team_query">グループ チャットを終了しますか? </string>
|
||||
<string name="team_quit_group_team_query">ディスカッション グループを終了しますか? </string>
|
||||
<string name="team_dismiss_advanced_team_query">グループ チャットを終了しますか? </string>
|
||||
<string name="team_save">保存</string>
|
||||
<string name="team_search_friend">検索</string>
|
||||
<string name="team_search_result_empty">結果がありません</string>
|
||||
<string name="team_network_error">ネットワークは現在利用できません。ネットワーク設定を確認してください。 </string>
|
||||
<string name="team_request_fail">操作が失敗しました</string>
|
||||
<string name="group_team">ディスカッション グループ</string>
|
||||
<string name="advanced_team">上級チーム</string>
|
||||
</resources>
|
||||
47
teamkit-ui/src/main/res/values-zh/strings.xml
Normal file
47
teamkit-ui/src/main/res/values-zh/strings.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<string name="team_setting_title">设置</string>
|
||||
<string name="team_info_title">群信息</string>
|
||||
<string name="team_group_info_title">讨论组信息</string>
|
||||
<string name="team_name_title">群名称</string>
|
||||
<string name="team_group_name_title">讨论组名称</string>
|
||||
<string name="team_member_title">群成员</string>
|
||||
<string name="team_group_member_title">讨论组成员</string>
|
||||
<string name="team_icon_title">群头像</string>
|
||||
<string name="team_group_icon_title">讨论组头像</string>
|
||||
<string name="team_introduce_title">群介绍</string>
|
||||
<string name="team_my_nickname_title">我在群里的昵称</string>
|
||||
<string name="team_mark">标记</string>
|
||||
<string name="team_history">历史记录</string>
|
||||
<string name="team_message_tip">开启消息提醒</string>
|
||||
<string name="team_session_pin">聊天置顶</string>
|
||||
<string name="team_mute">群禁言</string>
|
||||
<string name="team_invite_other_permission">邀请他人权限</string>
|
||||
<string name="team_update_info_permission">群资料修改权限</string>
|
||||
<string name="team_need_agreed_when_be_invited_permission">是否需要被邀请者同意</string>
|
||||
<string name="team_advanced_dismiss">解散群聊</string>
|
||||
<string name="team_advanced_quit">退出群聊</string>
|
||||
<string name="team_group_quit">退出讨论组</string>
|
||||
<string name="team_default_icon">选择默认图标</string>
|
||||
<string name="team_all_member">所有人</string>
|
||||
<string name="team_owner">群主</string>
|
||||
<string name="team_update_icon">修改头像</string>
|
||||
<string name="team_cancel">取消</string>
|
||||
<string name="team_confirm">确认</string>
|
||||
<string name="team_quit_advanced_team_query">是否退出群聊?</string>
|
||||
<string name="team_quit_group_team_query">是否退出讨论组?</string>
|
||||
<string name="team_dismiss_advanced_team_query">是否解散群聊?</string>
|
||||
<string name="team_save">保存</string>
|
||||
<string name="team_search_friend">搜索</string>
|
||||
<string name="team_search_result_empty">暂无结果</string>
|
||||
<string name="team_network_error">当前网络不可用,请检查你当网络设置。</string>
|
||||
<string name="team_request_fail">操作失败</string>
|
||||
<string name="group_team">讨论组</string>
|
||||
<string name="advanced_team">高级群</string>
|
||||
</resources>
|
||||
29
teamkit-ui/src/main/res/values/colors.xml
Normal file
29
teamkit-ui/src/main/res/values/colors.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<color name="color_white">#FFFFFF</color>
|
||||
<color name="color_e6605c">#ffe6605c</color>
|
||||
<color name="color_e0ecff">#ffe0ecff</color>
|
||||
<color name="color_b9d3ff">#ffb9d3ff</color>
|
||||
<color name="color_dedede">#ffdedede</color>
|
||||
<color name="color_a6adb6">#a6adb6</color>
|
||||
<color name="color_eff1f4">#eff1f4</color>
|
||||
<color name="color_fff4f4f4">#fff4f4f4</color>
|
||||
<color name="color_ededef">#ededef</color>
|
||||
<color name="color_dbdde4">#dbdde4</color>
|
||||
<color name="color_337eff">#337eff</color>
|
||||
<color name="color_b3b7bc">#b3b7bc</color>
|
||||
<color name="color_999999">#999999</color>
|
||||
<color name="color_f2f4f5">#f2f4f5</color>
|
||||
<color name="color_e5e5e5">#e5e5e5</color>
|
||||
<color name="color_58be6b">#58BE6B</color>
|
||||
<color name="color_10_58be6b">#1958BE6B</color>
|
||||
<color name="color_f7f7f7">#f7f7f7</color>
|
||||
<color name="color_ededed">#EDEDED</color>
|
||||
|
||||
</resources>
|
||||
5
teamkit-ui/src/main/res/values/dimen.xml
Normal file
5
teamkit-ui/src/main/res/values/dimen.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="dimen_60_dp">60dp</dimen>
|
||||
|
||||
</resources>
|
||||
47
teamkit-ui/src/main/res/values/strings.xml
Normal file
47
teamkit-ui/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<string name="team_setting_title">設定</string>
|
||||
<string name="team_info_title">群組資訊</string>
|
||||
<string name="team_group_info_title">討論群組資訊</string>
|
||||
<string name="team_name_title">群組名稱</string>
|
||||
<string name="team_group_name_title">討論群組名稱</string>
|
||||
<string name="team_member_title">群組成員</string>
|
||||
<string name="team_group_member_title">討論群組成員</string>
|
||||
<string name="team_icon_title">群組頭像</string>
|
||||
<string name="team_group_icon_title">討論群組頭像</string>
|
||||
<string name="team_introduce_title">群介紹</string>
|
||||
<string name="team_my_nickname_title">我在群組裡的暱稱</string>
|
||||
<string name="team_mark">標記</string>
|
||||
<string name="team_history">歷史記錄</string>
|
||||
<string name="team_message_tip">開啟訊息提醒</string>
|
||||
<string name="team_session_pin">聊天置頂</string>
|
||||
<string name="team_mute">群組禁言</string>
|
||||
<string name="team_invite_other_permission">邀請他人權限</string>
|
||||
<string name="team_update_info_permission">群組資料修改權限</string>
|
||||
<string name="team_need_agreed_when_be_invited_permission">是否需要被邀請者同意</string>
|
||||
<string name="team_advanced_dismiss">解散群組聊天</string>
|
||||
<string name="team_advanced_quit">退出群組聊天</string>
|
||||
<string name="team_group_quit">退出討論群組</string>
|
||||
<string name="team_default_icon">選擇預設圖示</string>
|
||||
<string name="team_all_member">所有人</string>
|
||||
<string name="team_owner">群主</string>
|
||||
<string name="team_update_icon">修改頭像</string>
|
||||
<string name="team_cancel">取消</string>
|
||||
<string name="team_confirm">確認</string>
|
||||
<string name="team_quit_advanced_team_query">是否退出群組聊天? </string>
|
||||
<string name="team_quit_group_team_query">是否退出討論群組? </string>
|
||||
<string name="team_dismiss_advanced_team_query">是否解散群組聊天? </string>
|
||||
<string name="team_save">儲存</string>
|
||||
<string name="team_search_friend">搜尋</string>
|
||||
<string name="team_search_result_empty">暫無結果</string>
|
||||
<string name="team_network_error">目前網路不可用,請檢查你當網路設定。 </string>
|
||||
<string name="team_request_fail">操作失敗</string>
|
||||
<string name="group_team">討論群組</string>
|
||||
<string name="advanced_team">高級群</string>
|
||||
</resources>
|
||||
24
teamkit-ui/src/main/res/values/styles.xml
Normal file
24
teamkit-ui/src/main/res/values/styles.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
~ Use of this source code is governed by a MIT license that can be
|
||||
~ found in the LICENSE file.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<style name="BottomDialogTheme" parent="ThemeOverlay.AppCompat.Dialog">
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:colorBackgroundCacheHint">@null</item>
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
<item name="android:windowIsTranslucent">false</item>
|
||||
<item name="android:windowAnimationStyle">@style/BottomDialogAnimation</item>
|
||||
</style>
|
||||
|
||||
<style name="FunBottomDialogTheme" parent="ThemeOverlay.AppCompat.Dialog">
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:colorBackgroundCacheHint">@null</item>
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
<item name="android:windowIsTranslucent">false</item>
|
||||
<item name="android:windowAnimationStyle">@style/BottomDialogAnimation</item>
|
||||
<item name="android:windowIsFloating">false</item>
|
||||
</style>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user