【问题标题】:Get start and end icon view from TextInputLayout从 TextInputLayout 获取开始和结束图标视图
【发布时间】:2022-12-10 06:04:18
【问题描述】:

我想从 TextInputLayout 获得结束和开始图标视图,这样我就可以做一些事情,比如检查它是否悬停。

我不知道从哪里开始(idk 如果可能的话),所以任何帮助将不胜感激。

【问题讨论】:

    标签: android-textinputlayout textinputlayout


    【解决方案1】:

    this.binding.inputLayoutTextInputLayout

    // Get start icon
    CheckableImageButton startIcon = this.binding.inputLayout.findViewById(com.google.android.material.R.id.text_input_start_icon);
    
    // Get end icon
    CheckableImageButton endIcon = this.binding.inputLayout.findViewById(com.google.android.material.R.id.text_input_end_icon);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-06-24
      • 1970-01-01
      • 2019-01-25
      • 1970-01-01
      • 2019-05-31
      • 2020-11-09
      • 1970-01-01
      相关资源
      最近更新 更多