小编yop*_*e97的帖子

Kotlin - 如何分割对象变量

我有一个错误:

这不是'Parcelize'直接支持的,如果您希望使用'writeValue'对其进行序列化,请使用@RawValue注释参数类型

当我实施@Parcelize

@Parcelize data class PersonUiModel (
    var personNo: String? = null,
    var personItemNo: String? = null,
    var packageId: String? = null,
    var userInfo: UserDetailUiModel? = null,
    var personInfo: PersonDetailUiModel? = null
) : Parcelable, Cloneable {

  override public fun clone(): PersonUiModel {
    return PersonUiModel(personNo= this.personNo, personItemNo = this.personItemNo,packageId = this.packageId, userInfo = this.userInfo, personInfo = this.personInfo)
  }
}
Run Code Online (Sandbox Code Playgroud)

之前谢谢..

android kotlin

4
推荐指数
2
解决办法
3775
查看次数

BottomNavigationView 菜单项标题在非活动状态时不显示 [XML]

现在:https : //i.stack.imgur.com/lgdaa.png

我有一个底部导航栏。案例:底部导航栏项菜单的文本未显示在非活动状态时显示。文本仅在选项卡处于活动状态时显示。即使选项卡菜单处于非活动状态,应该显示什么图标标题?

<android.support.design.widget.BottomNavigationView
            android:id="@+id/navigation"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom"
            android:background="?android:attr/windowBackground"
            android:theme="@style/BottomNavigationTheme"
            app:menu="@menu/menu"/>
Run Code Online (Sandbox Code Playgroud)

和样式:

    <style name="BottomNavigationTheme" parent="Theme.AppCompat.Light">
        <item name="colorPrimary">@color/tabActive</item>
        <item name="android:textColorSecondary">@color/tabInactive</item>
    </style>
Run Code Online (Sandbox Code Playgroud)

xml android

3
推荐指数
2
解决办法
1570
查看次数

标签 统计

android ×2

kotlin ×1

xml ×1