-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. Android屏幕設計圖像
- 2. 有一次Android安裝程序屏幕?
- 3. 如何獲得像Android安裝屏幕中那樣的包裝ListView?
- 4. Google Play設計指南?
- 5. UI屏幕設計
- 6. 在Eclipse模擬器上安裝Google Play
- 7. J2ME UI屏幕設計
- 8. Android支持屏幕設計
- 9. 如何在6.0 Genymotion設備上安裝Google Play服務?
- 10. 將Google Play服務設備安裝與Xamarin.GooglePlayServices庫匹配
- 11. 像新的Google Play商店5.0一樣的滑動選項卡
- 12. Play-clj屏幕和實體
- 13. Bonobo Git安裝後的白色屏幕
- 14. Drupal安裝後的白色屏幕
- 15. 安裝時的Android配置屏幕
- 16. Google廣告ID是否適用於Google Play商店安裝計數?
- 17. Google Play上發佈的屏幕截圖大小不起作用
- 18. 如何將較大的佈局安裝到小設備屏幕?
- 19. CSS屏幕樣式
- 20. 安裝時只顯示一次安卓屏幕
- 21. 需要Google Play服務,但Google Play(市場)未安裝。該怎麼辦?
- 22. 無法安裝Google Play許可證庫「和」Google Play下載器庫「
- 23. Google Play服務插件沒有與admobpro一同安裝
- 24. 無法在同一屏幕上安裝appbar和活動
- 25. 反應本機重新安裝屏幕
- 26. 需要幫助的屏幕設計
- 27. 支持多屏幕的設計佈局
- 28. 適合所有屏幕的Android設計
- 29. 自己的設計喜好屏幕
- 30. 表格未安裝在設備屏幕上
你能更具體一點嗎?你現在的佈局是什麼樣的? – Blaasd
嗨@Blaasd,謝謝你的迴應。我只是想創建像上面的圖片的自定義視圖。我使用此視圖來顯示我的應用程序的信息,如下載數量,評分,... – AnhDH
您目前的嘗試是什麼樣的? – Blaasd