0
我可以像这样设计我的Android ActionBar吗?API大于14的Android ActionBar设计
如果是的话,给我一个首发。我对android设计并不陌生。 带logo的应用程序名称已居中,但底部的红色小条很难像我能理解的那样。如果有人能帮忙。
我可以像这样设计我的Android ActionBar吗?API大于14的Android ActionBar设计
如果是的话,给我一个首发。我对android设计并不陌生。 带logo的应用程序名称已居中,但底部的红色小条很难像我能理解的那样。如果有人能帮忙。
创建自定义布局和设计,然后将该布局添加到操作栏对象中。
ActionBar actionBar = getSupportActionBar(); //to support lower version too
actionBar.setDisplayShowCustomEnabled(true);
View customView=getLayoutInflater().inflate(R.layout.yourlayout, null);
actionBar.setCustomView(customView);
根据在XML文件中说,你的要求创建一个自定义布局,
activity_custom_actionbar.xml
然后使用包括这在你的java文件,
ActionBar actionBar = getActionBar();
actionBar.setCustomView(R.layout.activity_custom_actionbar);
getActionBar().setDisplayShowCustomEnabled(true);
那么布局呢?我的意思是Java代码对我来说确实不错,但XML中的Layout设计又如何像图像一样? – Nodxpert
使用.9png图像来显示过滤器背景图像 – user1517638