I would like to implements kind of onHover to my gridView. This is my current code:
GridView gridView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
gridView = findViewById(R.id.emoji_grid);
gridView.setAdapter(new ImageAdapter(this));
gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View v,
int position, long id) {
Intent intent = new Intent(MainActivity.this, AfterChooseActivity.class);
intent.putExtra("test", id);
startActivityForResult(intent, 100);
}
});
That gave me the following view:
So I want that the background of each cell in the grid will be change when the mouse is on it. Is that possible?