77import android .net .Uri ;
88import android .os .AsyncTask ;
99import android .os .Bundle ;
10- import androidx .recyclerview .widget .LinearLayoutManager ;
11- import androidx .recyclerview .widget .RecyclerView ;
1210import android .util .Log ;
1311import android .view .LayoutInflater ;
1412import android .view .View ;
1513import android .view .ViewGroup ;
1614import android .widget .ImageView ;
1715import android .widget .TextView ;
1816
17+ import androidx .recyclerview .widget .LinearLayoutManager ;
18+ import androidx .recyclerview .widget .RecyclerView ;
1919
2020import com .tencent .liteav .demo .common .widget .expandableadapter .BaseExpandableRecyclerViewAdapter ;
2121import com .tencent .liteav .demo .player .demo .SuperPlayerActivity ;
22+ import com .tencent .liteav .demo .player .demo .shortvideo .view .ShortVideoActivity ;
2223import com .tencent .rtmp .TXLiveBase ;
2324
2425import java .io .File ;
3435public class MainActivity extends Activity {
3536 private static final String TAG = "MainActivity" ;
3637
37- private TextView mMainTitle ;
38- private TextView mTvVersion ;
39- private RecyclerView mRvList ;
38+ private TextView mMainTitle ;
39+ private TextView mTvVersion ;
40+ private RecyclerView mRvList ;
4041 private MainExpandableAdapter mAdapter ;
4142
4243 @ Override
@@ -52,7 +53,7 @@ protected void onCreate(Bundle savedInstanceState) {
5253 setContentView (R .layout .activity_main );
5354
5455 mTvVersion = (TextView ) findViewById (R .id .main_tv_version );
55- mTvVersion .setText (getString (R .string .app_tv_super_player_version , TXLiveBase .getSDKVersionStr ()+"(9.2.1029 )" ));
56+ mTvVersion .setText (getString (R .string .app_tv_super_player_version , TXLiveBase .getSDKVersionStr ()+"(9.3.1169 )" ));
5657
5758 mMainTitle = (TextView ) findViewById (R .id .main_title );
5859 mMainTitle .setOnLongClickListener (new View .OnLongClickListener () {
@@ -137,6 +138,7 @@ private List<GroupBean> initGroupData() {
137138 // 初始化播放器
138139 List <ChildBean > playerChildList = new ArrayList <>();
139140 playerChildList .add (new ChildBean (getString (R .string .app_item_super_player ), R .drawable .play , 3 , SuperPlayerActivity .class ));
141+ playerChildList .add (new ChildBean (getString (R .string .app_item_shortvideo_player ), R .drawable .play , 3 , ShortVideoActivity .class ));
140142 if (playerChildList .size () != 0 ) {
141143 GroupBean playerGroupBean = new GroupBean (getString (R .string .app_item_player ), R .drawable .composite , playerChildList );
142144 groupList .add (playerGroupBean );
@@ -148,7 +150,7 @@ private List<GroupBean> initGroupData() {
148150
149151 private static class MainExpandableAdapter extends BaseExpandableRecyclerViewAdapter <GroupBean , ChildBean , GroupVH , ChildVH > {
150152 private List <GroupBean > mListGroupBean ;
151- private GroupBean mGroupBean ;
153+ private GroupBean mGroupBean ;
152154
153155 public void setSelectedChildBean (GroupBean groupBean ) {
154156 boolean isExpand = isExpand (groupBean );
@@ -222,7 +224,7 @@ public void onBindChildViewHolder(ChildVH holder, GroupBean groupBean, ChildBean
222224
223225 public static class GroupVH extends BaseExpandableRecyclerViewAdapter .BaseGroupViewHolder {
224226 ImageView ivLogo ;
225- TextView textView ;
227+ TextView textView ;
226228
227229 GroupVH (View itemView ) {
228230 super (itemView );
@@ -238,7 +240,7 @@ protected void onExpandStatusChanged(RecyclerView.Adapter relatedAdapter, boolea
238240
239241 public static class ChildVH extends RecyclerView .ViewHolder {
240242 TextView textView ;
241- View divideView ;
243+ View divideView ;
242244
243245 ChildVH (View itemView ) {
244246 super (itemView );
@@ -249,9 +251,9 @@ public static class ChildVH extends RecyclerView.ViewHolder {
249251 }
250252
251253 private class GroupBean implements BaseExpandableRecyclerViewAdapter .BaseGroupBean <ChildBean > {
252- private String mName ;
254+ private String mName ;
253255 private List <ChildBean > mChildList ;
254- private int mIconId ;
256+ private int mIconId ;
255257
256258 public GroupBean (String name , int iconId , List <ChildBean > list ) {
257259 mName = name ;
@@ -289,9 +291,9 @@ public int getIconId() {
289291
290292 private class ChildBean {
291293 public String mName ;
292- public int mIconId ;
293- public Class mTargetClass ;
294- public int mType ;
294+ public int mIconId ;
295+ public Class mTargetClass ;
296+ public int mType ;
295297
296298 public ChildBean (String name , int iconId , int type , Class targetActivityClass ) {
297299 this .mName = name ;
0 commit comments