Android中的Linearlayout与Relativelayout区分

本文介绍了Android开发中两种常见的布局方式:线性布局(LinearLayout)和相对布局(RelativeLayout)。线性布局支持水平或垂直方向排列子控件,而相对布局则允许子控件根据父控件或其他兄弟控件进行定位。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1)Linearlayout翻译成中文名字就是线性布局,所谓的线性布局就是Android中的控件一个个依次排开,要不就是垂直由上依次排下(指令是:android:orientation="vertical"),要不就是从左到右依次排开(android:orientation="horizontal")


2)Relativelayout译成相对布局,也就是一个控件相对于父控件的位置,如果有多个控件同时在Relativelayout中设置相对位置,那么这几个控件将会叠加在一起。

云台 云台,也称PTZ,是指对摄像机进行操控,比如云台转动、物理缩放、变焦等操作。 可以根据需要自动或手动调整方向和焦距,确保关键区域始终处于监控范围内。 该能力需摄像头本身支持PTZ能力。 云台控制 请先确认设备是否具备云台能力,可通过EZDeviceInfo的isSupportPTZ方法判断。 如果设备支持云台能力,基线(线上)客户推荐使用如下方法来控制云台 EZOpenSDK /** * PTZ 通过p2p服务+http双通道控制云台,设备响应先到达的指令,响应更快(推荐) * 该接口为耗时操作,必须在线程中调用 * * @param deviceSerial 设备序列号 * @param cameraNo 通道号 * @param command ptz控制命令 * @param action 控制启动/停止 * @param newSpeed 速度(0-7) * @return 操作成功或者失败(返回失败错误码) */ public boolean controlPTZMix(final String deviceSerial, final int cameraNo, final EZPTZCommand command, final EZPTZAction action, final int newSpeed) throws BaseException; 私有云客户推荐使用如下方法来控制云台(使用基础能力,私有云服务可能未支持其他扩展功能) /** * PTZ 控制接口 * 该接口为耗时操作,必须在线程中调用 * * @param deviceSerial 设备序列号 * @param cameraNo 通道号 * @param command ptz控制命令 * @param action 控制启动/停止 * @param speed 速度(0-2) * @return 操作成功或者失败(返回失败错误码) */ public boolean controlPTZ(String deviceSerial, int cameraNo, EZPTZCommand command, EZPTZAction action, int speed) throws BaseException; 云台角度 播放器EZPlayer设置handler通知回调后,会回调云台角度数据 @Override public boolean handleMessage(Message msg) { switch (msg.what) { case EZRealPlayConstants.MSG_PTZ_GET_SUCCESS:// 云台角度获取成功 handleDevicePtzAngleInfo(msg.obj); break; } } /** * 云台角度比例尺更新 * @param obj */ private void handleDevicePtzAngleInfo (Object obj) { if (mPtzControlAngleViewHor.getVisibility() == View.VISIBLE || mPtzControlAngleViewVer.getVisibility() == View.VISIBLE) { EZDevicePtzAngleInfo info = (EZDevicePtzAngleInfo) obj; // do something } } EZDevicePtzAngleInfo对象属性如下 属性 释义 horStartAng 水平方向起点角度 horEndAng 水平方向终点角度 horCurAng 水平方向当前角度 verStartAng 垂直方向起点角度 verEndAng 垂直方向终点角度 verCurAng 垂直方向当前角度 。依据上述开发文档在下面代码中实现点击"@+id/ptz_left_btn"控制云台向左转动,点击"@+id/ptz_right_btn"控制云台向右转动,点击"@+id/ptz_top_btn"控制云台向上转动,点击"@+id/ptz_bottom_btn"控制云台向下转动,点击"@+id/zoom_add"控制云台物理放大,点击"@+id/zoom_reduce"控制云台物理缩小,其它不变。MainActivity.java:package com.videogo.ui.login; import android.content.res.Configuration; import android.content.pm.ActivityInfo; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.util.Log; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.View; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import com.videogo.exception.BaseException; import com.videogo.exception.ErrorCode; import com.videogo.openapi.EZConstants; import com.videogo.openapi.EZOpenSDK; import com.videogo.openapi.EZPlayer; import ezviz.ezopensdk.R; import android.widget.ProgressBar; import android.widget.RelativeLayout; import android.widget.LinearLayout; import android.widget.ImageButton; public class MainActivity extends AppCompatActivity implements SurfaceHolder.Callback, Handler.Callback { private static final String TAG = "EZPreview"; private static final int MSG_VIDEO_SIZE_CHANGED = 1; private static final int MSG_REALPLAY_PLAY_SUCCESS = 2001; private static final int MSG_REALPLAY_PLAY_FAIL = 2002; // 接收的参数键 private static final String KEY_APPKEY = "appkey"; private static final String KEY_SERIAL = "serial"; private static final String KEY_VERIFYCODE = "VerifyCode"; private static final String KEY_ACCESSTOKEN = "accessToken"; private static final String KEY_CAMERANO = "cameraNo"; private boolean mIsPlaying = false; private EZPlayer mEZPlayer; private SurfaceView mSurfaceView; private SurfaceHolder mSurfaceHolder; private ProgressBar mLiveProgressBar; private RelativeLayout mRlControl; private LinearLayout mLlHc; private ImageButton mIbRotate2; // 从Intent中获取的参数 private String mAppKey; private String mDeviceSerial; private String mVerifyCode; private String mAccessToken; private int mCameraNo = 0; // 默认通道号0 @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activitymain); // 1. 从Intent中获取参数 extractParametersFromIntent(); // 2. 初始化UI initUI(); initOrientationSensitiveViews(); View fanHui = findViewById(R.id.back); fanHui.setOnClickListener(v -> finish()); // 3. 初始化SDK并创建播放器 initSDKAndCreatePlayer(); } private void initOrientationSensitiveViews() { mLiveProgressBar = findViewById(R.id.liveProgressBar); mRlControl = findViewById(R.id.rl_control); mLlHc = findViewById(R.id.ll_hc); mIbRotate2 = findViewById(R.id.ib_rotate2); // 初始状态显示加载 if (mLiveProgressBar != null) { mLiveProgressBar.setVisibility(View.VISIBLE); } // 初始根据方向更新UI updateLayoutByOrientation(); } @Override public void onConfigurationChanged(@NonNull Configuration newConfig) { super.onConfigurationChanged(newConfig); // 方向变化时重新初始化视图 initOrientationSensitiveViews(); updateLayoutByOrientation(); } @Override protected void onResume() { super.onResume(); if (mLiveProgressBar != null) { if (mIsPlaying) { mLiveProgressBar.setVisibility(View.GONE); } else { mLiveProgressBar.setVisibility(View.VISIBLE); } } } private void updateLayoutByOrientation() { int orientation = getResources().getConfiguration().orientation; if (orientation == Configuration.ORIENTATION_PORTRAIT) { // 竖屏模式 mRlControl.setVisibility(View.VISIBLE); mLlHc.setVisibility(View.GONE); mIbRotate2.setVisibility(View.GONE); } else { // 横屏模式 mRlControl.setVisibility(View.GONE); mLlHc.setVisibility(View.VISIBLE); mIbRotate2.setVisibility(View.VISIBLE); } } /** * 从Intent中提取传递的参数 */ private void extractParametersFromIntent() { Bundle extras = getIntent().getExtras(); if (extras != null) { mAppKey = extras.getString(KEY_APPKEY, ""); mDeviceSerial = extras.getString(KEY_SERIAL, ""); mVerifyCode = extras.getString(KEY_VERIFYCODE, ""); mAccessToken = extras.getString(KEY_ACCESSTOKEN, ""); mCameraNo = extras.getInt(KEY_CAMERANO, 0); Log.d(TAG, "Received parameters:"); Log.d(TAG, "AppKey: " + mAppKey); Log.d(TAG, "DeviceSerial: " + mDeviceSerial); Log.d(TAG, "VerifyCode: " + mVerifyCode); Log.d(TAG, "AccessToken: " + mAccessToken); Log.d(TAG, "CameraNo: " + mCameraNo); } else { Log.e(TAG, "No parameters received from intent"); // 如果没有参数,可以显示错误信息并退出 finish(); } } /** * 初始化UI组件 */ private void initUI() { mSurfaceView = findViewById(R.id.realplay_sv); if (mSurfaceView != null) { mSurfaceHolder = mSurfaceView.getHolder(); mSurfaceHolder.addCallback(this); } else { Log.e(TAG, "SurfaceView not found with ID realplay_sv"); } } /** * 初始化SDK并创建播放器 */ private void initSDKAndCreatePlayer() { try { // 1. 初始化SDK EZOpenSDK.initLib(getApplication(), mAppKey); EZOpenSDK.getInstance().setAccessToken(mAccessToken); // 2. 创建播放器 createPlayer(); } catch (Exception e) { Log.e(TAG, "SDK initialization failed", e); } } /** * 创建播放器并开始播放 */ private void createPlayer() { try { // 1. 创建播放器实例 mEZPlayer = EZOpenSDK.getInstance().createPlayer(mDeviceSerial, mCameraNo); // 2. 配置播放器 mEZPlayer.setHandler(new Handler(this)); if (mSurfaceHolder != null) { mEZPlayer.setSurfaceHold(mSurfaceHolder); } if (mVerifyCode != null && !mVerifyCode.isEmpty()) { mEZPlayer.setPlayVerifyCode(mVerifyCode); } // 3. 开始播放 mEZPlayer.startRealPlay(); mIsPlaying = true; // 标记为正在播放 } catch (Exception e) { Log.e(TAG, "Player creation failed", e); mIsPlaying = false; // 标记为未播放 } } // 处理屏幕旋转按钮点击 public void changeScreen(View view) { Log.d(TAG, "Change screen orientation requested"); int currentOrientation = getResources().getConfiguration().orientation; if (currentOrientation == Configuration.ORIENTATION_PORTRAIT) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); } else { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); } // 更新UI布局 updateLayoutByOrientation(); } // Surface回调接口实现 @Override public void surfaceCreated(@NonNull SurfaceHolder holder) { if (mEZPlayer != null) { mEZPlayer.setSurfaceHold(holder); } } @Override public void surfaceChanged(@NonNull SurfaceHolder holder, int format, int width, int height) {} @Override public void surfaceDestroyed(@NonNull SurfaceHolder holder) { if (mEZPlayer != null) { mEZPlayer.setSurfaceHold(null); } } @Override protected void onStop() { super.onStop(); if (mEZPlayer != null) { mEZPlayer.stopRealPlay(); mIsPlaying = false; // 标记为已停止 } } @Override protected void onDestroy() { super.onDestroy(); if (mEZPlayer != null) { mEZPlayer.release(); mEZPlayer = null; } } // Handler回调处理播放状态 @Override public boolean handleMessage(@NonNull Message msg) { Log.d(TAG, "handleMessage: " + msg.what); switch (msg.what) { case MSG_VIDEO_SIZE_CHANGED: break; case MSG_REALPLAY_PLAY_SUCCESS: Log.i(TAG, "播放成功"); mIsPlaying = true; // 标记为正在播放 runOnUiThread(() -> { if (mLiveProgressBar != null) { mLiveProgressBar.setVisibility(View.GONE); } }); break; case MSG_REALPLAY_PLAY_FAIL: Log.e(TAG, "播放失败"); mIsPlaying = false; // 标记为播放失败 runOnUiThread(() -> { if (mLiveProgressBar != null) { mLiveProgressBar.setVisibility(View.VISIBLE); } }); BaseException error = (BaseException) msg.obj; int errorCode = error.getErrorCode(); if (errorCode == ErrorCode.ERROR_INNER_VERIFYCODE_NEED || errorCode == ErrorCode.ERROR_INNER_VERIFYCODE_ERROR) { // 处理验证码错误 // 这里应该提示用户输入验证码,然后重新设置并播放 // 示例中暂时保留模拟输入验证码 mVerifyCode = "123456"; if (mEZPlayer != null) { mEZPlayer.setPlayVerifyCode(mVerifyCode); mEZPlayer.startRealPlay(); } } else { Log.e(TAG, "播放失败,错误码: " + errorCode); } break; } return true; } } activitymain.xml:<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#fff2f2f2" tools:context="com.videogo.ui.login.MainActivity"> <RelativeLayout android:id="@+id/ra_title" android:layout_width="match_parent" android:layout_height="44dp" android:background="@mipmap/title_bg"> <TextView android:id="@+id/titlename" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:layout_gravity="center" android:text="易丰视频监控" android:textColor="@android:color/white" android:textSize="18sp" /> <ImageButton android:id="@+id/back" android:layout_width="40dp" android:layout_height="match_parent" android:background="@null" android:contentDescription="@null" android:paddingLeft="10dp" android:src="@mipmap/img_back" /> <ImageButton android:id="@+id/ib_rotate" android:layout_width="50dp" android:layout_height="match_parent" android:layout_alignParentRight="true" android:contentDescription="@null" android:onClick="changeScreen" android:layout_marginRight="6dp" android:scaleType="centerInside" android:background="@drawable/gps_select" android:src="@mipmap/ic_size_sel" /> </RelativeLayout> <RelativeLayout android:id="@+id/rl_control" android:layout_width="match_parent" android:layout_height="266dp" android:layout_alignParentBottom="true" android:visibility="visible"> <LinearLayout android:id="@+id/ll_center" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:layout_centerHorizontal="true" android:background="@mipmap/ycjk_yp" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@mipmap/ycjk_kb1" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@mipmap/ycjk_kb2" /> <ImageButton android:id="@+id/left_up" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@null" android:visibility="gone" /> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@mipmap/ycjk_kb3" /> </LinearLayout> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@mipmap/ycjk_kb4" /> </LinearLayout> <ImageButton android:id="@+id/ptz_top_btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/nnew_video_up" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@mipmap/ycjk_kb1" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@mipmap/ycjk_kb3" /> <ImageButton android:id="@+id/right_up" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@null" android:visibility="gone" /> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@mipmap/ycjk_kb2" /> </LinearLayout> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@mipmap/ycjk_kb4" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="wrap_content" android:layout_height="match_parent"> <ImageButton android:id="@+id/ptz_left_btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/nnew_video_left" /> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@mipmap/ycjk_zj" /> <ImageButton android:id="@+id/ptz_right_btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/nnew_video_right" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@mipmap/ycjk_kb4" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@mipmap/ycjk_kb2" /> <ImageButton android:id="@+id/left_down" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@null" android:visibility="gone" /> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@mipmap/ycjk_kb3" /> </LinearLayout> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@mipmap/ycjk_kb1" /> </LinearLayout> <ImageButton android:id="@+id/ptz_bottom_btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/nnew_video_down" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@mipmap/ycjk_kb4" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@mipmap/ycjk_kb3" /> <ImageButton android:id="@+id/right_down" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@null" android:visibility="gone" /> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@mipmap/ycjk_kb2" /> </LinearLayout> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@mipmap/ycjk_kb1" /> </LinearLayout> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_toLeftOf="@id/ll_center" android:gravity="center" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:gravity="center" android:orientation="vertical"> <ImageButton android:id="@+id/focus_add" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/video_more1" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="焦距 +" android:textColor="@color/black" android:textSize="16dp" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:gravity="center" android:orientation="vertical"> <ImageButton android:id="@+id/guangquan_add" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/video_more3" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="光圈 +" android:textColor="@color/black" android:textSize="16dp" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:gravity="center" android:orientation="vertical"> <ImageButton android:id="@+id/zoom_add" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/video_more5" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="变倍 +" android:textColor="@color/black" android:textSize="16dp" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_toRightOf="@id/ll_center" android:gravity="center" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:gravity="center" android:orientation="vertical"> <ImageButton android:id="@+id/foucus_reduce" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/video_more2" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="焦距 -" android:textColor="@color/black" android:textSize="16dp" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:gravity="center" android:orientation="vertical"> <ImageButton android:id="@+id/guangquan_reduce" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/video_more4" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="光圈 -" android:textColor="@color/black" android:textSize="16dp" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:gravity="center" android:orientation="vertical"> <ImageButton android:id="@+id/zoom_reduce" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/video_more6" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="变倍 -" android:textColor="@color/black" android:textSize="16dp" /> </LinearLayout> </LinearLayout> </RelativeLayout> <RelativeLayout android:layout_above="@id/rl_control" android:layout_below="@id/ra_title" android:layout_width="match_parent" android:layout_height="match_parent" > <SurfaceView android:id="@+id/realplay_sv" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/transparent" /> <ImageButton android:id="@+id/ib_rotate2" android:layout_width="40dp" android:layout_height="40dp" android:layout_alignParentLeft="true" android:layout_marginLeft="3dp" android:background="@color/green" android:contentDescription="@null" android:onClick="changeScreen" android:visibility="gone" android:src="@mipmap/img_systems_close" /> <ProgressBar android:id="@+id/liveProgressBar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:visibility="visible" /> <LinearLayout android:id="@+id/ll_hc" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:visibility="gone"> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:gravity="center" android:layout_weight="1" > <ImageButton android:id="@+id/ptz_top_btn2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@mipmap/h_up" /> </LinearLayout> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:gravity="center" android:layout_weight="1" > <ImageButton android:id="@+id/ptz_bottom_btn2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@mipmap/h_down" /> </LinearLayout> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:gravity="center" android:layout_weight="1" > <ImageButton android:id="@+id/ptz_left_btn2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@mipmap/h_left" /> </LinearLayout> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:gravity="center" android:layout_weight="1" > <ImageButton android:id="@+id/ptz_right_btn2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@mipmap/h_right" /> </LinearLayout> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:gravity="center" android:layout_weight="1" > <ImageButton android:id="@+id/focus_add2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/video_more1" /> </LinearLayout> <LinearLayout android:gravity="center" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" > <ImageButton android:id="@+id/foucus_reduce2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/video_more2" /> </LinearLayout> <LinearLayout android:gravity="center" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" > <ImageButton android:id="@+id/zoom_add2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/video_more5" /> </LinearLayout> <LinearLayout android:gravity="center" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" > <ImageButton android:id="@+id/zoom_reduce2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/video_more6" /> </LinearLayout> </LinearLayout> </RelativeLayout> </RelativeLayout>
最新发布
06-25
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值