任何人都可以帮助我吗?我想把我的桌子分页。所有链接都在工作,但这些项目在其他页面上重复。我在这里尝试过类似的问题,但没有任何效果。
getSupportActionBar().setHomeAsUpIndicator(R.drawable.your_arrow_icon);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
答案 0 :(得分:0)
谢谢大家。我得到了它的工作:下面是我最终做的,它工作得很好!
function index($type="deposit", $sort_by='deposit_date', $sort_order='asc', $page_limit=0)
{
$data['controller_name'] = $this->get_controller_name();
$config = array();
$config['base_url'] = site_url("expenses/index/$type/$sort_by/$sort_order");
$config['total_rows'] = $this->Expense->get_total_rows($type);
$config['per_page'] = 4;
$config["uri_segment"] = 6;
$data['num_rows'] = $config['total_rows'];
$data['type'] = $type;
$this->pagination->initialize($config);
$page = ($this->uri->segment(6)) ? $this->uri->segment(6) : 0;
$data[$type.'s'] = $this->Expense->get_records($config["per_page"], $page, $type, $sort_by, $sort_order);
$data["links"] = $this->pagination->create_links();
$data['headers'] = $this->Expense->table_headers($type);
$data['sort_by'] = $sort_by;
$data['sort_order'] = $sort_order;
$this->load->view('expenses/'.$type, $data);
$this->_remove_duplicate_cookies();
}