mirror of
https://github.com/starr-dusT/yuzu-mainline
synced 2024-03-05 21:12:25 -08:00
android: Convert HeaderViewHolder to Kotlin
This commit is contained in:
parent
e02e33826b
commit
d472f41580
@ -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
|
|
||||||
}
|
|
||||||
}
|
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user