yuzu-emu
/
yuzu
Archived
1
0
Fork 0

android: Convert HeaderViewHolder to Kotlin

This commit is contained in:
Charles Lombardo 2023-03-07 20:04:30 -05:00 committed by bunnei
parent e02e33826b
commit d472f41580
2 changed files with 28 additions and 32 deletions

View File

@ -1,32 +0,0 @@
package org.yuzu.yuzu_emu.features.settings.ui.viewholder;
import android.view.View;
import android.widget.TextView;
import org.yuzu.yuzu_emu.R;
import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem;
import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter;
public final class HeaderViewHolder extends SettingViewHolder {
private TextView mHeaderName;
public HeaderViewHolder(View itemView, SettingsAdapter adapter) {
super(itemView, adapter);
itemView.setOnClickListener(null);
}
@Override
protected void findViews(View root) {
mHeaderName = root.findViewById(R.id.text_header_name);
}
@Override
public void bind(SettingsItem item) {
mHeaderName.setText(item.getNameId());
}
@Override
public void onClick(View clicked) {
// no-op
}
}

View File

@ -0,0 +1,28 @@
package org.yuzu.yuzu_emu.features.settings.ui.viewholder
import android.view.View
import android.widget.TextView
import org.yuzu.yuzu_emu.R
import org.yuzu.yuzu_emu.features.settings.model.view.SettingsItem
import org.yuzu.yuzu_emu.features.settings.ui.SettingsAdapter
class HeaderViewHolder(itemView: View, adapter: SettingsAdapter) :
SettingViewHolder(itemView, adapter) {
private lateinit var headerName: TextView
init {
itemView.setOnClickListener(null)
}
override fun findViews(root: View) {
headerName = root.findViewById(R.id.text_header_name)
}
override fun bind(item: SettingsItem) {
headerName.setText(item.nameId)
}
override fun onClick(clicked: View) {
// no-op
}
}