简体   繁体   English

我应该使用哪些元素?

[英]Which elements I should use for it?

I'm just starting to get acquainted with Android Studio and I want to make a menu in my application approximately as shown in the photo. 我刚刚开始熟悉Android Studio,我想在应用程序中创建一个菜单,大致如图所示。 What elements should I use for this? 我应该为此使用哪些元素? https://i.imgur.com/p6ZDdcw.png https://i.imgur.com/p6ZDdcw.png

Since you are just starting with the android studio, you can design the layout using a Relative/Linear layout . 由于您只是从android studio开始,因此您可以使用相对/线性布局来设计布局 Try to divide the whole layout into pieces like dividing it into rows and working row by row. 尝试将整个布局分成几部分,例如将其分成几行并逐行工作。

Let say you want to design those items in the second row then you can approach it as 假设您要在第二行中设计这些项目,则可以按照

  1. A parent Linear layout for the row(horizontal orientation) which include three children linear layouts(one for each item details) 该行的父线性布局(水平方向),包括三个子线性布局(每个项详细信息一个)

  2. Each child layout can be oriented as vertical containing 3 views (one for item picture, one for item name, and last for item detail) 每个子布局都可以垂直放置,包含3个视图(一个用于项目图片,一个用于项目名称,最后一个用于项目详细信息)

Like this, you have to first decide which way you want to design your app. 这样,您必须首先决定要设计应用程序的方式。

Start small and evolve gradually. 从小处着手,逐步发展。

For more details on components to use you can refer the following link. 有关要使用的组件的更多详细信息,您可以参考以下链接。

Material Design Components 材料设计组件

I hope this will be useful to get you started. 我希望这对您入门很有帮助。

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

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