所以,我遇到了一個問題。我有一個ListView看起來像這樣:如何在每個ListView項目中四捨五入...?
嗯,我一直在尋找一個很長時間才能找到答案,我的問題。所以我的問題是,我無法在每個項目中四捨五入,只能在所有列表視圖中四捨五入。這是我的列表視圖樣式代碼:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/green">
<ListView
android:id="@+id/listView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@color/red"
android:dividerHeight="8dp"
android:layout_marginRight="15dp"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="5dp"
android:background="@drawable/listviewstyle">
</ListView>
</LinearLayout>
有人可以幫我找出如何將每個列表視圖項目角舍入?
注意列表的底部... – pskink
@pskink是的,因爲它是不適用於每個項目 – codeMagic
不,他希望他的ListView被一個圓形矩形「剪裁」,這就是爲什麼你看到最後一個可見的項目圓,但不是因爲它本身圓,而是圓形列表視圖剪輯它 – pskink