ios - Listview 后台问题
问题描述
如何更改 Listview 的白色背景。如果您拉入列表,您会看到白色背景,列表视图底部还有一个小白色边框。在Android中,我们没有那个我需要改变什么才能看不到那个白色边框?
详情见gif。Android图片在gif下。Listview 的代码在底部。
<FlexboxLayout dock="center" class="menu-center" separatorColor="#1a0dab">
<ListView for="(item, index) in languages" ref="listview" @itemTap="onItemTap" @itemLoading="onItemLoading">
<v-template>
<FlexboxLayout class="element">
<Label class="top-text" :text="item.nameNative"></Label>
</FlexboxLayout>
</v-template>
</ListView>
</FlexboxLayout>
.menu-center{
flex-direction: column;
}
.menu-center .element{
padding-top: 20%;
flex-direction: column;
align-items: center;
background-color: #1a0dab;
}
解决方案
感谢@Manoj
ListView
为自身添加背景颜色
<FlexboxLayout dock="center" class="menu-center" separatorColor="#1a0dab">
<ListView for="(item, index) in languages" ref="listview" class="listView" @itemTap="onItemTap" @itemLoading="onItemLoading">
<v-template>
<FlexboxLayout class="element">
<Label class="top-text" :text="item.nameNative"></Label>
</FlexboxLayout>
</v-template>
</ListView>
</FlexboxLayout>
.menu-center .listView{
background-color: #1a0dab;
}
推荐阅读
- amazon-web-services - 无法在具有无服务器和 DynamoDB/Cognito/API 网关的 lambda 策略中使用 ${cognito-identity.amazonaws.com:sub}
- javascript - 需要在 Google Script 中放置一个超链接,但它显示错误 Unexpected Identifier where tag is used
- python - 使用 Jinja2 Flask 渲染带有可编辑 WTForms 字段列表和不可编辑值的 HTML 表
- javascript - 地图内的Javascript地图直到条件满足
- c++ - const char 指针模板特化
- python - 如何从字典中提取提取特定键?
- angular - Ionic 中的条纹结帐
- recoiljs - 如何使用反冲实现典型用例
- xamarin - 删除 Xamarin Forms UWP 的自定义渲染器 SearchBar 上的边框
- android - 如何在 Android 上的重点文本视图上显示计算器的结果