【发布时间】:2015-11-19 14:18:36
【问题描述】:
您好,我正在使用 MvvmCross 进行 Xamarin Android 开发,到目前为止它还不错。我正在使用 MvxListView 在我的 ViewModel 中填充 ObservableCollection,它工作得很好。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp">
<Mvx.MvxListView
android:id="@+id/chat_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
local:MvxItemTemplate="@layout/chat_conversation"
local:MvxBind="ItemsSource Items; SelectedItem SelectedRecipient; ItemClick ItemSelectedCommand" />
</LinearLayout>
但现在我想对使用的 MvxListView 模板进行样式化,它总是在我没有在项目模板中绘制的行之间显示一条线。
chat_conversation.axml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView
android:id="@+id/profile_pic"
android:layout_height="35dp"
android:layout_width="35dp"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_marginTop="8dp"
android:src="@drawable/Icon"
local:MvxBind="Src Thumbnail,Converter=StreamToBitmap" />
<TextView
android:id="@+id/chat_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:padding="10dp"
android:textColor="#030303"
android:background="@drawable/chat_bubble_other"
android:shadowDx="1"
android:shadowDy="1"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_toEndOf="@id/profile_pic" />
</RelativeLayout>
有人知道如何消除 MvxListView 中的行之间的线吗?
感谢您的帮助。
【问题讨论】:
标签: android android-layout xamarin xamarin.android mvvmcross