Hello friends, I would like you to help me update a gridview after selecting one of its items, ie within the onItemClickListener event or if there is another form but that is updated after selecting an item from the grid.
I show you some of the code
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.juegodeletra);
adaptadorimagenjuego adap = new adaptadorimagenjuego(this, nu());
barra = (ProgressBar) findViewById(R.id.progressBar);
gridView = (GridView) findViewById(R.id.grid1);
gridView.setAdapter(adap);
muss();
alertas();
gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
if(dato==position){
}
else{
}
}
});
I want that in the onItemClick method if the condition is fulfilled, update my gridview, I would appreciate any contribution from friends