سؤال

كيف يمكنني إضافة أيقونة "Drawable Left" إلى كائن زر؟

أعني شيئًا كهذا:

Button button = new Button();
button.setDrawableLeft(R.drawable...);
هل كانت مفيدة؟

المحلول

يستخدم Button.setCompoundDrawablesWithIntrinsicBounds(..) الذي يرتبط Android: Drawableleft ينسب.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top