亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

布局控件出現問題

我拖拉TextView和Plain時兩個文本控件總是不能在同一行,總是一上一下,我用了LinearLayout布局

有誰知道怎么解決嗎?

正在回答

3 回答

謝謝!

0 回復 有任何疑惑可以回復我~

我自己找到原因了,是因為我沒有將?android:orientation="vertical"改成?android:orientation="horizontal",希望有此問題的人可以看看。

2 回復 有任何疑惑可以回復我~

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

? ? android:layout_width="match_parent"

? ? android:layout_height="match_parent"

? ? android:orientation="vertical" >


? ? <EditText

? ? ? ? android:id="@+id/editText2"

? ? ? ? android:layout_width="wrap_content"

? ? ? ? android:layout_height="wrap_content"

? ? ? ? android:ems="10"

? ? ? ? android:hint="請輸入你的姓名" >


? ? ? ? <requestFocus />

? ? </EditText>


? ? <TextView

? ? ? ? android:id="@+id/textView1"

? ? ? ? android:layout_width="wrap_content"

? ? ? ? android:layout_height="wrap_content"

? ? ? ? android:text="姓名:"

? ? ? ? android:textColor="#000000"

? ? ? ? android:textSize="28sp" />


</LinearLayout>


1 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
Android攻城獅的第一門課(入門篇)
  • 參與學習       312492    人
  • 解答問題       4931    個

想快速掌握Android應用開發基礎,選擇學習這門課程就對了。

進入課程

布局控件出現問題

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號