我有一個AutoCompleTextView,爲此我創建了一個在TextView周圍創建一個漂亮邊框的形狀。在我的平板電腦上,我可以看到邊框。有了相同的配置,我無法在手機上看到它。所以......我錯過了什麼?形狀未顯示
這裏是我的AutoCompleteTextView:
<AutoCompleteTextView
android:id='@+id/search'
android:layout_height='wrap_content'
android:layout_width='fill_parent'
android:layout_toRightOf="@id/search_picture"
android:layout_margin="10dp"
android:padding="5dp"
android:completionThreshold="1"
android:background="@drawable/back"
android:hint="search..."
xmlns:android='http://schemas.android.com/apk/res/android'>
</AutoCompleteTextView>
而這裏的形狀back.xml:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid android:color="#ffffff" />
<stroke android:width="2dp" android:color="@color/blue"/>
<padding android:left="2dp" android:top="2dp" android:right="2dp" android:bottom="2dp" />
</shape>
我發現形狀#2,通常完美的作品。
感謝您的任何提示!
謝謝。我替換了角色。它仍然不起作用,在平板電腦上照常工作。所以這個錯誤必須在別的地方... – Marco 2012-03-20 17:03:50
增加筆畫的寬度來檢查。並刪除填充也。 – 2012-03-20 17:08:10
我也試過。仍然沒有顯示。 – Marco 2012-03-22 09:39:50