
TUIKit 或 TUIConversation。TUILogin 的 login 接口登录组件。<?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <FrameLayout android:id="@+id/conversation_view" android:layout_width="match_parent" android:layout_height="match_parent"/> </FrameLayout>
public class MainActivity extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main_activity); TUIConversationMinimalistFragment fragment = new TUIConversationMinimalistFragment(); getSupportFragmentManager() .beginTransaction() .add(R.id.conversation_view, fragment) .commitAllowingStateLoss(); } }
public class MainActivity extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main_activity); TUIConversationFragment fragment = new TUIConversationFragment(); getSupportFragmentManager() .beginTransaction() .add(R.id.conversation_view, fragment) .commitAllowingStateLoss(); } }
文档反馈