mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-22 16:03:15 +00:00
アイテムをタッチしたら画面推移するように
This commit is contained in:
parent
439b76f8bf
commit
f4c46fbd5d
|
@ -7,6 +7,7 @@ import android.widget.ImageView;
|
|||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.navigation.Navigation;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -35,6 +36,10 @@ public class ListItemAdapter extends RecyclerView.Adapter<ListItemAdapter.ListIt
|
|||
holder.icon.setColorFilter(one.nem.lacerta.shared.ui.R.color.colorOnSurface);
|
||||
holder.title.setText(listItem.getTitle());
|
||||
holder.description.setText(listItem.getDescription());
|
||||
|
||||
holder.itemView.setOnClickListener( v -> {
|
||||
Navigation.findNavController(v).navigate(listItem.getDestination());
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user