Java tutorial
//package com.java2s; //License from project: Apache License import android.app.Activity; import android.view.View; public class Main { /** * Get the hamburger icon and return it (Used for setting colors to it) * @param activity activity referencing * @return */ public static View getToolbarHamburgerButton(Activity activity) { try { View view = ((View) activity.getWindow().getDecorView().findViewById(android.R.id.home)); return view; } catch (Exception e) { e.printStackTrace(); return null; } } }