本文整理汇总了Java中io.rong.imlib.model.Discussion类的典型用法代码示例。如果您正苦于以下问题:Java Discussion类的具体用法?Java Discussion怎么用?Java Discussion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Discussion类属于io.rong.imlib.model包,在下文中一共展示了Discussion类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setDiscussionActionBar
import io.rong.imlib.model.Discussion; //导入依赖的package包/类
/**
* 设置讨论组界面 ActionBar
*/
private void setDiscussionActionBar(String targetId) {
if (targetId != null) {
RongIM.getInstance().getDiscussion(targetId
, new RongIMClient.ResultCallback<Discussion>() {
@Override
public void onSuccess(Discussion discussion) {
setTitle(discussion.getName());
}
@Override
public void onError(RongIMClient.ErrorCode e) {
if (e.equals(RongIMClient.ErrorCode.NOT_IN_DISCUSSION)) {
setTitle("不在讨论组中");
supportInvalidateOptionsMenu();
}
}
});
} else {
setTitle("讨论组");
}
}
开发者ID:LanguidSheep,项目名称:sealtalk-android-master,代码行数:27,代码来源:ConversationActivity.java
示例2: setDiscussionActionBar
import io.rong.imlib.model.Discussion; //导入依赖的package包/类
/**
* 设置讨论组界面 ActionBar
*/
private void setDiscussionActionBar(String targetId) {
if (targetId != null) {
RongIM.getInstance().getDiscussion(targetId
, new RongIMClient.ResultCallback<Discussion>() {
@Override
public void onSuccess(Discussion discussion) {
setTitle(discussion.getName());
}
@Override
public void onError(RongIMClient.ErrorCode e) {
if (e.equals(RongIMClient.ErrorCode.NOT_IN_DISCUSSION)) {
setTitle("不在讨论组中");
supportInvalidateOptionsMenu();
}
}
});
} else {
setTitle("讨论组");
}
}
开发者ID:sealtalk,项目名称:sealtalk-android,代码行数:27,代码来源:ConversationActivity.java
示例3: setDiscussionName
import io.rong.imlib.model.Discussion; //导入依赖的package包/类
/**
* 讨论组名称修改后刷新本地缓存
*
* @param targetId 讨论组 id
*/
private void setDiscussionName(String targetId) {
if (RongIM.getInstance() != null && RongIM.getInstance().getRongIMClient() != null) {
RongIM.getInstance().getRongIMClient().getDiscussion(targetId, new RongIMClient.ResultCallback<Discussion>() {
@Override
public void onSuccess(Discussion discussion) {
RongIM.getInstance().refreshDiscussionCache(discussion);
Log.i(TAG, "------discussion.getName---" + discussion.getName());
}
@Override
public void onError(RongIMClient.ErrorCode e) {
}
});
}
}
开发者ID:birdcopy,项目名称:Android-Birdcopy-Application,代码行数:24,代码来源:RongCloudEvent.java
示例4: onCreate
import io.rong.imlib.model.Discussion; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_detail_discussion);
setTitle("讨论组详情");
targetId = getIntent().getStringExtra("TargetId");
if (TextUtils.isEmpty(targetId)) {
return;
}
LoadDialog.show(this);
initView();
RongIM.getInstance().getDiscussion(targetId, new RongIMClient.ResultCallback<Discussion>() {
@Override
public void onSuccess(Discussion discussion) {
mDiscussion = discussion;
if (mDiscussion != null) {
initData(mDiscussion);
}
}
@Override
public void onError(RongIMClient.ErrorCode e) {
}
});
}
开发者ID:LanguidSheep,项目名称:sealtalk-android-master,代码行数:28,代码来源:DiscussionDetailActivity.java
示例5: initData
import io.rong.imlib.model.Discussion; //导入依赖的package包/类
private void initData(Discussion mDiscussion) {
memberSize.setText("讨论组成员(" + mDiscussion.getMemberIdList().size() + ")");
createId = mDiscussion.getCreatorId();
ids = mDiscussion.getMemberIdList();
if (ids != null) {
request(FIND_USER_INFO);
}
}
开发者ID:LanguidSheep,项目名称:sealtalk-android-master,代码行数:9,代码来源:DiscussionDetailActivity.java
示例6: jsmethod_getDiscussion
import io.rong.imlib.model.Discussion; //导入依赖的package包/类
@UzJavascriptMethod
public void jsmethod_getDiscussion(final UZModuleContext context) {
String discussionId = context.optString("discussionId", null);
if (TextUtils.isEmpty(discussionId)) {
callModuleError(context, new RongException(ErrorCode.ARGUMENT_EXCEPTION));
return;
}
if (mRongClient == null) {
callModuleError(context, new RongException(ErrorCode.NOT_CONNECTED));
return;
}
mRongClient.getDiscussion(discussionId, new RongIMClient.ResultCallback<Discussion>() {
@Override
public void onSuccess(Discussion discussion) {
TranslatedDiscussion td = null;
if (discussion == null) {
callModuleSuccess(context, "");
} else {
td = new TranslatedDiscussion(discussion);
callModuleSuccess(context, td);
}
}
@Override
public void onError(RongIMClient.ErrorCode errorCode) {
callModuleError(context, new RongException(errorCode.getValue()));
}
});
}
开发者ID:rongcloud,项目名称:apicloud-module-imlib-android,代码行数:33,代码来源:RongIMClientModule.java
示例7: TranslatedDiscussion
import io.rong.imlib.model.Discussion; //导入依赖的package包/类
public TranslatedDiscussion(Discussion discussion) {
this.creatorId = discussion.getCreatorId();
this.id = discussion.getId();
this.name = discussion.getName();
this.memberIdList = discussion.getMemberIdList();
this.inviteStatus = discussion.isOpen() ? "OPENED" : "CLOSED";
}
开发者ID:rongcloud,项目名称:apicloud-module-imlib-android,代码行数:8,代码来源:TranslatedDiscussion.java
示例8: setDiscussionActionBar
import io.rong.imlib.model.Discussion; //导入依赖的package包/类
/**
* 设置讨论组界面 ActionBar
*/
private void setDiscussionActionBar(String targetId, String targetIds) {
if (targetId != null) {
RongIM.getInstance().getRongIMClient().getDiscussion(targetId
, new RongIMClient.ResultCallback<Discussion>() {
@Override
public void onSuccess(Discussion discussion) {
getSupportActionBar().setTitle(discussion.getName());
}
@Override
public void onError(RongIMClient.ErrorCode e) {
if (e.equals(RongIMClient.ErrorCode.NOT_IN_DISCUSSION)) {
getSupportActionBar().setTitle("不在讨论组中");
isDiscussion = true;
supportInvalidateOptionsMenu();
}
}
});
} else if (targetIds != null) {
setDiscussionName(targetIds);
} else {
getSupportActionBar().setTitle("讨论组");
}
}
开发者ID:birdcopy,项目名称:Android-Birdcopy-Application,代码行数:30,代码来源:FlyingConversationActivity.java
示例9: initDate
import io.rong.imlib.model.Discussion; //导入依赖的package包/类
private void initDate() {
Intent intent = getIntent();
if(intent!=null && intent.hasExtra("DEMO_REPLY_CONVERSATIONTYPE")&&intent.hasExtra("DEMO_REPLY_TARGETID")) {
String conversationType = intent.getStringExtra("DEMO_REPLY_CONVERSATIONTYPE");
mTargetId = intent.getStringExtra("DEMO_REPLY_TARGETID");
mConversationType = Conversation.ConversationType.valueOf(conversationType);
if (mConversationType.equals(Conversation.ConversationType.DISCUSSION)) {
RongIM.getInstance().getRongIMClient().getDiscussion(mTargetId, new RongIMClient.ResultCallback<Discussion>() {
@Override
public void onSuccess(Discussion discussion) {
mNumberlist = discussion.getMemberIdList();
String userId = FlyingDataManager.getCurrentRongID();
mNumberlist.remove(userId);
mUserInfoList = FlyingIMContext.getInstance().getUserInfoList(mNumberlist);
mNewTextReplyAdapter = new NewTextReplyAdapter(NewTextMessageActivity.this, mUserInfoList);
mReplyListView.setAdapter(mNewTextReplyAdapter);
}
@Override
public void onError(RongIMClient.ErrorCode e) {
}
});
} else if (mConversationType.equals(Conversation.ConversationType.GROUP)) {
}
}
mReplyListView.setOnItemClickListener(this);
}
开发者ID:birdcopy,项目名称:Android-Birdcopy-Application,代码行数:38,代码来源:NewTextMessageActivity.java
示例10: showViewByConversationType
import io.rong.imlib.model.Discussion; //导入依赖的package包/类
/**
* 通过 会话类型选择要展示的 fragment
*
* @param mConversationType 会话类型
*/
private void showViewByConversationType(Conversation.ConversationType mConversationType) {
if (mConversationType.equals(Conversation.ConversationType.DISCUSSION)) {
mDeleteBtn.setVisibility(View.VISIBLE);
mChatRoomRel.setVisibility(View.VISIBLE);
RongIM.getInstance().getRongIMClient().getDiscussion(targetId, new RongIMClient.ResultCallback<Discussion>() {
@Override
public void onSuccess(Discussion discussion) {
mDiscussionName = discussion.getName();
mChatRoomName.setText(mDiscussionName);
}
@Override
public void onError(RongIMClient.ErrorCode errorCode) {
}
});
} else if (mConversationType.equals(Conversation.ConversationType.PRIVATE)) {
} else if (mConversationType.equals(Conversation.ConversationType.CHATROOM)) {
fragmentTransaction.hide(mAddNumberFragment);
fragmentTransaction.hide(mToTopFragment);
fragmentTransaction.commit();
} else if (mConversationType.equals(Conversation.ConversationType.GROUP)) {
fragmentTransaction.hide(mAddNumberFragment);
fragmentTransaction.commit();
} else if (mConversationType.equals(Conversation.ConversationType.CUSTOMER_SERVICE)) {
fragmentTransaction.hide(mAddNumberFragment);
fragmentTransaction.hide(mToTopFragment);
fragmentTransaction.commit();
}
}
开发者ID:yangyunfeng666,项目名称:demo-app-android-v2-2.3.9,代码行数:39,代码来源:SettingFragment.java
示例11: initDate
import io.rong.imlib.model.Discussion; //导入依赖的package包/类
private void initDate() {
Intent intent = getIntent();
if(intent!=null && intent.hasExtra("DEMO_REPLY_CONVERSATIONTYPE")&&intent.hasExtra("DEMO_REPLY_TARGETID")) {
String conversationType = intent.getStringExtra("DEMO_REPLY_CONVERSATIONTYPE");
mTargetId = intent.getStringExtra("DEMO_REPLY_TARGETID");
mConversationType = Conversation.ConversationType.valueOf(conversationType);
if (mConversationType.equals(Conversation.ConversationType.DISCUSSION)) {
RongIM.getInstance().getRongIMClient().getDiscussion(mTargetId, new RongIMClient.ResultCallback<Discussion>() {
@Override
public void onSuccess(Discussion discussion) {
mNumberlist = discussion.getMemberIdList();
if (DemoContext.getInstance().getSharedPreferences() != null) {
String userId = DemoContext.getInstance().getSharedPreferences().getString(Constants.APP_USER_ID,Constants.DEFAULT);
mNumberlist.remove(userId);
}
mUserInfoList = DemoContext.getInstance().getUserInfoList(mNumberlist);
mNewTextReplyAdapter = new NewTextReplyAdapter(NewTextMessageActivity.this, mUserInfoList);
mReplyListView.setAdapter(mNewTextReplyAdapter);
}
@Override
public void onError(RongIMClient.ErrorCode e) {
}
});
} else if (mConversationType.equals(Conversation.ConversationType.GROUP)) {
}
}
mReplyListView.setOnItemClickListener(this);
}
开发者ID:yangyunfeng666,项目名称:demo-app-android-v2-2.3.9,代码行数:43,代码来源:NewTextMessageActivity.java
注:本文中的io.rong.imlib.model.Discussion类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论