默認情況下,TextViews似乎帶有一些內置填充,我無法弄清楚如何刪除。例如,這是用戶在我的應用程序中看到的內容。如何製作連續的TextViews?
我想在兩個TextViews是一個連續塊像下面在Pinterest的佈局。
怎樣才能實現這一目標?
更新: 最終,解決方案是手動設置的背景,然後使用這樣的分隔符:
<EditText
android:padding="10dp"
android:id="@+id/login_name"
android:lines="1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="0dp"
android:hint="@string/nnn"
android:background="#FFf0f0f0"
android:imeOptions="actionNext" >
<requestFocus />
</EditText>
<View android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#FFd1d1d1"/>
<View android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#FFFFFFFF"/>
<EditText
android:padding="10dp"
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_marginTop="0dp"
android:inputType="textPassword"
android:hint="@string/enter_password"
android:layout_height="wrap_content"
android:imeOptions="actionDone"
android:background="#FFf0f0f0"
/>
您添加了2個,因爲您在我的答案中看到了它?或者你在完成你的回答後神奇地想過它? – 2013-03-13 01:15:58
...呃?我添加了2號,因爲我意識到只刪除填充和邊距不會導致圖片中的效果。世界並不是圍繞着你,而StackOverflow不是一個競賽。 – slezica 2013-03-13 01:17:41
給他的問題我猜他的EditText沒有邊距或填充,所以他留下的是背景。所以基本上你是對的,StackOverFlow不是一個競賽。但是現在做你現在做的事情也不是很好。 – 2013-03-13 01:23:58