How to change Padding or margin of homeasupindicator

Asked

Viewed 56 times

-3

tela do aparelho

How to take the space between arrow and icone android?

1 answer

0

Starting with API 15, the positioning of these elements are encoded according to the capabilities of the layout. An alternative would be to use a custom toolbar to create your own navigation and hide the internal.

Also for some cases, it works you instantiate the android.R.id.home in this way:

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 of this answer in the Soen.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.