qcode
  • 创作工场专业版,一问多答!更智能、更完整、更原创
  • 这是一个超强内容创作平台,它会写文章、做设计、绘图、敲代码,有问必答!
🔥点击使用-高级专业版🔥

android:layout_width="wrap_content"

时间2023-04-25 21:12:06 提问来自 山东省青岛市 的网友 分类创作 浏览498
android:layout_height="wrap_content" android:orientation="vertical"&gt; &lt;TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" /&gt; &lt;EditText android:inputType = "numberDecimal" // for decimal numbers android:id="@+id/editText1" // This will be used in the program to reference this EditText box. android:layout_width="match_parent" // These two determine the size of the box on screen. The first is horizontal, second is vertical. android:layout_height="wrap_content" /&gt; // This is the size of what you type in it, not the box itself. The wrap content means that it will expand if you type more than one line. match parent means it takes up as much space as its parent element (the LinearLayout in this case) allows. You can also set explicit sizes using "dp", like 100dp or 200dp for example, but that might make your app look weird on different screens with different resolutions and aspect ratios and stuff. For now just use wrap content or match parent until you get a better understanding of how all this works together...and when you do get a better understanding, feel free to post another question about why your explicit sizes aren't working as expected! :) &lt;/LinearLayout&gt; // Don't forget to close out your LinearLayout! Good luck with your coding!! :) </code>

点击这里,进行内容创作

创作工场 免责声明:
以上内容除特别注明外均来源于网友提问,创作工场回答,未经许可,严谨转载。
点击这里>>使用🔥专业版,更聪明、更完整、更原创!

上一篇 日语中的汉字怎么学习 下一篇 写一篇关于中国特色社会主义优越性的论文,1200字