当前位置: 首页>>代码示例>>Java>>正文


Java ConversationListFragment.setUri方法代码示例

本文整理汇总了Java中io.rong.imkit.fragment.ConversationListFragment.setUri方法的典型用法代码示例。如果您正苦于以下问题:Java ConversationListFragment.setUri方法的具体用法?Java ConversationListFragment.setUri怎么用?Java ConversationListFragment.setUri使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在io.rong.imkit.fragment.ConversationListFragment的用法示例。


在下文中一共展示了ConversationListFragment.setUri方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initConversationList

import io.rong.imkit.fragment.ConversationListFragment; //导入方法依赖的package包/类
private Fragment initConversationList() {
    if (mConversationList == null) {
        ConversationListFragment listFragment = ConversationListFragment.getInstance();
        Uri uri = Uri.parse("rong://" + getApplicationInfo().packageName).buildUpon()
                .appendPath("conversationlist")
                .appendQueryParameter(Conversation.ConversationType.PRIVATE.getName(), "false") //设置私聊会话是否聚合显示
                .appendQueryParameter(Conversation.ConversationType.GROUP.getName(), "true")
                .appendQueryParameter(Conversation.ConversationType.DISCUSSION.getName(), "false") //设置私聊会话是否聚合显示
                .appendQueryParameter(Conversation.ConversationType.SYSTEM.getName(), "false") //设置私聊会话是否聚合显示
                .build();
        listFragment.setUri(uri);
        return listFragment;
    } else {
        return mConversationList;
    }
}
 
开发者ID:13120241790,项目名称:RongChat,代码行数:17,代码来源:MainActivity.java

示例2: initView

import io.rong.imkit.fragment.ConversationListFragment; //导入方法依赖的package包/类
private void initView() {
    //顶部菜单
    mBackView = (ImageView) findViewById(R.id.top_back);
    mBackView.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            onBackPressed();
        }
    });

    mTitleView = (TextView) findViewById(R.id.converationList_top_title);
    mTitleView.setText(mTitle);

    ConversationListFragment fragment =  (ConversationListFragment)getSupportFragmentManager().findFragmentById(R.id.conversationShareList);

    fragment.setUri(rongUri);
}
 
开发者ID:birdcopy,项目名称:Android-Birdcopy-Application,代码行数:18,代码来源:ShareWithFriendsActitvity.java

示例3: showChatListNow

