coddmajes
V2EX  ›  Android

ActionView 合并之后就再也不能展开了怎么办?

  •  
  •   coddmajes · Mar 13, 2016 · 13465 views
    This topic created in 3737 days ago, the information mentioned may be changed or developed.

    合并代码:

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {

    MenuInflater inflater = getMenuInflater();

    inflater.inflate(R.menu.main, menu);

    MenuItem searchItem = menu.findItem(R.id.action_search);

    searchItem.setOnActionExpandListener(new OnActionExpandListener() {

    @Override
    public boolean onMenuItemActionExpand(MenuItem item) {

    Log.d("TAG", "on expand");

    return true;

    }

    @Override 
        public boolean onMenuItemActionCollapse(MenuItem item) {  
            Log.d("TAG", "on collapse");  
            return true;  
        }  
    });  
    return super.onCreateOptionsMenu(menu);
    

    }

    我试着还原成开始的展开时候的代码 还是不能展开回来,试了其他项目也是感觉改不回来了 ,,应该怎么办?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2744 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 12:28 · PVG 20:28 · LAX 05:28 · JFK 08:28
    ♥ Do have faith in what you're doing.