您的位置:首页 > 娱乐 > 明星 > 橙子建站免费吗_python制作网页的基本步骤_营销客户管理系统_建设网站前的市场分析

橙子建站免费吗_python制作网页的基本步骤_营销客户管理系统_建设网站前的市场分析

2024/10/5 13:10:14 来源:https://blog.csdn.net/qq_57417926/article/details/142698788  浏览:    关键词:橙子建站免费吗_python制作网页的基本步骤_营销客户管理系统_建设网站前的市场分析
橙子建站免费吗_python制作网页的基本步骤_营销客户管理系统_建设网站前的市场分析
  • 设置登录界面为线性布局,组件垂直居中排列
  • 设置主页为滚动模式,包括布局、添加背景图片
  • 设置按钮样式,包括形状、边框线的宽度和颜色

设置登录界面

设置界面为线性布局,组件垂直居中排列

--android:gravity="center_vertical" 这个的意思是指 限定它里面的内容要垂直居中显示。
--android:layout_gravity="center_vertical",这个是指它的位置是相对于它父亲的垂直居中。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"tools:context=".MainActivity"android:orientation="vertical"android:background="@drawable/back"android:gravity="center_vertical"><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="欢迎进入手机银行"android:textColor="#000079"android:layout_marginBottom="70dp"android:textSize="35dp"/>
</LinearLayout>

设置主页为滚动模式

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:tools="http://schemas.android.com/tools"
--设置主页为相对布局,布局的高度和宽度铺满整个界面android:layout_width="match_parent"android:layout_height="match_parent"
--设置背景图片android:background="@drawable/zhuye"tools:context=".LendActivity"android:id="@+id/parent">
<!-- 设置表格布局的宽度为铺满,高度为自适应(随组件的高度自动调整),
排列方式为垂直排列 --><TableLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:orientation="vertical"></TableLayout>
</RelativeLayout>

设置按钮样式

<?xml version="1.0" encoding="utf-8"?>
<!--相当于做了一张圆角的图片,然后给button作为背景图片-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"android:shape="rectangle"><!--设置圆角--><corners android:radius="105dip" /><solid android:color="#E0E0E0"></solid><paddingandroid:bottom="3dp"android:left="5dp"android:right="5dp"android:top="5dp"/><!--设置边框线的宽度和颜色-->
</shape>
<Buttonandroid:id="@+id/btn"android:layout_width="wrap_content"android:layout_height="wrap_content"android:background="@xml/btn"android:text="登录"android:layout_weight="1"android:layout_marginRight="30dp"android:layout_marginBottom="10dp"></Button>

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com