V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
coddmajes
V2EX  ›  Android

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

  •  
  •   coddmajes · Mar 13, 2016 · 13329 views
    This topic created in 3698 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   ·   6015 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 02:03 · PVG 10:03 · LAX 19:03 · JFK 22:03
    ♥ Do have faith in what you're doing.