Android: Convert HeaderViewHolder to Kotlin
This commit is contained in:
parent
58b7b80902
commit
53d404c5a0
|
@ -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());
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue