我需要private Toolbar mainToolbar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mainToolbar = (Toolbar) findViewById(R.id.main_toolbar);
setSupportActionBar(mainToolbar);
getSupportActionBar().setTitle("Some Title");
}
private void setSupportActionBar(Toolbar mainToolbar) {}
来创建类似LinkPager
的网页网址。
该路由适用于URL管理器,但/site/page/1/job/2/order-price/3/order-exp/4/
忽略此路由并使用LinkPager
参数创建URL。
?foo=bar
答案 0 :(得分:1)
您使用的参数名称不正确。如果您的模式为site/page/<page:\d+>/job/<job_id:\d+>/order-price/<min_price:\d+>/order-exp/<experience:\d+>/
,则参数名称为:
page
,job_id
,min_price
,experience
。您应该将规则更改为:
site/page/<page:\d+>/job/<job:\d+>/order-price/<order-price:\d+>/order-exp/<order-exp:\d+>/
或者在分页配置中调整参数名称:
[
'pageSize' => 1,
'forcePageParam' => true,
'pageSizeParam' => false,
'params' => [
'page' => $this->page,
'job_id' => $this->job_id,
'min_price' => $this->min_price,
'experience' => $this->experience,
],
];