直播app系統原始碼,動態遇到視訊時開始自動播放
直播app系統原始碼,動態遇到視訊時開始自動播放
一、layout
1.activity_main.xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android=" android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent"> <ViewFlipper android:id="@+id/flipper" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:inAnimation="@anim/left_in" android:outAnimation="@anim/right_out"> <ImageView android:id="@+id/imageView7" android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/hututu" /> <ImageView android:id="@+id/imageView8" android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/makabaka" /> <ImageView android:id="@+id/imageView9" android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/hututu" /> <ImageView android:id="@+id/imageView10" android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/hututu" /> </ViewFlipper> </RelativeLayout>
2.left_in.xml
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="> <translate android:duration="2000" android:fromXDelta="-100%p" android:toXDelta="0" /> </set>
3.right_out.xml
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="> <translate android:duration="2000" android:fromXDelta="-100%p" android:toXDelta="0" /> </set>
二、MainActivity
MainActivity.java
其中主要用到的方法是
ViewFlipper flipper = (ViewFlipper) findViewById(R.id.flipper); flipper.startFlipping(); package com.example.a86153.lunbotu; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.ViewFlipper; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ViewFlipper flipper = (ViewFlipper) findViewById(R.id.flipper); flipper.startFlipping(); } }
以上就是 直播app系統原始碼,動態遇到視訊時開始自動播放,更多內容歡迎關注之後的文章
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69978258/viewspace-2903144/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- java版工程管理系統Spring Cloud+Spring Boot+Mybatis實現工程管理系統原始碼
- Java 版 Spring Cloud+Spring Boot+Mybatis 電子招標採購系統功能清單
- Ubuntu系統-FFmpeg安裝及環境配置
- 數字孿生能源系統,打造低碳時代“透視”眼
- 如臨現場的視覺感染力,NBA決賽直播還能這樣看?
- centos7 離線升級/線上升級作業系統核心
- Android 12(S) 影像顯示系統 - HWC HAL 初始化與呼叫流程
- DAPP系統的原理與介紹
- 元宇宙系統的發展佈局
- 什麼是主鏈系統?主鏈系統有什麼作用?
- 有哪些好用的供應商管理系統
- LSF 叢集全面監控!淺析 HPC 基於龍蜥作業系統的遷移替代解決方案
- android短視訊開發,設定APP字型大小不隨著系統變化而改變
- 阿里雲體驗有獎:如何將 PolarDB-X 與大資料等系統互通
- 用WindowsAppSDK(WASDK)優雅的開發上位機應用
- 百度的評論系統是怎麼設計的?
- mysql-發生系統錯誤1067
- Android Target 31 升級全攻略 —— 記阿里首個超級 App 的坎坷升級之路