本文整理了Java中androidx.appcompat.widget.Toolbar.getChildAt()
方法的一些代码示例,展示了Toolbar.getChildAt()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Toolbar.getChildAt()
方法的具体详情如下:
包路径:androidx.appcompat.widget.Toolbar
类名称:Toolbar
方法名:getChildAt
暂无
代码示例来源:origin: KeepSafe/TapTargetView
@Override
public View getChildAt(int position) {
return toolbar.getChildAt(position);
}
代码示例来源:origin: michael-rapp/ChromeLikeTabSwitcher
/**
* Returns the menu item, which shows the navigation icon of the tab switcher's toolbar.
*
* @return The menu item, which shows the navigation icon of the tab switcher's toolbar, as an
* instance of the class {@link View} or null, if no navigation icon is shown
*/
@Nullable
private View getNavigationMenuItem() {
Toolbar[] toolbars = tabSwitcher.getToolbars();
if (toolbars != null) {
Toolbar toolbar = toolbars.length > 1 ? toolbars[1] : toolbars[0];
int size = toolbar.getChildCount();
for (int i = 0; i < size; i++) {
View child = toolbar.getChildAt(i);
if (child instanceof ImageButton) {
return child;
}
}
}
return null;
}
代码示例来源:origin: h4h13/RetroMusicPlayer
public static void colorBackButton(Toolbar toolbar, @ColorInt int color) {
final PorterDuffColorFilter colorFilter = new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY);
for (int i = 0; i < toolbar.getChildCount(); i++) {
final View backButton = toolbar.getChildAt(i);
if (backButton instanceof ImageView) {
((ImageView) backButton).getDrawable().setColorFilter(colorFilter);
}
}
}
代码示例来源:origin: MCMrARM/revolution-irc
replacement.setLayoutParams(toolbarParams);
for (int j = 0; j < mToolbar.getChildCount(); j++) {
View v = mToolbar.getChildAt(j);
if (v instanceof TabLayout) {
mToolbar.removeViewAt(j);
代码示例来源:origin: h4h13/RetroMusicPlayer
final View v = toolbarView.getChildAt(i);
内容来源于网络,如有侵权,请联系作者删除!