如何让imagebutton位置随点击listview的行的时候改变位置?
<LinearLayout....省略
<AbsoluteLayout
android:layout_width="match_parent"
android:layout_weight="1.0"
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
>
<ListView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:cacheColorHint="#00000000"
android:id="@+id/lvSongAllList" >
</ListView>
<!-- 长按按钮显示正常点歌与置顶操作 -->
<ImageButton android:id="@+id/up2top1"
android:layout_width="30dip"
android:layout_height="30dip"
android:background="@drawable/selected_up2top"
/>
</AbsoluteLayout>
[解决办法]
你可以换种思路,ListView里面每一行的布局中都包含了置顶的ImageButton,没点击的时候都是隐藏的,点击后就显示出来
[解决办法]
你可以换种思路,ListView里面每一行的布局中都包含了置顶的ImageButton,没点击的时候都是隐藏的,点击后就显示出来
当你点击某一行的时候,就在这一行的view当中动态添加一个imagebutton,不知此思路可否?
添加之后,如何隐藏呢?因为数据是动态更新的,如果再刷新一遍就显得数据慢