首页 > 其他分享 >直播平台软件开发,Android studio设置分割线

直播平台软件开发,Android studio设置分割线

时间:2023-08-22 14:25:26浏览次数:37  
标签:layout parent height width studio Android 分割线 android match

直播平台软件开发,Android studio设置分割线

该方法在xml布局文件中添加ImageView控件

设置竖直分割线时,设置宽度为0.5dp,高度为match_parent(与父控件等高),颜色设置为black(黑色),此处数值可根据需求自行更改

 


        <ImageView
            android:layout_width="0.5dp"
            android:layout_height="match_parent"
            android:background="@android:color/black"/>
 

设置水平分割线时,设置宽度为match_parent(与父控件等高),高度为0.5dp,颜色设置为black(黑色),此处数值可根据需求自行更改

 


    <ImageView
        android:layout_width="match_parent"
        android:layout_height="0.5dp"
        android:background="@android:color/black" />
 

 

设置为如图所示的界面,两个线性布局嵌套在一起,第一层中控件竖直放置,第二层中控件水平放置,代码如下

 


<?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"
    android:orientation="vertical"
    android:weightSum="1">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">
        <Button
            android:layout_width="47dp"
            android:layout_height="wrap_content"
            android:id="@+id/back_ccloth"
            android:text="⬅"
            android:background="#00000000"
            android:layout_marginTop="10dp"
            android:layout_marginBottom="10dp"
            android:textSize="40dp"/>
        <ImageView
            android:layout_width="0.5dp"
            android:layout_height="match_parent"
            android:background="@android:color/black"/>
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="110dp"
            android:text="标题"
            android:layout_marginTop="10dp"
            android:layout_marginBottom="10dp"
            android:textSize="20dp"
            android:textColor="@android:color/black" />
    </LinearLayout>
    <ImageView
        android:layout_width="match_parent"
        android:layout_height="0.5dp"
        android:background="@android:color/black" />
        </LinearLayout>

 

 以上就是直播平台软件开发,Android studio设置分割线, 更多内容欢迎关注之后的文章

 

标签:layout,parent,height,width,studio,Android,分割线,android,match
From: https://www.cnblogs.com/yunbaomengnan/p/17648381.html

相关文章

  • 直播带货源码,Android studio设计app登录界面
    直播带货源码,Androidstudio设计app登录界面TextView:用于显示标题和“用户名"和"密码"的提示;标题设置   <TextView    android:layout_width="wrap_content"    android:layout_height="wrap_content"    android:text="登录页面"    a......
  • 记录一次在Android Studio中,任务:app:compileDebugJavaWithJavac的执行失败了
    因为我命令行覆盖提交了一次git代码,导致git原本的版本不见了,构建项目的时候提示会找不到SDK排查过程:构建项目时提示找不到SDK目录,经过排查后发现是gitpull的时候没有把local.properties这个文件上传上去,导致后面下载回来的项目都没有,而原本的本地目录被我删了 随机根据最初原始目......
  • android.os.handlerexecutor
    android.os.HandlerExecutor是一个Android平台的Executor,它可以将任务发布到指定的Handler运行。可以将HandlerExecutor视为一种将任务提交到Handler的简单方法,与使用Handler.post(Runnable)相比,HandlerExecutor具有更好的可读性和可维护性。在Android中,UI线程(也称为主线程)用于处理......
  • 水果音乐制作软件fl studio v21.1.0.3713 中文特别版2023系统配置要求
    水果音乐制作软件flstudiov21.1.0.3713中文特别版是一个功能完备的音乐制作环境,能够进行多轨道音频录制、音序处理和混音,可以帮助用户创作专业质量的音乐轨道。借助VST托管、灵活的混音器、高级MIDI和ReWire支持,您将轻松驾驭各种音乐风格。歌曲或循环可以导出为.wav、.......
  • Visual Studio常用快捷键总结
    1、前进:ctrl+shift+-2、回退:ctrl+-3、查看定义和引用:F124、格式化文档:ctrl+K+D5、注释:ctrl+k+c,ctrl+k+u6、代码折叠:7、代码展开:8、断点调试:单行调试F10;进入F11;下一个断点F5; 10、添加断点:F911、删除所有断点:ctrl+shift+F9......
  • 【Windows 11】安装 Android子系统 和 Linux子系统
    本文使用电脑系统:文章目录一、安卓子系统1.1安装WSA1.2使用二、Linux子系统2.1安装WSL以及WSL相关概念2.2安装一个Linux发行版2.21从MicrosoftStore安装2.22用命令安装2.23拓展三、拓展3.1存储位置3.2虚拟化技术3.3Windows虚拟内存3.3wsl帮助文件一、安卓子系......
  • Android开发如何斩获高薪offer?给大家几点面试建议
    前言又到了每年的求职季,Android开发工程师在找工作过程对于简历设计和面试技巧通常会有一定的欠缺,而这往往是求职过程是否顺利的决定性因素。因此,掌握一定的面试技巧对于找互联网技术岗位的工作帮助非常大。本篇文章给大家分享一波面试必备技巧,全文是通过在阿里的面试官的交流整理......
  • Visual Studio 2022 连接MySQL 查询表中数据
     注:①MySqlConnection是用于与MySQL数据库进行连接和交互的类。它位于MySql.Data.MySqlClient命名空间中。    ②builder.ConnectionString返回一个包含连接字符串的字符串,这个连接字符串是通过使用MySqlConnectionStringBuilder对象构建的。连接字符串包含了......
  • Visual Studio 修改NuGet 包路径
    目的:通过NuGet安装包时,NuGet先将包下载至一个统一的目录,默认路径是:C:\Users\{用户名}\.nuget\packages。现在需要将其迁移到目录E:\nuget\packages步骤1、在C:\ProgramFiles(x86)\NuGet\Config目录中找到Microsoft.VisualStudio.Offline.config。在文件末尾添加......
  • WMCTF2023 ezAndroid
    一道安卓逆向题,用jadx打开。定位主要逻辑:点击查看代码publicvoidCheckOutClick(Viewview){Stringusername=this.usernameInput.getText().toString();Stringpassword=this.passwordInput.getText().toString();if(username.equals(......