[英]Action Bar with navigation drawer
我相信您有创建导航抽屉的解决方案。
现在您的问题如何创建自定义操作栏
这样尝试..
actionBar = getSupportActionBar(); // Get Action Bar reference.
actionBar.setCustomView(R.layout.action_bar_confirm_cabs); Set your action bar view like this
fare_ll = (TextView) actionBar.getCustomView().findViewById(R.id.fare_ll); Get id of your custom view like this ...
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM); // Set property for Custom view like this.
fare_ll.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
}
});
就是这样。...你很好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.