例如,我在bandi实例中获得了以下参考。
public class MainActivity extends AppCompatActivity {
ArrayList<DashModel> dashModelArrayList;
RecyclerView recyclerView;
DashAdapter dashAdapter;
protected void onCreate (Bundle saveInstanceState) {
super.onCreate(saveInstanceState);
setContentView(R.layout.layoutgirdm);
recyclerView = findViewById(R.id.rv1);
dashModelArrayList = new ArrayList<>();
String heads[] = {"jobs","profile","message","apple","setting"};
String subs[] = {"12 news","75 complete","2 new messages","3pplie","edit","set pref"};
int images[] = {R.drawable.ic_lock_24px};
DashModel dashModel = new DashModel();
for(int count = 0 ; count < heads.length; count++){
dashModel.setHead(heads[count]);
dashModel.setSub(subs[count]);
dashModel.setImage(images[0]);
dashModelArrayList.add(dashModel);
}
LinearLayoutManager layoutManager = new LinarLayoutManager(this,LinearLayoutManager.HORIZONTAL,false);
recyclerView.setLayoutManager(layoutManager);
dashAdapter = new DashAdapter(dashModelArrayList);
recyclerView.setHasFixedSize(true);
recyclerView.setAdapter(dashAdapter);
}
如下面的屏幕截图所示,stradi admin用户界面按ID显示类别。我希望看到类别名称而不是ID。
我在哪里可以在Stradi admin中设置此选项?