当前位置:网站首页>直播app系统源码,动态遇到视频时开始自动播放
直播app系统源码,动态遇到视频时开始自动播放
2022-06-28 18:59:00 【云豹网络科技】
直播app系统源码,动态遇到视频时开始自动播放
一、layout
1.activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/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="http://schemas.android.com/apk/res/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="http://schemas.android.com/apk/res/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系统源码,动态遇到视频时开始自动播放,更多内容欢迎关注之后的文章
边栏推荐
- 中金财富开户安全吗?开过中金财富的讲一下
- Jenkins Pipeline 对Job参数的处理
- Graduation project - Design and development of restaurant management game based on unity (with source code, opening report, thesis, defense PPT, demonstration video and database)
- Win 10创建一个gin框架的项目
- Tensorboard Usage Summary
- devpi
- C language file operation
- 获取当前日期0点及23点59时间戳
- How many objects are created after new string ("hello")?
- leetcode 1689. Partitioning Into Minimum Number Of Deci-Binary Numbers(最少的“二进制数“个数)
猜你喜欢
随机推荐
Memory leak
我是刚购买的adb mysql服务,我每做一个操作,比如建表,都会弹出这个问题,请问这是什么问题?
Shell 未知汇总1
Anonymous function this pointing and variable promotion
大火的虚拟人在哪些产业开始发力?
Michael Wooldridge, professeur à l'Université d'Oxford: comment la communauté de l'IA voit les réseaux neuronaux depuis près de 40 ans
idea其他分支合并到dev分支
Baidu time factor addition
C# 41. int与string互转
Collection of real test questions
3D rotatable particle matrix
Opencv中使用Tracker实现物体跟踪
带你手把手实现grafana双轴图
微信小程序接入百度统计报错 Cannot read property ‘mtj‘ of undefined
AOSP Tsinghua image download error resolution
1 goal, 3 fields, 6 factors and 9 links of digital transformation
找出连续7天登陆,连续30天登陆的用户
模块化操作
Analyzing the practical development of robot teaching
ANR Application Not Responding









