简体   繁体   English

Android 工作室布局

[英]Android studio layouts

Is it possible to use Different layouts in One Android studio app.是否可以在一个 Android 工作室应用程序中使用不同的布局。 For example um planning to use linear layout in my splash screen, Relative layout in my login and Sign up while my home activity i use constraint layout例如,我计划在我的初始屏幕中使用线性布局,在我的登录和注册中使用相对布局,而我的家庭活动我使用约束布局

It is possible to use different layouts in one application.可以在一个应用程序中使用不同的布局。 You can even use all kinds of layouts within one layout file:您甚至可以在一个布局文件中使用各种布局:

activity_login.xml : activity_login.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:width="wrap_content"
   android:height="wrap_content"
   android:orientation="vertical">

   <RelativeLayout
      android:width="wrap_content"
      android:height="wrap_content">

      .. Views / Nested layouts ..

   </RelativeLayout>

</LinearLayout>

More information on layouts can be found in the official documentation .可以 在官方文档中找到有关布局的更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM