-1
A
回答
1
我剛纔想的第一個項目。接下來的項目,我認爲你需要你svg或png作爲背景。
佈局
<RelativeLayout
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@drawable/corner_red_stroke">
<TextView
android:layout_width="50dp"
android:layout_height="50dp"
android:gravity="center"
android:text="10"
android:paddingBottom="4dp"
android:textSize="20sp" />
<TextView
android:layout_width="50dp"
android:layout_height="13dp"
android:layout_alignParentBottom="true"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:background="@drawable/corner_red_solid"
android:gravity="center"
android:text="MILLION"
android:textColor="#ffffff"
android:textSize="8sp" />
</RelativeLayout>
corner_red_solid.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp">
<solid android:color="#ff0105"/>
<corners android:radius="50dp"/>
<stroke android:width="1dp" android:color="#ff0105" />
</shape>
corner_red_stroke.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp">
<corners android:radius="50dp"/>
<stroke android:width="1dp" android:color="#ff0105" />
</shape>
+0
這個答案太棒了。非常感謝你的回答。你節省了我的一天:D – AnhDH
相關問題
- 1. 像Google Play一樣無聲安裝Android應用程序
- 2. Android屏幕設計圖像
- 3. 像Google Play一樣的iOS Alpha測試
- 4. 像Google Play一樣的卡片佈局
- 5. 有一次Android安裝程序屏幕?
- 6. 如何獲得像Android安裝屏幕中那樣的包裝ListView?
- 7. Google Play,平板電腦和圖像訂單屏幕截圖
- 8. Google Play設計指南?
- 9. UI屏幕設計
- 10. 隱藏從Google Play安裝時的apk
- 11. Google Play服務的可選安裝
- 12. 設計的iPhone 5屏幕和設備的屏幕較小
- 13. 如何設計一個像騎過視圖的屏幕?
- 14. 在Eclipse模擬器上安裝Google Play
- 15. Google Play用戶安裝問題
- 16. 爲什麼Google Play安裝統計信息不準確?
- 17. 使Google Map的屏幕截圖大於我的設備屏幕
- 18. 設計安裝
- 19. Android支持屏幕設計
- 20. 響應式屏幕設計
- 21. J2ME UI屏幕設計
- 22. Photoshop設計到Android屏幕
- 23. iOS通用屏幕設計
- 24. 爲什麼Google Play不知道我只想要小屏幕和普通屏幕?
- 25. 將Google Play服務設備安裝與Xamarin.GooglePlayServices庫匹配
- 26. 如何在6.0 Genymotion設備上安裝Google Play服務?
- 27. 像新的Google Play商店5.0一樣的滑動選項卡
- 28. 安裝時的Android配置屏幕
- 29. 安裝後的空白屏幕
- 30. Bonobo Git安裝後的白色屏幕
你能更具體一點嗎?你現在的佈局是什麼樣的? – Blaasd
嗨@Blaasd,謝謝你的迴應。我只是想創建像上面的圖片的自定義視圖。我使用此視圖來顯示我的應用程序的信息,如下載數量,評分,... – AnhDH
您目前的嘗試是什麼樣的? – Blaasd