ToolBar and StatusBar overlap in the Tabbed activity in an unmodified newly created project in Android Studio -


i created new project tabbed activity , navigation style action bar tabs.

the mainactivity's default layout follows on swipe tablayout follows:

enter image description here

after swiping way looks this: toolbar , statusbar overlapping!

enter image description here

questions:

is expected behavior? shouldn't scrolling disabled or if enabled, toolbar should hide (e.g. whatsapp)? default behavior appears buggy me. did miss led this?

and if default expected behavior? how can following?

  • disable scrolling in coordinatorlayout?
  • hide toolbar when scrolling enabled?

ps: mentioned unmodified new project (no changes end). if still needs generated code i'll share.

go /v21/styles.xml , replace:

<item name="android:statusbarcolor">@android:color/transparent</item> 

by:

<item name="android:statusbarcolor">@color/colorprimarydark</item> 

the problem status bar transparent.

note: default, status bar uses primarydarkcolor if it's defined. in case, remove line in order use primarydarkcolor far keep line...

<item name="colorprimarydark">@color/colorprimarydark</item> 

...in values\styles.xml in apptheme.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

json - Gson().fromJson(jsonResult, Myobject.class) return values in 0's -