Android直播app

Android直播app

看了网上大部分关于网络直播的介绍,无非是有网络直播流地址,然后加上播放器就可以了,实现起来其实不难。
这里写图片描述

直播框架:

  • 抓取网络直播流地址
    这个就不多介绍了,出于学习目的可以自己找,例如you-get,还有电视之家的网络电视直播源,一般的rmtp和m3u8的流地址都可以。
  • github有名的开源播放器JiaoZiVideoPlayer

Android控件

看个人喜好,可以用GridView或ListView,或者用ExpandableListView。加上RefreshLayout可以实现下拉刷新,上拉加载,这里使用SmartRefreshLayout

  • ExpandableListView
    类似QQ好友列表的使用功能:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <ExpandableListView
        android:id="@+id/expand_list_tv"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
</LinearLayout>

效果图:
这里写图片描述

  • GridView
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <GridView
            android:id="@+id/gvLivingList"
            android:numColumns="2"
            android:horizontalSpacing="5dp"
            android:verticalSpacing="5dp"
            android:layout_width="match_parent"
            android:layout_height="match_parent">
        </GridView>
</LinearLayout>

效果图:
这里写图片描述

  • ListView
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <ListView
        android:id="@+id/list_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:scrollbars="none">
    </ListView>
</LinearLayout>

效果图:
这里写图片描述

  • 1
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值