-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3da95e6
commit a4228e5
Showing
3 changed files
with
61 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
backdrop/src/main/kotlin/ru/semper_viventem/backdrop/BackdropUtils.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package ru.semper_viventem.backdrop | ||
|
||
import android.view.ViewGroup | ||
import androidx.appcompat.widget.Toolbar | ||
|
||
class BackdropUtils { | ||
|
||
fun findToolbar(viewGroup: ViewGroup): Toolbar? { | ||
for (chileId in 0..viewGroup.childCount) { | ||
val childView = viewGroup.getChildAt(chileId) | ||
if (childView is Toolbar) { | ||
return childView | ||
} | ||
} | ||
|
||
return null | ||
} | ||
} |