在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):lurbas/ListItemView开源软件地址(OpenSource Url):https://github.com/lurbas/ListItemView开源编程语言(OpenSource Language):Java 100.0%开源软件介绍(OpenSource Introduction):ListItemViewImplementation of List Item from Material Design guidelines. ScreenshotUsage<com.lucasurbas.listitemview.ListItemView
android:id="@+id/list_item_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:liv_title="@string/title"
app:liv_subtitle="@string/subtitle"
app:liv_icon="@drawable/ic_call_24dp"
app:liv_menu="@menu/single_action_menu"
app:liv_multiline="false"
app:liv_displayMode="icon"/> Action MenuRight action icon is configured from xml menu file similar to toolbar configuration.
xml file <menu xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/action_heart"
android:icon="@drawable/ic_favorite_24dp"
android:title="@string/action_heart"
app:showAsAction="always" />
<item
android:id="@+id/action_info"
android:icon="@drawable/ic_info_24dp"
android:title="@string/action_info"
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_remove"
android:title="@string/action_remove"
app:showAsAction="never" />
</menu> add onClick listener listItemView.setOnMenuItemClickListener(new ListItemView.OnMenuItemClickListener() {
@Override
public void onActionMenuItemSelected(final MenuItem item) {
// click
}
}); Padding and Keyline
By default It is possible to offset text without setting icon, by using liv_forceKeyline flag
Circular Icon
Avatar
next you can get the Picasso.with(context) .load(avaratUrl) .placeholder(R.drawable.placeholder) .transform(new CropCircleTransform()) .into(listItemView.getAvatarView()); StylingTitle color uses To change icons color use accordingly:
Download (JCenter)dependencies {
compile 'com.lucasurbas:listitemview:1.1.1'
} License
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论