短视频直播源码,游客模式下使用正常功能跳转到登录页面

短视频直播源码,游客模式下使用正常功能跳转到登录页面

1.1顶部图片

使用图片控件:ImageView

图片存放到以drawable开头的目录下

代码:

 

1
<!--  顶部图片  --><br>    <ImageView<br>        android:layout_width="match_parent"<br>        android:layout_height="250dp"<br>        android:background="@drawable/doctor"/>

1.2账号提示+输入框

外层使用线性布局控件:LinearLayout

内层使用文本控件:TextView;编辑框控件:EditText

 

1
<!--  账号提示+输入框  --><br>    <LinearLayout<br>        android:layout_width="match_parent"<br>        android:layout_height="wrap_content"<br>        android:orientation="horizontal"<br>        android:layout_marginLeft="20dp"<br>        android:layout_marginRight="20dp"<br>        android:gravity="center_vertical"<br>        android:layout_marginTop="30dp"><br>        <TextView<br>            android:layout_width="wrap_content"<br>            android:layout_height="wrap_content"<br>            android:text="账         号"<br>            android:textSize="25dp" /><br>        <EditText<br>            android:layout_width="match_parent"<br>            android:layout_height="50dp"<br>            android:hint="请输入您的账号"<br>            android:paddingLeft="5dp"<br>            android:textSize="18dp"<br>            android:layout_marginLeft="10dp"<br>            android:inputType="text"/><br>    </LinearLayout>

 

1.3密码提示+输入框

外层使用线性布局控件:LinearLayout

内层使用文本控件:TextView;编辑框控件:EditText

 

1
<!--  密码提示+输入框  --><br>    <LinearLayout<br>        android:layout_width="match_parent"<br>        android:layout_height="wrap_content"<br>        android:orientation="horizontal"<br>        android:layout_marginLeft="20dp"<br>        android:layout_marginRight="20dp"<br>        android:gravity="center_vertical"<br>        android:layout_marginTop="20dp"><br>        <TextView<br>            android:layout_width="wrap_content"<br>            android:layout_height="wrap_content"<br>            android:text="密         码"<br>            android:textSize="25dp" /><br>        <EditText<br>            android:layout_width="match_parent"<br>            android:layout_height="50dp"<br>            android:hint="请输入您的密码"<br>            android:paddingLeft="5dp"<br>            android:textSize="18dp"<br>            android:layout_marginLeft="10dp"<br>            android:inputType="numberPassword"/><br>    </LinearLayout>

 

2.注册页面编写

新建activity-生成RegiserActivity Java文件和activity_regiser XML文件

 

1
public void jumpToRegister(View view) {<br>        Intent intent = new Intent(MainActivity.this,RegiserActivity.class);<br>        startActivity(intent);<br>    }

 

以上就是 短视频直播源码,游客模式下使用正常功能跳转到登录页面,更多内容欢迎关注之后的文章

 

posted @   云豹科技-苏凌霄  阅读(206)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现
点击右上角即可分享
微信分享提示