Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

where to use findviewbyid in fragment

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    ImageView imageView = (ImageView) getView().findViewById(R.id.foo);
    // or  (ImageView) view.findViewById(R.id.foo);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #findviewbyid #fragment
ADD COMMENT
Topic
Name
2+4 =