我需要爲我的相機應用創建圖像。我在另一個圓圈內創建了一個圓圈 當我在android studio上看到它時,它看起來很好,但是在真實設備上運行時它不一樣。這裏是第一個來自真實設備的圖像,第二個來自android studio。在Android中的另一個圈內創建圈子
這裏是我的代碼,我使用創建它。
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Larger circle in white-->
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<padding android:top="5dp" android:bottom="5dp" android:right="5dp" android:left="5dp"/>
<stroke
android:width="1dp"
android:color="#ffffff"/>
</shape>
</item>
<!-- Smaller white circle in front -->
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid
android:color="#ffffff"/>
</shape>
</item>
</layer-list>
這是什麼問題,爲什麼它表現出不同。
[如何在使用Android xml形狀的圓圈內繪製圓圈?](http://stackoverflow.com/questions/21613308/how-to-draw-a-circle-inside-a-circle-使用-Android-xml-shapes) –