Room List Component | Watch Live | Connect with the host |
| | |
app/src/main/res/layout/app_activity_main.xml
).<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <FrameLayout android:id="@+id/fl_live_list" android:layout_width="match_parent" android:layout_height="match_parent" /> </RelativeLayout>
MainActivity.java
and register in the AndroidManifest.xml
. By loading TUILiveKit TUILiveListFragment
page, you can Present a list of roomspublic class MainActivity extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.app_activity_main);FragmentManager fragmentManager = getSupportFragmentManager(); FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); TUILiveListFragment listFragment = new TUILiveListFragment(); fragmentTransaction.add(R.id.fl_live_list, listFragment); fragmentTransaction.commit(); } }
MainActivity
in AndroidManifest.xml
of the app Project (please use the actual package name of your MainActivity
):<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"><application>...<!-- Example: To register MainActivity, please use your actual package name --><activityandroid:name="com.trtc.uikit.livekit.example.view.main.MainActivity"android:theme="@style/Theme.AppCompat.DayNight.NoActionBar"/>...</application></manifest>
MainActivity
inherited from AppCompatActivity
, MainActivity
was given a Theme.AppCompat
theme. You can modify it to your own Theme.AppCompat
theme.
Was this page helpful?