Solution 1 :
you can do like this
holder.getContext().startActivity(new Intent(holder.context(),Activity.class))
Problem :
public class allmain extends AppCompatActivity {
RecyclerView allfurniture;
TextView aaa;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.all);
//allfurniture = (RecyclerView)findViewById(R.id.allfurniture);
aaa = (TextView) findViewById(R.id.aaa);
aaa.setText("asdafdfdafaf");
}
}
here the all named layout file is for fragment class but i want to do coding of recyclerview and adapter class so what to do in it?
Comments
Comment posted by a_local_nobody
but i want to do coding of recyclerview and adapter class
Comment posted by ashok
You mean start the recyclerView?
Comment posted by Anand
yes in fragment we need to code differently then simple java file so i want to class fregment activity in the java file