-2

How to setContentView in a fragment? I having error with setContentView(tvv); Any helps will be appreciated.

image

Continue

 Button btnBF = (Button) view.findViewById(R.id.btnBF);
        btnBF.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(v.getContext(),SelectImage.class);
                startActivityForResult(intent, 0);
            }
        });
        return view;
    }



}

1 Answers1

1

What are you doing there? lol.. You don't need to set the textView.. it's already there. You need to return the "view" elemnt.

Amir Horev
  • 287
  • 2
  • 3