Contact list is empty | Contact list is not empty |
| |
TUIKit
or TUIContact
.TUILogin
login
API to log in to the component.<?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/contact_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); TUIContactMinimalistFragment fragment = new TUIContactMinimalistFragment(); getSupportFragmentManager() .beginTransaction() .add(R.id.contact_view, fragment) .commitAllowingStateLoss(); } }
public class MainActivity extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main_activity); TUIContactFragment fragment = new TUIContactFragment(); getSupportFragmentManager() .beginTransaction() .add(R.id.contact_view, fragment) .commitAllowingStateLoss(); } }
TUIContact
handles click actions in this interface by default, as follows:Action | Effect |
Click on New Contacts | Display pending friend requests |
Click on Group Chats | Display all group chats for the currently logged-in account |
Click on Blocked List | Display the blocklist for the currently logged-in account |
Click on the contact's avatar | Enter the Contact Management interface |
Click on the + sign at the top right of the interface | A pop-up menu with Add to Contacts and Add Group |
Was this page helpful?