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");
}
}
这里所有命名的布局文件都是针对片段类的,但是我想对recyclerview和适配器类进行编码,所以该怎么做?
答案 0 :(得分:0)
你可以这样做
holder.getContext().startActivity(new Intent(holder.context(),Activity.class))