Android: Convert HeaderViewHolder to Kotlin

This commit is contained in:
Charles Lombardo 2023-03-01 13:41:02 -05:00
parent 58b7b80902
commit 53d404c5a0
2 changed files with 18 additions and 28 deletions

View File

@ -1,28 +0,0 @@
// SPDX-License-Identifier: GPL-2.0-or-later
package org.dolphinemu.dolphinemu.features.cheats.ui;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.NonNull;
import org.dolphinemu.dolphinemu.R;
import org.dolphinemu.dolphinemu.databinding.ListItemHeaderBinding;
public class HeaderViewHolder extends CheatItemViewHolder
{
private TextView mHeaderName;
public HeaderViewHolder(@NonNull ListItemHeaderBinding binding)
{
super(binding.getRoot());
mHeaderName = binding.textHeaderName;
}
public void bind(CheatsActivity activity, CheatItem item, int position)
{
mHeaderName.setText(item.getString());
}
}

View File

@ -0,0 +1,18 @@
// SPDX-License-Identifier: GPL-2.0-or-later
package org.dolphinemu.dolphinemu.features.cheats.ui
import android.widget.TextView
import org.dolphinemu.dolphinemu.databinding.ListItemHeaderBinding
class HeaderViewHolder(binding: ListItemHeaderBinding) : CheatItemViewHolder(binding.root) {
private val headerName: TextView
init {
headerName = binding.textHeaderName
}
override fun bind(activity: CheatsActivity, item: CheatItem, position: Int) {
headerName.setText(item.string)
}
}