View customNav = LayoutInflater.from(this).inflate(R.layout.activity_custom_layout, null);
actionBar.setCustomView(customNav);
actionBar.setDisplayShowCustomEnabled(true);
final Context context1 = this;
ImageButton ibItem1 = (ImageButton) customNav.findViewById(R.id.refresh);
ibItem1.setPadding(280, 0, 0, 0);
ibItem1.setVisibility(View.INVISIBLE);
ibItem1.setOnClickListener(new View.OnClickListener()
{ @Override public void onClick(View view) { } });
我已将带有图像按钮的自定义视图添加到 android 操作栏,图像按钮大小很小,所以需要更改操作栏的大小以获得适当的图像大小?