处理EditText左侧图片icon大小

ViewUtils
public class ViewUtils {
    /**
     * @Author AlanMa
     * @Description 处理图形大小
     * @Date 2020/4/14
     * @Param [editTextList]
     * @return void
     */
    public static void drawableSetSize(Context context, List<EditText> editTextList,List<Integer> drawableIds){

        EditText editText;
        for (int i = 0; i < editTextList.size(); i++) {
            editText = editTextList.get(i);
            Drawable drawableLoginName = context.getResources().getDrawable(drawableIds.get(i));
            drawableLoginName.setBounds(0, 0, 50, 50);
            editText.setCompoundDrawables(drawableLoginName, null, null, null);
        }
    }
}

 

posted @ 2020-05-09 10:39  青竹玉简  阅读(765)  评论(0编辑  收藏  举报