0
有沒有android中的任何特定組件或我必須使用視圖來製作三角形(顯示在圖像中)並附加到卡上,但仍然像我上傳的圖像那樣不會像圖像中那樣。 Click here to see Image任何人都可以請告訴我怎麼可以在android中使用cardview附加這個三角形?
有沒有android中的任何特定組件或我必須使用視圖來製作三角形(顯示在圖像中)並附加到卡上,但仍然像我上傳的圖像那樣不會像圖像中那樣。 Click here to see Image任何人都可以請告訴我怎麼可以在android中使用cardview附加這個三角形?
那麼有許多方法,但是我的是:
您將創建一樣,在Photoshop中的形象(當然衡量它好,定位到所有設備(DP)) ,然後將其放入您的drawable
文件夾中,並在CardView頂部調用它。
假設圖像被稱爲image_traingle.jpg
你能做到這樣
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:onClick="Contract"
android:layout_margin="10dp"
app:cardCornerRadius="7dp"
android:layout_height="90dp">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Imageview
android:layout_width="wrap_content"
android:gravity="left"
android:background="@color/colorPrimary"
android:src="drawable/image_triangle"
android:layout_height="match_parent" />
.
.
.
</LinearLayout>
</android.support.v7.widget.CardView>
感謝答覆。但在android中有一個組件叫做額外的細節,我忘記了自從我過去兩天以來搜索的確切名稱,但我無法找到。我會嘗試這種方法@LuttayaHuzaifahIdris。 –
好吧@kuldeepzala,如果你不介意,你可以給我一個Tick –
當然我會:) @LuttayaHuzaifahIdris –