android - extra margin on left side of actionbar -


i new android, working on first app .i stuck @ problem, see margin in action bar when run app on api 18 , above .

i googled , found answer :- android: remove left margin actionbar's custom layout

but don't think applicable me, firstly,(as per solution suggested in link above) 1)i not using toolbar, actionbar 2)android studio throws error below code

        toolbar parent =(toolbar) customview.getparent();         parent.setcontentinsetsabsolute(0,0); 

saying, minimum 14 , setcontentinsetsabsolute needs api 21. did ,

 if(build.version.sdk_int == 21 ){         toolbar parent =(toolbar) customview.getparent();         parent.setcontentinsetsabsolute(0,0);  } 

but not helping. going wrong , how fix issue?


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -