cuốn sách gpt4 ai đã làm

android - setCompoundDrawablesWithIntrinsicBounds(int,int,int,int)不起作用

In lại Tác giả: Taklimakan Thời gian cập nhật: 2023-11-02 08:51:54 32 4
mua khóa gpt4 Nike

Tôi có một số Chỉnh sửa Chế độ xem văn bản , nơi tôi muốn đặt hình ảnh ở bên trái và setCompoundDrawablesWithIntrinsicBounds Có vẻ như không hoạt động. Đồ họa dường như không thay đổi.

Có ai biết tại sao điều này lại xảy ra?

Đây là cách tôi thiết lập drawable:

        mFirstname.setCompoundDrawablesWithIntrinsicBounds(R.drawable.user_icon, 0, 0, 0);
mLastname.setCompoundDrawablesWithIntrinsicBounds(R.drawable.user_icon, 0, 0, 0);
mEmail.setCompoundDrawablesWithIntrinsicBounds(R.drawable.mailicon, 0, 0, 0);
mPassword.setCompoundDrawablesWithIntrinsicBounds(R.drawable.lockicon, 0, 0, 0);
mDateOfBirth.setCompoundDrawablesWithIntrinsicBounds(R.drawable.calico, 0, 0, 0);
mCity.setCompoundDrawablesWithIntrinsicBounds(R.drawable.mailicon, 0, 0, 0);
mStreet.setCompoundDrawablesWithIntrinsicBounds(R.drawable.mailicon, 0, 0, 0);
mPostcode.setCompoundDrawablesWithIntrinsicBounds(R.drawable.mailicon, 0, 0, 0);
mPhoneNumber.setCompoundDrawablesWithIntrinsicBounds(R.drawable.mailicon, 0, 0, 0);

câu trả lời hay nhất

Nếu có ai khác đang gặp phải vấn đề dường như không thể giải thích được này, vui lòng thử cách sau:

  • Đi tới mẫu XML của bạn.
  • Xóa hình ảnh XML đại diện cho nó.
  • Chế độ xem của bạn sẽ làm mới tệp có thể rút được.

Về cơ bản, phần này của Chế độ xem dường như không tăng trở lại trên các thiết bị ICS. Hy vọng điều này sẽ giải quyết được vấn đề của ai đó!

Về việc android - setCompoundDrawablesWithIntrinsicBounds(int, int, int, int) không hoạt động, chúng tôi đã tìm thấy một câu hỏi tương tự trên Stack Overflow: https://stackoverflow.com/questions/20423445/

32 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress