سؤال

I know this may be a simple question but eclipse does not recognize android constants like VISIBLE :

ImageView bin = (ImageView)findViewById(R.id.delete_icon);
bin.setVisibility(VISIBLE); 

is there a reason for that ?

هل كانت مفيدة؟

المحلول

Try

bin.setVisibility(View.VISIBLE);

It needs to know what class that constant belongs to

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top