coddmajes
V2EX  ›  Android

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

  •  
  •   coddmajes · Mar 13, 2016 · 13395 views
    This topic created in 3720 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   ·   1108 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 22:56 · PVG 06:56 · LAX 15:56 · JFK 18:56
    ♥ Do have faith in what you're doing.