Answers for "findviewbyid to fragment"

0

use findviewbyid in fragment

//java,how use findViewById in fragments,Android studio,2021/09/23

TextView textView;
textView=getView().findViewById(R.id.textView);

//use getView(). with it
Posted by: Guest on September-23-2021
0

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);
Posted by: Guest on April-22-2022

Code answers related to "findviewbyid to fragment"

Browse Popular Code Answers by Language