Commit bec981f5 by 霍志良

Merge remote-tracking branch 'origin/dev_mdt_av' into dev_mdt_av

parents a64527e7 6792cda0
......@@ -159,12 +159,6 @@ public class TUICallingEntranceActivity extends Activity {
@Override
public void onClick(View v) {
startCallSomeone();
// TRTCCalling.sharedInstance(TUICallingEntranceActivity.this).setmCurSponsorForMe("1");
// TRTCCalling.sharedInstance(TUICallingEntranceActivity.this).enterTRTCRoom(75, TRTCCalling.TYPE_VIDEO_CALL);
// TRTCCalling.sharedInstance(TUICallingEntranceActivity.this).reject();
// String[] userIDs = new String[]{"130954238"};
// TUICallingImpl.sharedInstance(TUICallingEntranceActivity.this)
// .internalCall(userIDs, "1", "74");
}
});
}
......
......@@ -33,9 +33,10 @@ ext {
//-------------- 功能组件 --------------
//mdt 组件
"ydl-tuicore" : "0.0.3",
"ydl-tuicore" : "0.0.9",
"m-tuicore-ydl" : "0.0.10",
//第一步
"ydl-platform" : "0.0.40.89",
"ydl-platform" : "0.0.40.90",
//第二步 若干
"ydl-webview" : "0.0.38.58",
......@@ -117,9 +118,10 @@ ext {
"m-dynamic-api" : "0.0.3.71",
//-------------- 功能组件 --------------
//mdt组件
"ydl-tuicore" : "0.0.3",
"ydl-tuicore" : "0.0.9",
"m-tuicore-ydl" : "0.0.10",
//第一步
"ydl-platform" : "0.0.40.89",
"ydl-platform" : "0.0.40.90",
//第二步 若干
"ydl-webview" : "0.0.38.58",
......@@ -286,6 +288,7 @@ ext {
//基础组件 <<--- 先发这个,发完改这里的版本号
"ydl-platform" : "com.ydl:ydl-platform:${ydlCompileVersion["ydl-platform"]}@aar",
"ydl-tuicore" : "com.ydl:ydl-tuicore:${ydlCompileVersion["ydl-tuicore"]}@aar",
"m-tuicore-ydl" : "com.ydl:m-tuicore-ydl:${ydlCompileVersion["m-tuicore-ydl"]}@aar",
//功能组件 <<--- 再发这些,发完改这里的版本号
"ydl-webview" : "com.ydl:ydl-webview:${ydlCompileVersion["ydl-webview"]}@aar",
"ydl-media" : "com.ydl:ydl-media:${ydlCompileVersion["ydl-media"]}@aar",
......
......@@ -88,6 +88,7 @@ dependencies {
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib'
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk7'
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-common'
exclude group: 'com.ydl', module: 'pictureselector'
}
api rootProject.ext.dependencies["ydl-utils"]
......
......@@ -6,8 +6,7 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply from: "../maven_push.gradle"
apply from: 'publish.gradle'
android {
compileSdkVersion rootProject.ext.android["compileSdkVersion"]
......@@ -29,14 +28,6 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}
// 主题资源文件夹
sourceSets {
main {
res.srcDirs += "src/main/res-light"
res.srcDirs += "src/main/res-lively"
res.srcDirs += "src/main/res-serious"
}
}
}
dependencies {
......
apply plugin: 'maven'
def mavenRepositoryUrl = "http://nexus.yidianling.com/repository/AndroidReleases/"
def getVersionName() {
return hasProperty('VERSION_NAME') ? VERSION_NAME : rootProject.ext.ydlPublishVersion[project.getName()]
}
uploadArchives {
configuration = configurations.archives
repositories.mavenDeployer {
repository(url: mavenRepositoryUrl) {
authentication(userName: "admin", password: "fjoi#1+#@")
}
pom.project {
artifactId project.getName().replace('_', "-")
groupId "com.ydl"
version getVersionName()
packaging 'aar' //填写aar
}
}
}
\ No newline at end of file
......@@ -3,15 +3,7 @@
package="com.tencent.qcloud.tuicore">
<application>
<activity
android:name=".component.activities.SelectionActivity"
android:screenOrientation="portrait" />
<provider
android:name=".ServiceInitializer"
android:authorities="${applicationId}.TUICore.Init"
android:enabled="true"
android:exported="false"/>
<provider
android:name=".util.TUIFileProvider"
......@@ -27,13 +19,11 @@
<activity
android:name=".calling.videocall.VideoCallingActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.NoActionBar" />
android:screenOrientation="portrait" />
<!--接听界面-->
<activity
android:name=".calling.videocall.YDLInvitionActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.NoActionBar" />
android:screenOrientation="portrait" />
</application>
</manifest>
\ No newline at end of file
package com.tencent.qcloud.tuicore;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
/**
* 各模块如果需要初始化,需要实现此类的 init 方法,并在 Manifest 文件中以 ContentProvider 的形式注册。
*/
public class ServiceInitializer extends ContentProvider {
/**
* 应用启动时自动调起的初始化方法
* @param context applicationContext
*/
public void init(Context context) {}
/**
* 获取轻量版主题资源 id
*/
public int getLightThemeResId() {
return 0;
}
/**
* 获取活泼版主题资源 id
*/
public int getLivelyThemeResId() {
return 0;
}
/**
* 获取严肃版主题资源 id
*/
public int getSeriousThemeResId() {
return 0;
}
/////////////////////////////////////////////////////////////////////////////////
// 以下方法无需重写 //
/////////////////////////////////////////////////////////////////////////////////
@Override
public boolean onCreate() {
Context appContext = getContext().getApplicationContext();
// 路由初始化
TUIRouter.init(appContext);
// 公共配置初始化
TUIConfig.init(appContext);
// 皮肤语言初始化
TUIThemeManager.addLightTheme(getLightThemeResId());
TUIThemeManager.addLivelyTheme(getLivelyThemeResId());
TUIThemeManager.addSeriousTheme(getSeriousThemeResId());
TUIThemeManager.setTheme(appContext);
// 子类初始化,包括监听注册、扩展注册等。
init(appContext);
return false;
}
@Nullable
@Override
public Cursor query(@NonNull Uri uri, @Nullable String[] projection, @Nullable String selection, @Nullable String[] selectionArgs, @Nullable String sortOrder) {
return null;
}
@Nullable
@Override
public String getType(@NonNull Uri uri) {
return null;
}
@Nullable
@Override
public Uri insert(@NonNull Uri uri, @Nullable ContentValues values) {
return null;
}
@Override
public int delete(@NonNull Uri uri, @Nullable String selection, @Nullable String[] selectionArgs) {
return 0;
}
@Override
public int update(@NonNull Uri uri, @Nullable ContentValues values, @Nullable String selection, @Nullable String[] selectionArgs) {
return 0;
}
}
......@@ -228,13 +228,6 @@ public class TUIThemeManager {
}
Resources.Theme theme = context.getTheme();
if (theme == null) {
if (currentTheme == THEME_LIVELY) {
context.setTheme(R.style.TUIBaseLivelyTheme);
} else if (currentTheme == THEME_SERIOUS) {
context.setTheme(R.style.TUIBaseSeriousTheme);
} else {
context.setTheme(R.style.TUIBaseLightTheme);
}
theme = context.getTheme();
}
mergeTheme(theme);
......
......@@ -325,13 +325,17 @@ public class TRTCCalling {
final UserModel userModel = UserModelManager.getInstance().getUserModel();
Intent intent = new Intent(mContext, YDLInvitionActivity.class);
intent.putExtra(Constant.ROOM_ID, groupID);
intent.putExtra(Constant.USER_ID, userModel.userId);
intent.putExtra(Constant.INVITE_ID, inviter);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
mContext.startActivity(intent);
for (String s : inviteeList) {
if (s.equals(userModel.userId)){
Intent intent = new Intent(mContext, YDLInvitionActivity.class);
intent.putExtra(Constant.ROOM_ID, groupID);
intent.putExtra(Constant.USER_ID, userModel.userId);
intent.putExtra(Constant.INVITE_ID, inviter);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
mContext.startActivity(intent);
}
}
// handleRecvCallModel(inviteID, inviter, groupID, inviteeList, data);
}
......@@ -1170,11 +1174,11 @@ public class TRTCCalling {
}
final UserModel userModel = UserModelManager.getInstance().getUserModel();
Intent intent = new Intent(mContext, YDLInvitionActivity.class);
intent.putExtra(Constant.ROOM_ID, groupId);
intent.putExtra(Constant.USER_ID, userModel.userId);
intent.putExtra(Constant.INVITE_ID, userIdList.get(0));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// Intent intent = new Intent(mContext, YDLInvitionActivity.class);
// intent.putExtra(Constant.ROOM_ID, groupId);
// intent.putExtra(Constant.USER_ID, userModel.userId);
// intent.putExtra(Constant.INVITE_ID, userIdList.get(0));
// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// internalCall(userIdList, type, groupId);
}
......
......@@ -98,7 +98,9 @@ public class TRTCGroupAudioLayoutManager extends RelativeLayout {
* 根据 userId 找到已经分配的 View
*/
public TRTCGroupAudioLayout findAudioCallLayout(String userId) {
if (userId == null) return null;
if (userId == null) {
return null;
}
for (TRTCLayoutEntity layoutEntity : mLayoutEntityList) {
if (layoutEntity.userId.equals(userId)) {
return layoutEntity.layout;
......@@ -115,7 +117,9 @@ public class TRTCGroupAudioLayoutManager extends RelativeLayout {
*/
public TRTCGroupAudioLayout allocAudioCallLayout(String userId) {
Log.d(TAG, "allocAudioCallLayout:" + userId);
if (userId == null) return null;
if (userId == null) {
return null;
}
if (mCount > MAX_USER) {
return null;
}
......@@ -141,7 +145,9 @@ public class TRTCGroupAudioLayoutManager extends RelativeLayout {
* @param userId
*/
public void recyclerAudioCallLayout(String userId) {
if (userId == null) return;
if (userId == null) {
return;
}
Iterator iterator = mLayoutEntityList.iterator();
while (iterator.hasNext()) {
TRTCLayoutEntity item = (TRTCLayoutEntity) iterator.next();
......@@ -167,7 +173,9 @@ public class TRTCGroupAudioLayoutManager extends RelativeLayout {
* @param audioVolume
*/
public void updateAudioVolume(String userId, int audioVolume) {
if (userId == null) return;
if (userId == null) {
return;
}
for (TRTCLayoutEntity entity : mLayoutEntityList) {
if (entity.layout.getVisibility() == VISIBLE) {
if (userId.equals(entity.userId)) {
......@@ -179,14 +187,18 @@ public class TRTCGroupAudioLayoutManager extends RelativeLayout {
private TRTCLayoutEntity findEntity(TRTCGroupAudioLayout layout) {
for (TRTCLayoutEntity entity : mLayoutEntityList) {
if (entity.layout == layout) return entity;
if (entity.layout == layout) {
return entity;
}
}
return null;
}
private TRTCLayoutEntity findEntity(String userId) {
for (TRTCLayoutEntity entity : mLayoutEntityList) {
if (entity.userId.equals(userId)) return entity;
if (entity.userId.equals(userId)) {
return entity;
}
}
return null;
}
......
......@@ -63,7 +63,6 @@ public class VideoCallingActivity extends TRTCBaseActivity implements View.OnCli
private int mUserCount = 0;
private String mRoomId;
private String mUserId;
private String mInviteId;
private boolean mAudioRouteFlag = true;
......@@ -97,9 +96,7 @@ public class VideoCallingActivity extends TRTCBaseActivity implements View.OnCli
if (intent.getStringExtra(Constant.ROOM_ID) != null) {
mRoomId = intent.getStringExtra(Constant.ROOM_ID);
}
if (intent.getStringExtra(Constant.INVITE_ID) != null) {
mInviteId = intent.getStringExtra(Constant.INVITE_ID);
}
}
}
......@@ -295,12 +292,22 @@ public class VideoCallingActivity extends TRTCBaseActivity implements View.OnCli
}
/**
* 离开房间
* */
@Override
public void onExitRoom(int reason) {
super.onExitRoom(reason);
finish();
}
/**
* 网络质量的实时统计回调
* @param localQuality
* @param remoteQuality
*/
@Override
public void onNetworkQuality(TRTCCloudDef.TRTCQuality localQuality, ArrayList<TRTCCloudDef.TRTCQuality> remoteQuality) {
Log.e(TAG,"网络质量的实时统计回调 userId:"+localQuality.userId+"uid:"+localQuality.quality+remoteQuality.get(0).userId+"quality:"+localQuality.quality+remoteQuality.get(0).quality);
// if (remoteQuality.size()>0){
// refreshNetWorkStatus(remoteQuality);
// }
......
......@@ -113,7 +113,6 @@ public class YDLInvitionActivity extends TRTCBaseActivity {
Intent intent = new Intent(YDLInvitionActivity.this, VideoCallingActivity.class);
intent.putExtra(Constant.ROOM_ID, mRoomId);
intent.putExtra(Constant.USER_ID, mUserId);
intent.putExtra(Constant.INVITE_ID, mInviteId);
startActivity(intent);
finish();
}
......@@ -133,7 +132,9 @@ public class YDLInvitionActivity extends TRTCBaseActivity {
return;
}
ImageLoader.loadImage(this, mIvAvatar, model.userAvatar, R.drawable.ic_avatar);
mTvName.setText(model.userName);
if (model.userName!=null) {
mTvName.setText(model.userName);
}
}
@Override
......
package com.tencent.qcloud.tuicore.component;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.Nullable;
import com.tencent.qcloud.tuicore.R;
import com.tencent.qcloud.tuicore.component.interfaces.INoticeLayout;
public class NoticeLayout extends RelativeLayout implements INoticeLayout {
private TextView mContentText;
private TextView mContentExtraText;
private boolean mAwaysShow;
public NoticeLayout(Context context) {
super(context);
init();
}
public NoticeLayout(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
init();
}
public NoticeLayout(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init();
}
private void init() {
inflate(getContext(), R.layout.notice_layout, this);
mContentText = findViewById(R.id.notice_content);
mContentExtraText = findViewById(R.id.notice_content_extra);
}
@Override
public TextView getContent() {
return mContentText;
}
@Override
public TextView getContentExtra() {
return mContentExtraText;
}
@Override
public void setOnNoticeClickListener(OnClickListener l) {
setOnClickListener(l);
}
@Override
public void setVisibility(int visibility) {
if (mAwaysShow) {
super.setVisibility(VISIBLE);
} else {
super.setVisibility(visibility);
}
}
@Override
public void alwaysShow(boolean show) {
mAwaysShow = show;
if (mAwaysShow) {
super.setVisibility(VISIBLE);
}
}
}
package com.tencent.qcloud.tuicore.component;
import android.content.Context;
import android.util.AttributeSet;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.Nullable;
import com.tencent.qcloud.tuicore.R;
import com.tencent.qcloud.tuicore.TUIThemeManager;
import com.tencent.qcloud.tuicore.component.interfaces.ITitleBarLayout;
import com.tencent.qcloud.tuicore.util.ScreenUtil;
public class TitleBarLayout extends LinearLayout implements ITitleBarLayout {
private LinearLayout mLeftGroup;
private LinearLayout mRightGroup;
private TextView mLeftTitle;
private TextView mCenterTitle;
private TextView mRightTitle;
private ImageView mLeftIcon;
private ImageView mRightIcon;
private RelativeLayout mTitleLayout;
private UnreadCountTextView unreadCountTextView;
public TitleBarLayout(Context context) {
super(context);
init();
}
public TitleBarLayout(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
init();
}
public TitleBarLayout(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init();
}
private void init() {
inflate(getContext(), R.layout.title_bar_layout, this);
mTitleLayout = findViewById(R.id.page_title_layout);
mLeftGroup = findViewById(R.id.page_title_left_group);
mRightGroup = findViewById(R.id.page_title_right_group);
mLeftTitle = findViewById(R.id.page_title_left_text);
mRightTitle = findViewById(R.id.page_title_right_text);
mCenterTitle = findViewById(R.id.page_title);
mLeftIcon = findViewById(R.id.page_title_left_icon);
mRightIcon = findViewById(R.id.page_title_right_icon);
unreadCountTextView = findViewById(R.id.new_message_total_unread);
LayoutParams params = (LayoutParams) mTitleLayout.getLayoutParams();
params.height = ScreenUtil.getPxByDp(50);
mTitleLayout.setLayoutParams(params);
setBackgroundResource(TUIThemeManager.getAttrResId(getContext(), R.attr.core_title_bar_bg));
int iconSize = ScreenUtil.dip2px(20);
ViewGroup.LayoutParams iconParams = mLeftIcon.getLayoutParams();
iconParams.width = iconSize;
iconParams.height = iconSize;
mLeftIcon.setLayoutParams(iconParams);
iconParams = mRightIcon.getLayoutParams();
iconParams.width = iconSize;
iconParams.height = iconSize;
mRightIcon.setLayoutParams(iconParams);
}
@Override
public void setOnLeftClickListener(OnClickListener listener) {
mLeftGroup.setOnClickListener(listener);
}
@Override
public void setOnRightClickListener(OnClickListener listener) {
mRightGroup.setOnClickListener(listener);
}
@Override
public void setTitle(String title, Position position) {
switch (position) {
case LEFT:
mLeftTitle.setText(title);
break;
case RIGHT:
mRightTitle.setText(title);
break;
case MIDDLE:
mCenterTitle.setText(title);
break;
}
}
@Override
public LinearLayout getLeftGroup() {
return mLeftGroup;
}
@Override
public LinearLayout getRightGroup() {
return mRightGroup;
}
@Override
public ImageView getLeftIcon() {
return mLeftIcon;
}
@Override
public void setLeftIcon(int resId) {
mLeftIcon.setBackgroundResource(resId);
}
@Override
public ImageView getRightIcon() {
return mRightIcon;
}
@Override
public void setRightIcon(int resId) {
mRightIcon.setBackgroundResource(resId);
}
@Override
public TextView getLeftTitle() {
return mLeftTitle;
}
@Override
public TextView getMiddleTitle() {
return mCenterTitle;
}
@Override
public TextView getRightTitle() {
return mRightTitle;
}
public UnreadCountTextView getUnreadCountTextView() {
return unreadCountTextView;
}
}
package com.tencent.qcloud.tuicore.component.activities;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.tencent.qcloud.tuicore.R;
import com.tencent.qcloud.tuicore.TUIThemeManager;
import com.tencent.qcloud.tuicore.interfaces.ITUIThemeChangeable;
public class BaseLightActivity extends AppCompatActivity implements ITUIThemeChangeable {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
getWindow().setStatusBarColor(getResources().getColor(TUIThemeManager.getAttrResId(this, R.attr.core_header_start_color)));
getWindow().setNavigationBarColor(getResources().getColor(R.color.navigation_bar_color));
int vis = getWindow().getDecorView().getSystemUiVisibility();
vis |= View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
vis |= View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
getWindow().getDecorView().setSystemUiVisibility(vis);
}
}
}
package com.tencent.qcloud.tuicore.component.activities;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.InputFilter;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.RecyclerView;
import com.tencent.qcloud.tuicore.R;
import com.tencent.qcloud.tuicore.component.CustomLinearLayoutManager;
import com.tencent.qcloud.tuicore.component.TitleBarLayout;
import com.tencent.qcloud.tuicore.component.interfaces.ITitleBarLayout;
import com.tencent.qcloud.tuicore.interfaces.ITUIThemeChangeable;
import java.util.ArrayList;
public class SelectionActivity extends BaseLightActivity {
private static OnResultReturnListener sOnResultReturnListener;
private RecyclerView selectListView;
private SelectAdapter selectListAdapter;
private EditText input;
private int mSelectionType;
private ArrayList<String> selectList = new ArrayList<>();
private int selectedItem = -1;
private OnItemClickListener onItemClickListener;
private boolean needConfirm = true;
private boolean returnNow = true;
public static void startTextSelection(Context context, Bundle bundle, OnResultReturnListener listener) {
bundle.putInt(Selection.TYPE, Selection.TYPE_TEXT);
startSelection(context, bundle, listener);
}
public static void startListSelection(Context context, Bundle bundle, OnResultReturnListener listener) {
bundle.putInt(Selection.TYPE, Selection.TYPE_LIST);
startSelection(context, bundle, listener);
}
private static void startSelection(Context context, Bundle bundle, OnResultReturnListener listener) {
Intent intent = new Intent(context, SelectionActivity.class);
intent.putExtra(Selection.CONTENT, bundle);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
sOnResultReturnListener = listener;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.tuicore_selection_activity);
final TitleBarLayout titleBar = findViewById(R.id.edit_title_bar);
selectListView = findViewById(R.id.select_list);
selectListAdapter = new SelectAdapter();
selectListView.setAdapter(selectListAdapter);
selectListView.setLayoutManager(new CustomLinearLayoutManager(this));
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(this, DividerItemDecoration.VERTICAL);
dividerItemDecoration.setDrawable(getResources().getDrawable(R.drawable.core_list_divider));
selectListView.addItemDecoration(dividerItemDecoration);
onItemClickListener = new OnItemClickListener() {
@Override
public void onClick(int position) {
selectedItem = position;
selectListAdapter.setSelectedItem(position);
selectListAdapter.notifyDataSetChanged();
if (!needConfirm) {
echoClick();
}
}
};
input = findViewById(R.id.edit_content_et);
Bundle bundle = getIntent().getBundleExtra(Selection.CONTENT);
switch (bundle.getInt(Selection.TYPE)) {
case Selection.TYPE_TEXT:
selectListView.setVisibility(View.GONE);
String defaultString = bundle.getString(Selection.INIT_CONTENT);
int limit = bundle.getInt(Selection.LIMIT);
if (!TextUtils.isEmpty(defaultString)) {
input.setText(defaultString);
input.setSelection(defaultString.length());
}
if (limit > 0) {
input.setFilters(new InputFilter[]{new InputFilter.LengthFilter(limit)});
}
break;
case Selection.TYPE_LIST:
input.setVisibility(View.GONE);
ArrayList<String> list = bundle.getStringArrayList(Selection.LIST);
selectedItem = bundle.getInt(Selection.DEFAULT_SELECT_ITEM_INDEX);
if (list == null || list.size() == 0) {
return;
}
selectList.clear();
selectList.addAll(list);
selectListAdapter.setSelectedItem(selectedItem);
selectListAdapter.setData(selectList);
selectListAdapter.notifyDataSetChanged();
break;
default:
finish();
return;
}
mSelectionType = bundle.getInt(Selection.TYPE);
final String title = bundle.getString(Selection.TITLE);
needConfirm = bundle.getBoolean(Selection.NEED_CONFIRM, true);
returnNow = bundle.getBoolean(Selection.RETURN_NOW, true);
titleBar.setTitle(title, ITitleBarLayout.Position.MIDDLE);
titleBar.setOnLeftClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
titleBar.getRightIcon().setVisibility(View.GONE);
if (needConfirm) {
titleBar.getRightTitle().setText(getResources().getString(R.string.sure));
titleBar.setOnRightClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
echoClick();
}
});
} else {
titleBar.getRightGroup().setVisibility(View.GONE);
}
}
private void echoClick() {
switch (mSelectionType) {
case Selection.TYPE_TEXT:
if (sOnResultReturnListener != null) {
sOnResultReturnListener.onReturn(input.getText().toString());
}
break;
case Selection.TYPE_LIST:
if (sOnResultReturnListener != null) {
sOnResultReturnListener.onReturn(selectedItem);
}
break;
}
if (returnNow) {
finish();
}
}
@Override
protected void onStop() {
super.onStop();
sOnResultReturnListener = null;
}
class SelectAdapter extends RecyclerView.Adapter<SelectAdapter.SelectViewHolder> {
int selectedItem = -1;
ArrayList<String> data = new ArrayList<>();
public void setData(ArrayList<String> data) {
this.data.clear();
this.data.addAll(data);
}
public void setSelectedItem(int selectedItem) {
this.selectedItem = selectedItem;
}
@NonNull
@Override
public SelectViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(SelectionActivity.this).inflate(R.layout.core_select_item_layout,parent, false);
return new SelectViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull SelectViewHolder holder, int position) {
String nameStr = data.get(position);
holder.name.setText(nameStr);
if (selectedItem == position) {
holder.selectedIcon.setVisibility(View.VISIBLE);
} else {
holder.selectedIcon.setVisibility(View.GONE);
}
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onItemClickListener.onClick(position);
}
});
}
@Override
public int getItemCount() {
return data.size();
}
class SelectViewHolder extends RecyclerView.ViewHolder{
TextView name;
ImageView selectedIcon;
public SelectViewHolder(@NonNull View itemView) {
super(itemView);
name = itemView.findViewById(R.id.name);
selectedIcon = itemView.findViewById(R.id.selected_icon);
}
}
}
public interface OnResultReturnListener {
void onReturn(Object res);
}
public interface OnItemClickListener {
void onClick(int position);
}
public static class Selection {
public static final String SELECT_ALL = "select_all";
public static final String CONTENT = "content";
public static final String TYPE = "type";
public static final String TITLE = "title";
public static final String INIT_CONTENT = "init_content";
public static final String DEFAULT_SELECT_ITEM_INDEX = "default_select_item_index";
public static final String LIST = "list";
public static final String LIMIT = "limit";
public static final String NEED_CONFIRM = "needConfirm";
public static final String RETURN_NOW = "returnNow";
public static final int TYPE_TEXT = 1;
public static final int TYPE_LIST = 2;
}
}
package com.tencent.qcloud.tuicore.component.gatherimage;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.widget.RelativeLayout;
import com.tencent.qcloud.tuicore.R;
import java.util.List;
public class UserIconView extends RelativeLayout {
private SynthesizedImageView mIconView;
private int mDefaultImageResId;
private int mIconRadius;
public UserIconView(Context context) {
super(context);
init(null);
}
public UserIconView(Context context, AttributeSet attrs) {
super(context, attrs);
init(attrs);
}
public UserIconView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init(attrs);
}
private void init(AttributeSet attributeSet) {
inflate(getContext(), R.layout.profile_icon_view, this);
if (attributeSet != null) {
TypedArray ta = getContext().obtainStyledAttributes(attributeSet, R.styleable.UserIconView);
if (null != ta) {
mDefaultImageResId = ta.getResourceId(R.styleable.UserIconView_default_image, mDefaultImageResId);
mIconRadius = ta.getDimensionPixelSize(R.styleable.UserIconView_image_radius, mIconRadius);
ta.recycle();
}
}
mIconView = findViewById(R.id.profile_icon);
if (mDefaultImageResId > 0) {
mIconView.defaultImage(mDefaultImageResId);
}
if (mIconRadius > 0) {
mIconView.setRadius(mIconRadius);
}
}
public void setDefaultImageResId(int resId) {
mDefaultImageResId = resId;
mIconView.defaultImage(resId);
}
public void setRadius(int radius) {
mIconRadius = radius;
mIconView.setRadius(mIconRadius);
}
public void setIconUrls(List<Object> iconUrls) {
mIconView.displayImage(iconUrls).load(null);
}
}
package com.tencent.qcloud.tuicore.component.interfaces;
import com.tencent.qcloud.tuicore.component.TitleBarLayout;
public interface ILayout {
/**
* 获取标题栏
*
* @return
*/
TitleBarLayout getTitleBar();
/**
* 设置该 Layout 的父容器
*
* @param parent
*/
void setParentLayout(Object parent);
}
package com.tencent.qcloud.tuicore.component.interfaces;
import android.view.View;
import android.widget.TextView;
/**
* 通知区域 {@link NoticeLayout} 位置固定,只能显示或隐藏,位置不会随聊天内容的滚动而变化,可以用来展示<br>
* 待处理的群消息,或者一些广播等。该区域分为两部分,可以用来展示内容主题以及辅助主题。可以设置点击事件来<br>
* 响应用户操作。
*/
public interface INoticeLayout {
/**
* 获取通知的主题信息 View
*
* @return
*/
TextView getContent();
/**
* 获取通知的进一步操作 View
*
* @return
*/
TextView getContentExtra();
/**
* 设置通知的点击事件
*
* @param l
*/
void setOnNoticeClickListener(View.OnClickListener l);
/**
* 设置通知区域是否一直显示
*
* @param show 一直显示为 true
*/
void alwaysShow(boolean show);
}
package com.tencent.qcloud.tuicore.component.interfaces;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
/**
* 会话列表窗口 {@link ConversationLayout}、聊天窗口 {@link ChatLayout} 等都自带标题栏,<br>
* 标题栏设计为左中右三部分标题,左边可为图片+文字,中间为文字,右边也可为图片+文字,这些区域返回的都是标准的<br>
* Android View,可以根据业务需要对这些 View 进行交互响应处理。
*/
public interface ITitleBarLayout {
/**
* 设置左边标题的点击事件
*
* @param listener
*/
void setOnLeftClickListener(View.OnClickListener listener);
/**
* 设置右边标题的点击事件
*
* @param listener
*/
void setOnRightClickListener(View.OnClickListener listener);
/**
* 设置标题
*
* @param title 标题内容
* @param position 标题位置
*/
void setTitle(String title, Position position);
/**
* 返回左边标题区域
*
* @return
*/
LinearLayout getLeftGroup();
/**
* 返回右边标题区域
*
* @return
*/
LinearLayout getRightGroup();
/**
* 返回左边标题的图片
*
* @return
*/
ImageView getLeftIcon();
/**
* 设置左边标题的图片
*
* @param resId
*/
void setLeftIcon(int resId);
/**
* 返回右边标题的图片
*
* @return
*/
ImageView getRightIcon();
/**
* 设置右边标题的图片
*
* @param resId
*/
void setRightIcon(int resId);
/**
* 返回左边标题的文字
*
* @return
*/
TextView getLeftTitle();
/**
* 返回中间标题的文字
*
* @return
*/
TextView getMiddleTitle();
/**
* 返回右边标题的文字
*
* @return
*/
TextView getRightTitle();
/**
* 标题区域的枚举值
*/
enum Position {
/**
* 左边标题
*/
LEFT,
/**
* 中间标题
*/
MIDDLE,
/**
* 右边标题
*/
RIGHT
}
}
package com.tencent.qcloud.tuicore.component.interfaces;
/**
* UIKit回调的通用接口类
*/
public abstract class IUIKitCallback<T> {
public abstract void onSuccess(T data);
public abstract void onError(String module, int errCode, String errMsg);
public void onProgress(Object data) {}
}
package com.tencent.qcloud.tuicore.component.menu;
import android.app.Activity;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PixelFormat;
import android.graphics.RectF;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.PopupWindow;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.tencent.qcloud.tuicore.R;
import com.tencent.qcloud.tuicore.component.action.PopMenuAction;
import com.tencent.qcloud.tuicore.component.action.PopMenuAdapter;
import com.tencent.qcloud.tuicore.util.ScreenUtil;
import java.util.ArrayList;
import java.util.List;
public class Menu {
// 阴影宽度
private static final int SHADOW_WIDTH = 10;
private static final int Y_OFFSET = 4;
// 更多menu
private ListView mMenuList;
private PopMenuAdapter mMenuAdapter;
private PopupWindow mMenuWindow;
private List<PopMenuAction> mActions = new ArrayList<>();
private Activity mActivity;
private View mAttachView;
public Menu(Activity activity, View attach) {
mActivity = activity;
mAttachView = attach;
}
public void setMenuAction(List<PopMenuAction> menuActions) {
mActions.clear();
mActions.addAll(menuActions);
}
public boolean isShowing() {
if (mMenuWindow == null) {
return false;
}
return mMenuWindow.isShowing();
}
public void hide() {
mMenuWindow.dismiss();
}
public void show() {
if (mActions == null || mActions.size() == 0) {
return;
}
mMenuWindow = new PopupWindow(mActivity);
mMenuWindow.setWidth(ViewGroup.LayoutParams.WRAP_CONTENT);
mMenuWindow.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
mMenuWindow.setBackgroundDrawable(new ColorDrawable());
mMenuAdapter = new PopMenuAdapter();
mMenuAdapter.setDataSource(mActions);
View menuView = LayoutInflater.from(mActivity).inflate(R.layout.core_pop_menu, null);
// 设置布局文件
mMenuWindow.setContentView(menuView);
mMenuList = menuView.findViewById(R.id.menu_pop_list);
mMenuList.setAdapter(mMenuAdapter);
mMenuList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
PopMenuAction action = (PopMenuAction) mMenuAdapter.getItem(position);
if (action != null && action.getActionClickListener() != null) {
action.getActionClickListener().onActionClick(position, mActions.get(position));
}
}
});
int paddingLeftRight = ScreenUtil.dip2px(15.0f);
int paddingTopBottom = ScreenUtil.dip2px(12.0f);
int itemWidth = mActivity.getResources().getDimensionPixelSize(R.dimen.core_pop_menu_item_width);
int itemHeight = mActivity.getResources().getDimensionPixelSize(R.dimen.core_pop_menu_item_height);
float anchorWidth = mAttachView.getWidth();
float anchorHeight = mAttachView.getHeight();
mMenuWindow.getContentView().measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
int[] location = new int[2];
mAttachView.getLocationOnScreen(location);
int rowCount = mActions.size();
int indicatorHeight = mActivity.getResources().getDimensionPixelOffset(R.dimen.core_pop_menu_indicator_height);
int popWidth = itemWidth + paddingLeftRight * 2 - SHADOW_WIDTH;
int popHeight = itemHeight * rowCount + paddingTopBottom * 2 - SHADOW_WIDTH;
float indicatorX = anchorWidth / 2;
int screenWidth = ScreenUtil.getScreenWidth(mActivity);
int x = location[0];
int y;
float xOffset = anchorWidth / 2;
// 如果是在右边,小箭头 x 坐标和 弹窗 x 位置都要变化
if (location[0] * 2 + anchorWidth > screenWidth) {
indicatorX = popWidth - anchorWidth / 2 - xOffset;
x = (int) (location[0] + anchorWidth - popWidth + xOffset);
}
y = (int) (location[1] + anchorHeight) + Y_OFFSET;
popHeight = popHeight - indicatorHeight;
Drawable backgroundDrawable = getBackgroundDrawable(popWidth, popHeight, indicatorX, indicatorHeight, 16);
menuView.setBackground(backgroundDrawable);
// 设置pop获取焦点,如果为false点击返回按钮会退出当前Activity,如果pop中有Editor的话,focusable必须要为true
mMenuWindow.setFocusable(true);
// 设置pop可点击,为false点击事件无效,默认为true
mMenuWindow.setTouchable(true);
// 设置点击pop外侧消失,默认为false;在focusable为true时点击外侧始终消失
mMenuWindow.setOutsideTouchable(true);
// 相对于 + 号正下面,同时可以设置偏移量
mMenuWindow.showAtLocation(mAttachView, Gravity.NO_GRAVITY, x, y);
}
/**
* 绘制带小三角的弹窗背景
*/
public Drawable getBackgroundDrawable(final float widthPixel, final float heightPixel, float indicatorX, float indicatorHeight, float radius) {
int borderWidth = SHADOW_WIDTH;
Path path = new Path();
Drawable drawable = new Drawable() {
@Override
public void draw(@NonNull Canvas canvas) {
Paint paint = new Paint();
paint.setColor(Color.WHITE);
paint.setStyle(Paint.Style.FILL);
paint.setShadowLayer(borderWidth, 0,0,0xFFAAAAAA);
path.addRoundRect(new RectF(borderWidth, indicatorHeight + borderWidth, widthPixel - borderWidth, heightPixel + indicatorHeight - borderWidth), radius, radius, Path.Direction.CW);
path.moveTo(indicatorX - indicatorHeight, indicatorHeight + borderWidth);
path.lineTo(indicatorX, borderWidth);
path.lineTo(indicatorX + indicatorHeight, indicatorHeight + borderWidth);
path.close();
canvas.drawPath(path, paint);
}
@Override
public void setAlpha(int alpha) {
}
@Override
public void setColorFilter(@Nullable ColorFilter colorFilter) {
}
@Override
public int getOpacity() {
return PixelFormat.TRANSLUCENT;
}
};
return drawable;
}
}
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient android:startColor="?attr/core_header_end_color"
android:endColor="?attr/core_header_end_color"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- 颜色规范 start -->
<color name="core_light_bg_title_text_color_light">#FF000000</color>
<color name="core_light_bg_primary_text_color_light">#FF444444</color>
<color name="core_light_bg_secondary_text_color_light">#FF888888</color>
<color name="core_light_bg_secondary2_text_color_light">#FF999999</color>
<color name="core_light_bg_disable_text_color_light">#FFBBBBBB</color>
<color name="core_dark_bg_primary_text_color_light">#FFFFFFFF</color>
<color name="core_primary_bg_color_light">#FFFFFFFF</color>
<color name="core_bg_color_light">#FFF2F3F5</color>
<color name="core_primary_color_light">#FF147AFF</color>
<color name="core_error_tip_color_light">#FFFF584C</color>
<color name="core_success_tip_color_light">#FF26CB3E</color>
<color name="core_bubble_bg_color_light">#FFDCEAFD</color>
<color name="core_divide_color_light">#FFE5E5E5</color>
<color name="core_border_color_light">#FFDDDDDD</color>
<color name="core_header_start_color_light">#FFEBF0F6</color>
<color name="core_header_end_color_light">#FFEBF0F6</color>
<color name="core_btn_normal_color_light">#FF147AFF</color>
<color name="core_btn_pressed_color_light">#FF0064E7</color>
<color name="core_btn_disable_color_light">#4D147AFF</color>
<!-- 颜色规范 end -->
<color name="core_title_bar_text_bg_light">#FF000000</color>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="TUIBaseLightTheme">
<!-- 颜色规范 start -->
<item name="core_light_bg_title_text_color">@color/core_light_bg_title_text_color_light</item>
<item name="core_light_bg_primary_text_color">@color/core_light_bg_primary_text_color_light</item>
<item name="core_light_bg_secondary_text_color">@color/core_light_bg_secondary_text_color_light</item>
<item name="core_light_bg_secondary2_text_color">@color/core_light_bg_secondary2_text_color_light</item>
<item name="core_light_bg_disable_text_color">@color/core_light_bg_disable_text_color_light</item>
<item name="core_dark_bg_primary_text_color">@color/core_dark_bg_primary_text_color_light</item>
<item name="core_primary_bg_color">@color/core_primary_bg_color_light</item>
<item name="core_bg_color">@color/core_bg_color_light</item>
<item name="core_primary_color">@color/core_primary_color_light</item>
<item name="core_error_tip_color">@color/core_error_tip_color_light</item>
<item name="core_success_tip_color">@color/core_success_tip_color_light</item>
<item name="core_bubble_bg_color">@color/core_bubble_bg_color_light</item>
<item name="core_divide_color">@color/core_divide_color_light</item>
<item name="core_border_color">@color/core_border_color_light</item>
<item name="core_header_start_color">@color/core_header_start_color_light</item>
<item name="core_header_end_color">@color/core_header_end_color_light</item>
<item name="core_btn_normal_color">@color/core_btn_normal_color_light</item>
<item name="core_btn_pressed_color">@color/core_btn_pressed_color_light</item>
<item name="core_btn_disable_color">@color/core_btn_disable_color_light</item>
<!-- 颜色规范 end -->
<item name="core_line_controller_view_switch_btn_selected_bg">@color/core_primary_color_light</item>
<item name="core_selected_icon">@drawable/core_selected_icon_light</item>
<item name="core_title_bar_bg">@drawable/core_title_bar_bg_light</item>
<item name="core_title_bar_text_bg">@color/core_title_bar_text_bg_light</item>
<item name="core_title_bar_back_icon">@drawable/core_title_bar_back_light</item>
<item name="core_default_group_icon">@drawable/core_default_group_icon_light</item>
<item name="core_default_user_icon">@drawable/core_default_user_icon_light</item>
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient android:startColor="?attr/core_header_start_color"
android:endColor="?attr/core_header_start_color"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- 颜色规范 start -->
<color name="core_light_bg_title_text_color_lively">#FF000000</color>
<color name="core_light_bg_primary_text_color_lively">#FF444444</color>
<color name="core_light_bg_secondary_text_color_lively">#FF888888</color>
<color name="core_light_bg_secondary2_text_color_lively">#FF999999</color>
<color name="core_light_bg_disable_text_color_lively">#FFBBBBBB</color>
<color name="core_dark_bg_primary_text_color_lively">#FFFFFFFF</color>
<color name="core_primary_bg_color_lively">#FFFFFFFF</color>
<color name="core_bg_color_lively">#FFF2F3F5</color>
<color name="core_primary_color_lively">#FFFF8E82</color>
<color name="core_error_tip_color_lively">#FFFF584C</color>
<color name="core_success_tip_color_lively">#FF26CB3E</color>
<color name="core_bubble_bg_color_lively">#FF9D85</color>
<color name="core_divide_color_lively">#FFE5E5E5</color>
<color name="core_border_color_lively">#FFDDDDDD</color>
<color name="core_header_start_color_lively">#FFFF7B7B</color>
<color name="core_header_end_color_lively">#FFFFA88B</color>
<color name="core_btn_normal_color_lively">#FFFF8E82</color>
<color name="core_btn_pressed_color_lively">#FFF86657</color>
<color name="core_btn_disable_color_lively">#4DFF8E82</color>
<!-- 颜色规范 end -->
<color name="core_title_bar_text_bg_lively">#FFFFFFFF</color>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="TUIBaseLivelyTheme">
<!-- 颜色规范 start -->
<item name="core_light_bg_title_text_color">@color/core_light_bg_title_text_color_lively</item>
<item name="core_light_bg_primary_text_color">@color/core_light_bg_primary_text_color_lively</item>
<item name="core_light_bg_secondary_text_color">@color/core_light_bg_secondary_text_color_lively</item>
<item name="core_light_bg_secondary2_text_color">@color/core_light_bg_secondary2_text_color_lively</item>
<item name="core_light_bg_disable_text_color">@color/core_light_bg_disable_text_color_lively</item>
<item name="core_dark_bg_primary_text_color">@color/core_dark_bg_primary_text_color_lively</item>
<item name="core_primary_bg_color">@color/core_primary_bg_color_lively</item>
<item name="core_bg_color">@color/core_bg_color_lively</item>
<item name="core_primary_color">@color/core_primary_color_lively</item>
<item name="core_error_tip_color">@color/core_error_tip_color_lively</item>
<item name="core_success_tip_color">@color/core_success_tip_color_lively</item>
<item name="core_bubble_bg_color">@color/core_bubble_bg_color_lively</item>
<item name="core_divide_color">@color/core_divide_color_lively</item>
<item name="core_border_color">@color/core_border_color_lively</item>
<item name="core_header_start_color">@color/core_header_start_color_lively</item>
<item name="core_header_end_color">@color/core_header_end_color_lively</item>
<item name="core_btn_normal_color">@color/core_btn_normal_color_lively</item>
<item name="core_btn_pressed_color">@color/core_btn_pressed_color_lively</item>
<item name="core_btn_disable_color">@color/core_btn_disable_color_lively</item>
<!-- 颜色规范 end -->
<item name="core_line_controller_view_switch_btn_selected_bg">@color/core_primary_color_lively</item>
<item name="core_selected_icon">@drawable/core_selected_icon_lively</item>
<item name="core_title_bar_bg">@drawable/core_title_bar_bg_lively</item>
<item name="core_title_bar_text_bg">@color/core_title_bar_text_bg_lively</item>
<item name="core_title_bar_back_icon">@drawable/core_title_bar_back_lively</item>
<item name="core_default_group_icon">@drawable/core_default_group_icon_lively</item>
<item name="core_default_user_icon">@drawable/core_default_user_icon_lively</item>
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient android:startColor="?attr/core_header_start_color"
android:endColor="?attr/core_header_start_color"
android:angle="270"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- 颜色规范 start -->
<color name="core_light_bg_title_text_color_serious">#FF000000</color>
<color name="core_light_bg_primary_text_color_serious">#FF444444</color>
<color name="core_light_bg_secondary_text_color_serious">#FF888888</color>
<color name="core_light_bg_secondary2_text_color_serious">#FF999999</color>
<color name="core_light_bg_disable_text_color_serious">#FFBBBBBB</color>
<color name="core_dark_bg_primary_text_color_serious">#FFFFFFFF</color>
<color name="core_primary_bg_color_serious">#FFFFFFFF</color>
<color name="core_bg_color_serious">#FFF2F3F5</color>
<color name="core_primary_color_serious">#FF0052FF</color>
<color name="core_error_tip_color_serious">#FFFF584C</color>
<color name="core_success_tip_color_serious">#FF26CB3E</color>
<color name="core_bubble_bg_color_serious">#FF4F87FF</color>
<color name="core_divide_color_serious">#FFE5E5E5</color>
<color name="core_border_color_serious">#FFDDDDDD</color>
<color name="core_header_start_color_serious">#FF6395FF</color>
<color name="core_header_end_color_serious">#FF0052FF</color>
<color name="core_btn_normal_color_serious">#FF0052FF</color>
<color name="core_btn_pressed_color_serious">#FF0049E4</color>
<color name="core_btn_disable_color_serious">#4D0052FF</color>
<!-- 颜色规范 end -->
<color name="core_title_bar_text_bg_serious">#FFFFFFFF</color>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="TUIBaseSeriousTheme">
<!-- 颜色规范 start -->
<item name="core_light_bg_title_text_color">@color/core_light_bg_title_text_color_serious</item>
<item name="core_light_bg_primary_text_color">@color/core_light_bg_primary_text_color_serious</item>
<item name="core_light_bg_secondary_text_color">@color/core_light_bg_secondary_text_color_serious</item>
<item name="core_light_bg_secondary2_text_color">@color/core_light_bg_secondary2_text_color_serious</item>
<item name="core_light_bg_disable_text_color">@color/core_light_bg_disable_text_color_serious</item>
<item name="core_dark_bg_primary_text_color">@color/core_dark_bg_primary_text_color_serious</item>
<item name="core_primary_bg_color">@color/core_primary_bg_color_serious</item>
<item name="core_bg_color">@color/core_bg_color_serious</item>
<item name="core_primary_color">@color/core_primary_color_serious</item>
<item name="core_error_tip_color">@color/core_error_tip_color_serious</item>
<item name="core_success_tip_color">@color/core_success_tip_color_serious</item>
<item name="core_bubble_bg_color">@color/core_bubble_bg_color_serious</item>
<item name="core_divide_color">@color/core_divide_color_serious</item>
<item name="core_border_color">@color/core_border_color_serious</item>
<item name="core_header_start_color">@color/core_header_start_color_serious</item>
<item name="core_header_end_color">@color/core_header_end_color_serious</item>
<item name="core_btn_normal_color">@color/core_btn_normal_color_serious</item>
<item name="core_btn_pressed_color">@color/core_btn_pressed_color_serious</item>
<item name="core_btn_disable_color">@color/core_btn_disable_color_serious</item>
<!-- 颜色规范 end -->
<item name="core_line_controller_view_switch_btn_selected_bg">@color/core_primary_color_serious</item>
<item name="core_selected_icon">@drawable/core_selected_icon_serious</item>
<item name="core_title_bar_bg">@drawable/core_title_bar_bg_serious</item>
<item name="core_title_bar_text_bg">@color/core_title_bar_text_bg_serious</item>
<item name="core_title_bar_back_icon">@drawable/core_title_bar_back_serious</item>
<item name="core_default_group_icon">@drawable/core_default_group_icon_serious</item>
<item name="core_default_user_icon">@drawable/core_default_user_icon_serious</item>
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.tencent.qcloud.tuicore.component.TitleBarLayout
android:id="@+id/edit_title_bar"
android:layout_width="match_parent"
android:layout_height="@dimen/core_page_title_height" />
<EditText
android:id="@+id/edit_content_et"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:layout_marginRight="10dp"
android:singleLine="true"
android:textCursorDrawable="@drawable/core_edit_cursor" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/select_list"
android:background="@color/white"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<resources>
<string name="trtccalling_inviting_tag">They also</string>
<string name="trtccalling_call_time_default">"00:01"</string>
<string name="trtccalling_contact_default_name">test 123</string>
<string name="trtccalling_invite_video_call">Invites you to a video call…</string>
<string name="trtccalling_start_call">Call</string>
<string name="trtccalling_search">Search</string>
<string name="trtccalling_toast_search_fail">Search failed:%1$s.</string>
<string name="trtccalling_toast_call_error_msg">Error [%1$d]:%2$s.</string>
<string name="trtccalling_toast_user_reject_call">%1$s declined the call.</string>
<string name="trtccalling_toast_user_not_response">%1$s didn’t answer.</string>
<string name="trtccalling_toast_user_busy">%1$s is busy.</string>
<string name="trtccalling_toast_user_cancel_call">%1$s cancelled the call.</string>
<string name="trtccalling_toast_user_timeout">%1$s timed out.</string>
<string name="trtccalling_toast_enable_mute">Muted</string>
<string name="trtccalling_toast_disable_mute">Unmuted</string>
<string name="trtccalling_toast_use_speaker">Speaker</string>
<string name="trtccalling_toast_use_handset">Earpiece</string>
<string name="trtccalling_called_time_format">%02d:%02d</string>
<string name="trtccalling_self_phone">Your mobile number:</string>
<string name="trtccalling_toast_user_end">%s end the call.</string>
<string name="trtccalling_title_have_a_call_invitation">You have a call invitation.</string>
<string name="trtccalling_other_party_network_low_quality">The other party\'s network connection is poor</string>
<string name="trtccalling_self_network_low_quality">Your network connection is poor</string>
<string name="trtccalling_toast_switch_camera">Switch Camera</string>
<string name="trtccalling_toast_enable_camera">Camera On</string>
<string name="trtccalling_toast_disable_camera">Camera Off</string>
<string name="trtccalling_waiting_be_accepted">Waiting for the user to accept…</string>
<string name="trtccalling_invite_audio_call">Invited you to an voice call…</string>
<string name="trtccalling_text_microphone">Mic</string>
<string name="trtccalling_text_hangup">Hang Up</string>
<string name="trtccalling_text_reject">Decline</string>
<string name="trtccalling_text_speaker">Speaker</string>
<string name="trtccalling_text_dialing">Answer</string>
<string name="trtccalling_text_camera">Camera</string>
<string name="trtccalling_switch_camera_hint">Turn on your camera first</string>
<string name="trtccalling_switch_audio_call">Switch to Voice Call</string>
<string name="trtccalling_btn_cancel">Cancel</string>
<string name="trtccalling_tips_start_camera_audio">Please turn on the camera and microphone permissions first</string>
<string name="trtccalling_tips_start_audio">Please turn on the microphone permissions first</string>
<string name="trtccalling_video_call">Video Call</string>
<string name="trtccalling_audio_call">Voice Call</string>
<string name="trtccalling_user_kicked_offline">You have been kicked off the line. Please log in again!</string>
<string name="trtccalling_user_sig_expired">Your user signature information has expired</string>
<string name="trtccalling_user_exceed_limit">TUICalling currently supports call with up to 9 people.For
larger conference calls,try using TUIRoom</string>
<string name="trtccalling_wait_resonse">Waiting</string>
<string name="trtccalling_float_permission">please open "Display over other apps" permission</string>
<string name="trtccalling_is_calling">Unable to restart the call</string>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="open_file_tips">选择要打开此文件的应用</string>
<string name="date_year_short"></string>
<string name="date_month_short"></string>
<string name="date_day_short"></string>
<string name="date_hour_short"></string>
<string name="date_minute_short"></string>
<string name="date_second_short"></string>
<string name="date_yesterday">昨天</string>
<string name="sure">确定</string>
<string name="cancel">取消</string>
<string name="group_apply_click_handle">点击处理</string>
</resources>
\ No newline at end of file
<resources>
<string name="trtccalling_inviting_tag">他们也在</string>
<string name="trtccalling_call_time_default">00:01</string>
<string name="trtccalling_contact_default_name">测试123</string>
<string name="trtccalling_invite_video_call">邀请您视频通话</string>
<string name="trtccalling_start_call">呼叫</string>
<string name="trtccalling_search">搜索</string>
<string name="trtccalling_toast_search_fail">搜索失败:%1$s</string>
<string name="trtccalling_toast_call_error_msg">发生错误[%1$d]:%2$s</string>
<string name="trtccalling_toast_user_reject_call">%1$s拒绝通话</string>
<string name="trtccalling_toast_user_not_response">%1$s无响应</string>
<string name="trtccalling_toast_user_busy">%1$s忙线</string>
<string name="trtccalling_toast_user_cancel_call">%1$s取消了通话</string>
<string name="trtccalling_toast_user_timeout">%1$s通话超时</string>
<string name="trtccalling_toast_enable_mute">开启静音</string>
<string name="trtccalling_toast_disable_mute">关闭静音</string>
<string name="trtccalling_toast_use_speaker">使用扬声器</string>
<string name="trtccalling_toast_use_handset">使用听筒</string>
<string name="trtccalling_called_time_format">%02d:%02d</string>
<string name="trtccalling_self_phone">您的手机号:</string>
<string name="trtccalling_toast_user_end">%s 结束通话</string>
<string name="trtccalling_title_have_a_call_invitation">您有一个通话请求</string>
<string name="trtccalling_other_party_network_low_quality">对方网络不佳</string>
<string name="trtccalling_self_network_low_quality">己方网络不佳</string>
<string name="trtccalling_toast_switch_camera">切换摄像头</string>
<string name="trtccalling_toast_enable_camera">开启摄像头</string>
<string name="trtccalling_toast_disable_camera">关闭摄像头</string>
<string name="trtccalling_waiting_be_accepted">正在等待对方接受邀请...</string>
<string name="trtccalling_invite_audio_call">邀请您进行语音通话…</string>
<string name="trtccalling_text_microphone">麦克风</string>
<string name="trtccalling_text_hangup">挂断</string>
<string name="trtccalling_text_reject">拒接</string>
<string name="trtccalling_text_speaker">扬声器</string>
<string name="trtccalling_text_dialing">接听</string>
<string name="trtccalling_text_camera">摄像头</string>
<string name="trtccalling_switch_camera_hint">请先打开摄像头</string>
<string name="trtccalling_switch_audio_call">切到语音通话</string>
<string name="trtccalling_btn_cancel">取消</string>
<string name="trtccalling_tips_start_camera_audio">请先打开摄像头与麦克风权限</string>
<string name="trtccalling_tips_start_audio">请先打开麦克风权限</string>
<string name="trtccalling_video_call">视频通话</string>
<string name="trtccalling_audio_call">语音通话</string>
<string name="trtccalling_user_kicked_offline">您已被踢下线,请重新登录</string>
<string name="trtccalling_user_sig_expired">您的用户签名信息已过期</string>
<string name="trtccalling_user_exceed_limit">暂支持最多9人通话。如需多人会议,请使用TUIRoom</string>
<string name="trtccalling_wait_resonse">等待接听</string>
<string name="trtccalling_float_permission">请打开悬浮窗权限</string>
<string name="trtccalling_is_calling">正在通话中,无法再次发起</string>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="UserIconView">
<!--默认头像-->
<attr name="default_image" format="reference" />
<attr name="image_radius" format="dimension" />
</declare-styleable>
<declare-styleable name="SynthesizedImageView">
<!--合成图片的背景-->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment