我想爲帶有4dp填充的此圖像放置邊框,但是當我將背景設置爲我想要的顏色時,我會在頂部和底部獲取所有黑色邊框。我如何擺脫這一點,所以我正確設置邊界?帶有邊框的ImageView的怪異視圖
0
A
回答
0
當我明白你的問題不知道如果我真的得到了你想要
以線性佈局,敷線佈局內的ImageView的話,給的背景顏色,無論你想在圖像的線性佈局什麼鑑於保證金給你想要的邊界
<ScrollView>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:padding="10dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
android:text="@string/dealer_picker" />
<Spinner
android:id="@+id/spinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:prompt="@string/dealer_picker" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#1E1E1E">
<ImageView
android:id="@+id/mapView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:MARGINHERE SAY 10 dp or whatever />
</LinearLayout>
<TextView
android:id="@+id/adresa"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dip" />
</LinearLayout>
</ScrollView>
0
此修復程序是添加任何寬度:android:adjustViewBounds="true"
到ImageView的
+0
我有確切的問題,但訣竅不適用於我:( – ercan 2014-03-26 12:51:41
相關問題
- 1. 帶邊框的視圖
- 2. Android:帶按鈕的ImageView邊框
- 3. 帶有邊框的色帶
- 4. 帶邊框的Android位圖
- 5. 自定義錶帶有邊框的Android視圖
- 6. 帶邊框的圖像邊框1px:0;沒有js
- 7. 帶Imageview和列表視圖的LinearLayout
- 8. 帶邊框/描邊的SVG圖像
- 9. 帶邊框的圖標,彼此相鄰並帶有邊框懸停效果
- 10. ImageView上邊框的顏色
- 11. Android的imageview邊框填充
- 12. ImageView上的內部邊框
- 13. 帶有圓邊的邊框塌陷?
- 14. 帶有Button和ImageView的對話框?
- 15. ImageView帶有陰影角落,實心邊框和發光效果
- 16. 視圖的閃爍邊框
- 17. 視圖的邊框紋理
- 18. Core Plot上的奇怪邊框餅圖
- 19. 圖像底部的奇怪邊框
- 20. WPF圓怪異的邊界
- 21. android刪除帶圓角的視圖的默認邊框
- 22. TablelLayout與列表視圖中的微調框的怪異行爲
- 23. 在ImageView中顯示邊框到圖像
- 24. 帶有邊框的圖像上的邊框半徑在Firefox和Chrome上不同
- 25. Bootstrap Navbar有奇怪的髮際邊框
- 26. 帶邊框的下拉框
- 27. CSS邊框 - 不帶邊角的框
- 28. 如何在Android中創建帶邊框的列表視圖?
- 29. UIBezierPath:如何在帶圓角的視圖周圍添加邊框?
- 30. 帶有多個文本框的滾動視圖內部視圖
不工作。從頂部和底部的大黑色邊框仍然存在 – 2013-02-10 17:21:38
嘗試高度fillparent,而不是告訴我 – 2013-02-10 17:23:41
仍然無法正常工作。 – 2013-02-10 17:27:43