import io.rong.imkit.fragment.ConversationListFragment; //导入方法依赖的package包/类
public void showChatListNow()
{
    ConversationListFragment contentFragment = ConversationListFragment.getInstance();
    Uri uri = Uri.parse("rong://" + getApplicationInfo().packageName).buildUpon()
            .appendPath("conversationlist")
            .appendQueryParameter(Conversation.ConversationType.PRIVATE.getName(), "false") //设置私聊会话是否聚合显示
            .appendQueryParameter(Conversation.ConversationType.GROUP.getName(), "true")
            .appendQueryParameter(Conversation.ConversationType.DISCUSSION.getName(), "true")
            .appendQueryParameter(Conversation.ConversationType.SYSTEM.getName(), "true")
            .appendQueryParameter(Conversation.ConversationType.PUBLIC_SERVICE.getName(), "true")
            .appendQueryParameter(Conversation.ConversationType.APP_PUBLIC_SERVICE.getName(), "true")
            .build();
    contentFragment.setUri(uri);

    fg=contentFragment;

    android.support.v4.app.FragmentTransaction transaction =getSupportFragmentManager().beginTransaction();
    transaction.replace(R.id.fragment_container, contentFragment)
            .setTransitionStyle(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
    transaction.addToBackStack(null);
    transaction.commit();
}
 
开发者ID:birdcopy,项目名称:Android-Birdcopy-Application,代码行数:23,代码来源:MainActivity.java

示例4: initConversationList

import io.rong.imkit.fragment.ConversationListFragment; //导入方法依赖的package包/类
/**
 * 获取会话列表的Fragment方法
 * @return
 */
private Fragment initConversationList() {
    if (mConversationListFragment == null) {
        ConversationListFragment listFragment = new ConversationListFragment();
        listFragment.setAdapter(new ConversationListAdapterEx(RongContext.getInstance()));
        Uri uri;
        if (isDebug) {
            uri = Uri.parse("rong://" + getApplicationInfo().packageName).buildUpon()
                    .appendPath("conversationlist")
                    .appendQueryParameter(Conversation.ConversationType.PRIVATE.getName(), "true") //设置私聊会话是否聚合显示
                    .appendQueryParameter(Conversation.ConversationType.GROUP.getName(), "true")//群组
                    .appendQueryParameter(Conversation.ConversationType.PUBLIC_SERVICE.getName(), "false")//公共服务号
                    .appendQueryParameter(Conversation.ConversationType.APP_PUBLIC_SERVICE.getName(), "false")//订阅号
                    .appendQueryParameter(Conversation.ConversationType.SYSTEM.getName(), "true")//系统
                    .appendQueryParameter(Conversation.ConversationType.DISCUSSION.getName(), "true")
                    .build();
            mConversationsTypes = new Conversation.ConversationType[]{Conversation.ConversationType.PRIVATE,
                    Conversation.ConversationType.GROUP,
                    Conversation.ConversationType.PUBLIC_SERVICE,
                    Conversation.ConversationType.APP_PUBLIC_SERVICE,
                    Conversation.ConversationType.SYSTEM,
                    Conversation.ConversationType.DISCUSSION
            };

        } else {
            uri = Uri.parse("rong://" + getApplicationInfo().packageName).buildUpon()
                    .appendPath("conversationlist")
                    .appendQueryParameter(Conversation.ConversationType.PRIVATE.getName(), "false") //设置私聊会话是否聚合显示
                    .appendQueryParameter(Conversation.ConversationType.GROUP.getName(), "false")//群组
                    .appendQueryParameter(Conversation.ConversationType.PUBLIC_SERVICE.getName(), "false")//公共服务号
                    .appendQueryParameter(Conversation.ConversationType.APP_PUBLIC_SERVICE.getName(), "false")//订阅号
                    .appendQueryParameter(Conversation.ConversationType.SYSTEM.getName(), "true")//系统
                    .build();
            mConversationsTypes = new Conversation.ConversationType[]{Conversation.ConversationType.PRIVATE,
                    Conversation.ConversationType.GROUP,
                    Conversation.ConversationType.PUBLIC_SERVICE,
                    Conversation.ConversationType.APP_PUBLIC_SERVICE,
                    Conversation.ConversationType.SYSTEM
            };
        }
        listFragment.setUri(uri);
        mConversationListFragment = listFragment;
        return listFragment;
    } else {
        return mConversationListFragment;
    }
}
 
开发者ID:LanguidSheep,项目名称:sealtalk-android-master,代码行数:51,代码来源:MainActivity.java

示例5: initConversationList

import io.rong.imkit.fragment.ConversationListFragment; //导入方法依赖的package包/类
/**
 * 聊天消息
 * @return
 */
private Fragment initConversationList() {
    if (mConversationListFragment == null) {
        ConversationListFragment listFragment = new ConversationListFragment();
        listFragment.setAdapter(new ConversationListAdapterEx(RongContext.getInstance()));
        Uri uri;
        if (isDebug) {
            //解析
            uri = Uri.parse("rong://" + getApplicationInfo().packageName).buildUpon()
                  .appendPath("conversationlist")
                  .appendQueryParameter(Conversation.ConversationType.PRIVATE.getName(), "true") //设置私聊会话是否聚合显示
                  .appendQueryParameter(Conversation.ConversationType.GROUP.getName(), "true")//群组
                  .appendQueryParameter(Conversation.ConversationType.PUBLIC_SERVICE.getName(), "false")//公共服务号
                  .appendQueryParameter(Conversation.ConversationType.APP_PUBLIC_SERVICE.getName(), "false")//订阅号
                  .appendQueryParameter(Conversation.ConversationType.SYSTEM.getName(), "true")//系统
                  .appendQueryParameter(Conversation.ConversationType.DISCUSSION.getName(), "true")
                  .build();
            //聊天类型
            mConversationsTypes = new Conversation.ConversationType[] {Conversation.ConversationType.PRIVATE,
                    Conversation.ConversationType.GROUP,
                    Conversation.ConversationType.PUBLIC_SERVICE,
                    Conversation.ConversationType.APP_PUBLIC_SERVICE,
                    Conversation.ConversationType.SYSTEM,
                    Conversation.ConversationType.DISCUSSION
                                                                      };

        } else {
            uri = Uri.parse("rong://" + getApplicationInfo().packageName).buildUpon()
                  .appendPath("conversationlist")
                  .appendQueryParameter(Conversation.ConversationType.PRIVATE.getName(), "false") //设置私聊会话是否聚合显示
                  .appendQueryParameter(Conversation.ConversationType.GROUP.getName(), "false")//群组
                  .appendQueryParameter(Conversation.ConversationType.PUBLIC_SERVICE.getName(), "false")//公共服务号
                  .appendQueryParameter(Conversation.ConversationType.APP_PUBLIC_SERVICE.getName(), "false")//订阅号
                  .appendQueryParameter(Conversation.ConversationType.SYSTEM.getName(), "true")//系统
                  .build();
            mConversationsTypes = new Conversation.ConversationType[] {Conversation.ConversationType.PRIVATE,
                    Conversation.ConversationType.GROUP,
                    Conversation.ConversationType.PUBLIC_SERVICE,
                    Conversation.ConversationType.APP_PUBLIC_SERVICE,
                    Conversation.ConversationType.SYSTEM
                                                                      };
        }
        listFragment.setUri(uri);
        mConversationListFragment = listFragment;
        return listFragment;
    } else {
        return mConversationListFragment;
    }
}
 
开发者ID:zqHero,项目名称:rongyunDemo,代码行数:53,代码来源:MainActivity.java

示例6: initConversationList

import io.rong.imkit.fragment.ConversationListFragment; //导入方法依赖的package包/类
private Fragment initConversationList() {
    if (mConversationListFragment == null) {
        ConversationListFragment listFragment = new ConversationListFragment();
        listFragment.setAdapter(new ConversationListAdapterEx(RongContext.getInstance()));
        Uri uri;
        if (isDebug) {
            uri = Uri.parse("rong://" + getApplicationInfo().packageName).buildUpon()
                  .appendPath("conversationlist")
                  .appendQueryParameter(Conversation.ConversationType.PRIVATE.getName(), "true") //设置私聊会话是否聚合显示
                  .appendQueryParameter(Conversation.ConversationType.GROUP.getName(), "true")//群组
                  .appendQueryParameter(Conversation.ConversationType.PUBLIC_SERVICE.getName(), "false")//公共服务号
                  .appendQueryParameter(Conversation.ConversationType.APP_PUBLIC_SERVICE.getName(), "false")//订阅号
                  .appendQueryParameter(Conversation.ConversationType.SYSTEM.getName(), "true")//系统
                  .appendQueryParameter(Conversation.ConversationType.DISCUSSION.getName(), "true")
                  .build();
            mConversationsTypes = new Conversation.ConversationType[] {Conversation.ConversationType.PRIVATE,
                    Conversation.ConversationType.GROUP,
                    Conversation.ConversationType.PUBLIC_SERVICE,
                    Conversation.ConversationType.APP_PUBLIC_SERVICE,
                    Conversation.ConversationType.SYSTEM,
                    Conversation.ConversationType.DISCUSSION
                                                                      };

        } else {
            uri = Uri.parse("rong://" + getApplicationInfo().packageName).buildUpon()
                  .appendPath("conversationlist")
                  .appendQueryParameter(Conversation.ConversationType.PRIVATE.getName(), "false") //设置私聊会话是否聚合显示
                  .appendQueryParameter(Conversation.ConversationType.GROUP.getName(), "false")//群组
                  .appendQueryParameter(Conversation.ConversationType.PUBLIC_SERVICE.getName(), "false")//公共服务号
                  .appendQueryParameter(Conversation.ConversationType.APP_PUBLIC_SERVICE.getName(), "false")//订阅号
                  .appendQueryParameter(Conversation.ConversationType.SYSTEM.getName(), "true")//系统
                  .build();
            mConversationsTypes = new Conversation.ConversationType[] {Conversation.ConversationType.PRIVATE,
                    Conversation.ConversationType.GROUP,
                    Conversation.ConversationType.PUBLIC_SERVICE,
                    Conversation.ConversationType.APP_PUBLIC_SERVICE,
                    Conversation.ConversationType.SYSTEM
                                                                      };
        }
        listFragment.setUri(uri);
        mConversationListFragment = listFragment;
        return listFragment;
    } else {
        return mConversationListFragment;
    }
}
 
开发者ID:13120241790,项目名称:RongCloudJcenter,代码行数:47,代码来源:MainActivity.java

示例7: initConversationList

import io.rong.imkit.fragment.ConversationListFragment; //导入方法依赖的package包/类
private Fragment initConversationList() {
    if (mConversationListFragment == null) {
        ConversationListFragment listFragment = new ConversationListFragment();
        listFragment.setAdapter(new ConversationListAdapterEx(RongContext.getInstance()));
        Uri uri;
        if (isDebug) {
            uri = Uri.parse("rong://" + getApplicationInfo().packageName).buildUpon()
                    .appendPath("conversationlist")
                    .appendQueryParameter(Conversation.ConversationType.PRIVATE.getName(), "true") //设置私聊会话是否聚合显示
                    .appendQueryParameter(Conversation.ConversationType.GROUP.getName(), "true")//群组
                    .appendQueryParameter(Conversation.ConversationType.PUBLIC_SERVICE.getName(), "false")//公共服务号
                    .appendQueryParameter(Conversation.ConversationType.APP_PUBLIC_SERVICE.getName(), "false")//订阅号
                    .appendQueryParameter(Conversation.ConversationType.SYSTEM.getName(), "true")//系统
                    .appendQueryParameter(Conversation.ConversationType.DISCUSSION.getName(), "true")
                    .build();
            mConversationsTypes = new Conversation.ConversationType[]{Conversation.ConversationType.PRIVATE,
                    Conversation.ConversationType.GROUP,
                    Conversation.ConversationType.PUBLIC_SERVICE,
                    Conversation.ConversationType.APP_PUBLIC_SERVICE,
                    Conversation.ConversationType.SYSTEM,
                    Conversation.ConversationType.DISCUSSION
            };

        } else {
            uri = Uri.parse("rong://" + getApplicationInfo().packageName).buildUpon()
                    .appendPath("conversationlist")
                    .appendQueryParameter(Conversation.ConversationType.PRIVATE.getName(), "false") //设置私聊会话是否聚合显示
                    .appendQueryParameter(Conversation.ConversationType.GROUP.getName(), "false")//群组
                    .appendQueryParameter(Conversation.ConversationType.PUBLIC_SERVICE.getName(), "false")//公共服务号
                    .appendQueryParameter(Conversation.ConversationType.APP_PUBLIC_SERVICE.getName(), "false")//订阅号
                    .appendQueryParameter(Conversation.ConversationType.SYSTEM.getName(), "true")//系统
                    .build();
            mConversationsTypes = new Conversation.ConversationType[]{Conversation.ConversationType.PRIVATE,
                    Conversation.ConversationType.GROUP,
                    Conversation.ConversationType.PUBLIC_SERVICE,
                    Conversation.ConversationType.APP_PUBLIC_SERVICE,
                    Conversation.ConversationType.SYSTEM
            };
        }
        listFragment.setUri(uri);
        mConversationListFragment = listFragment;
        return listFragment;
    } else {
        return mConversationListFragment;
    }
}
 
开发者ID:sealtalk,项目名称:sealtalk-android,代码行数:47,代码来源:MainActivity.java

示例8: getItem

import io.rong.imkit.fragment.ConversationListFragment; //导入方法依赖的package包/类
@Override
public Fragment getItem(int i) {
    Fragment fragment = null;
    switch (i) {
        case 0:
            mMainConversationTv.setTextColor(getResources().getColor(R.color.de_title_bg));
            //TODO
            if (mConversationFragment == null) {
                ConversationListFragment listFragment = ConversationListFragment.getInstance();
                listFragment.setAdapter(new ConversationListAdapterEx(RongContext.getInstance()));
                Uri uri = Uri.parse("rong://" + getApplicationInfo().packageName).buildUpon()
                        .appendPath("conversationlist")
                        .appendQueryParameter(Conversation.ConversationType.PRIVATE.getName(), "true") //设置私聊会话是否聚合显示
                        .appendQueryParameter(Conversation.ConversationType.GROUP.getName(), "true")//群组
                        .appendQueryParameter(Conversation.ConversationType.DISCUSSION.getName(), "true")//讨论组
                        .appendQueryParameter(Conversation.ConversationType.PUBLIC_SERVICE.getName(), "true")//公共服务号
                        .appendQueryParameter(Conversation.ConversationType.APP_PUBLIC_SERVICE.getName(), "true")//订阅号
                        .appendQueryParameter(Conversation.ConversationType.SYSTEM.getName(), "false")//系统
                        .build();
                listFragment.setUri(uri);
                fragment = listFragment;
            } else {
                fragment = mConversationFragment;
            }
            break;
        case 1:
            if (mGroupListFragment == null) {
                mGroupListFragment = new GroupListFragment();
            }

            fragment = mGroupListFragment;

            break;

        case 2:
            if (mChatroomFragment == null) {
                fragment = new ChatRoomListFragment();
            } else {
                fragment = mChatroomFragment;
            }
            break;
        case 3:
            if (mCustomerFragment == null) {
              //  fragment = new FriendListFragment();
                fragment = new CustomerFragment();
            } else {
                fragment = mCustomerFragment;
            }
            break;
    }
    return fragment;
}
 
开发者ID:yangyunfeng666,项目名称:demo-app-android-v2-2.3.9,代码行数:53,代码来源:MainActivity.java


注:本文中的io.rong.imkit.fragment.ConversationListFragment.setUri方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。