I have a problem disabling views from my Gallery in my Android application. Nothing seems to happen with the View when I click it. Here is my onItemClick(...)
method:
@Override
public void onItemClick(AdapterView<开发者_开发技巧?> adapterView, View view,
int position, long id) {
view.setEnabled(false);
}
I have also tried setVisibility(...)
What am I missing?
Thanks in advance.
If you want to set your view invisible, try this little piece of code:
view.setVisibility(View.GONE);
This sets the view invisible and i think you can't focus it anymore. But if you're working within a grid, there will be a gap left behind.
精彩评论