[英]Custom shaped button in android
我想像這樣創建一個自定義形狀的按鈕:
我可以通過使用RelativeLayout並重疊矩形和圓形來實現類似的功能。 但是那樣,我必須添加 2 個onClickListaners ,每個形狀一個。
RelativeLayout
onClickListaners
android 中有沒有辦法(除了使用圖像,因為在圖像中整個矩形視圖都是可點擊的,而不僅僅是按鈕)來使用單個 XML 布局文件創建這樣的設計?
您不必創建兩個偵聽器,只需為 RelativeLayout 制作一個偵聽器
[英]Android Custom shaped Button
[英]Android: custom shaped button
[英]custom shaped button for android activity
[英]Android fully shaped Button
[英]Heart shaped button in android
[英]Android: Creating shaped button
[英]Android Custom shaped dialog
[英]Custom shaped textview, Android
[英]Triangular shaped button for android activity
[英]Image with custom shaped buttons on android
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.