代码中添加drawableLeftdrawableRight等

    xiaoxiao2026-08-22  6

    代码中添加drawableLeft/drawableRight等

    方法一: Drawable rightDrawable = getResources().getDrawable(R.drawable.searchfield_search_icon_normal_filled); rightDrawable.setBounds(0, 0, rightDrawable.getMinimumWidth(), rightDrawable.getMinimumHeight()); search_edit.setCompoundDrawables(null, null, rightDrawable, null); 方法二(drawableLeft): Drawable drawable= getResources().getDrawable(R.drawable.drawable); drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight()); myTextview.setCompoundDrawables(drawable,null,null,null);
    转载请注明原文地址: https://ju.6miu.com/read-1311440.html
    最新回复(0)