@@ -434,6 +434,11 @@ public void setTextSize(float size) {
434
434
textView .setTextSize (size );
435
435
}
436
436
437
+ public void setTextParams (int weight , int [] padding ) {
438
+ this .textWeight = weight ;
439
+ this .textPaddingArray = padding ;
440
+ }
441
+
437
442
/**
438
443
* Set text view padding
439
444
*
@@ -453,12 +458,14 @@ public void setTextPadding(int[] padding) {
453
458
* @param scaleType all without MATRIX
454
459
* @param padding 4 elements array {CustomButton.LEFT, CustomButton.TOP, CustomButton.RIGHT, CustomButton.BOTTOM}
455
460
*/
456
- public void setImage (int position , Drawable drawableNormal , Drawable drawablePressed , Drawable drawableDisabled , ImageView .ScaleType scaleType , int [] padding ) {
461
+ public void setImage (int position , Drawable drawableNormal , Drawable drawablePressed , Drawable drawableDisabled , ImageView .ScaleType scaleType , int weight , int [] padding ) {
457
462
this .drawableDisabled = drawableDisabled ;
458
463
this .drawablePressed = drawablePressed ;
459
464
this .drawableNormal = drawableNormal ;
460
465
this .drawablePosition = position ;
461
466
this .imageScaleType = scaleType ;
467
+ this .imageWeight = weight ;
468
+ this .imagePaddingArray = padding ;
462
469
463
470
if (padding != null )
464
471
imageContainer .setPadding (padding [LEFT ], padding [TOP ], padding [RIGHT ], padding [BOTTOM ]);
@@ -476,9 +483,11 @@ public void setImage(int position, Drawable drawableNormal, Drawable drawablePre
476
483
* @param scaleType all without MATRIX
477
484
* @param padding 4 elements array {CustomButton.LEFT, CustomButton.TOP, CustomButton.RIGHT, CustomButton.BOTTOM}
478
485
*/
479
- public void setImage (int position , Drawable drawable , ImageView .ScaleType scaleType , int [] padding ) {
486
+ public void setImage (int position , Drawable drawable , ImageView .ScaleType scaleType , int weight , int [] padding ) {
480
487
this .drawable = drawable ;
481
488
this .drawablePosition = position ;
489
+ this .imageWeight = weight ;
490
+ this .imagePaddingArray = padding ;
482
491
483
492
if (padding != null )
484
493
imageContainer .setPadding (padding [LEFT ], padding [TOP ], padding [RIGHT ], padding [BOTTOM ]);
@@ -646,4 +655,12 @@ public int[] getImagePaddingArray() {
646
655
public ImageView .ScaleType getImageScaleType () {
647
656
return imageScaleType ;
648
657
}
658
+
659
+ public int getImageWeight () {
660
+ return imageWeight ;
661
+ }
662
+
663
+ public int getTextWeight () {
664
+ return textWeight ;
665
+ }
649
666
}
0 commit comments