Shubham Gupta
Shubham Gupta

Reputation: 1353

Android Studio change Toolbar shadow color

I need to change the color of the Toolbar's shadow on API 21 and above.

Is there is any function like toolbar.setShadowColor(LIGHT_BLUE_COLOR) or something.

Upvotes: 0

Views: 230

Answers (1)

Wini
Wini

Reputation: 1986

try in your actionbar-->

getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
   super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
 yourActionBarid.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
 yourActionBarid.setElevation(0);

Note

Add getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY); before super.onCreate(savedInstanceState);

Upvotes: 1

Related Questions