How to get the space between the arrow and the android icon?
From the API 15, the placement of these elements are encoded according to the features of the layout . An alternative would be to use a custom toolbar to create your own navigation and hide the internal navigation.
Also for some cases, it works for you to instantiate android.R.id.home
like this:
ImageView viewHome = (ImageView) findViewById(android.R.id.home);
if (viewHome != null){
viewHome.setPadding(10, 0, 0, 0);
}
Note : The above code is a supposed solution solution in SOen .