dfdf
Have an any problem in my project of android. This is my xml code for ImageButton with height and fixed width. lt;ImageButton Android:width_of layout = "120dp" android:height_of layout = "120dp" android:id = "@+id/pilots1" android:bottom = "@drawable/android" of ball:layout_centerVertical = "true" android:layout_centerHorizontal = "true" / gt; And here and shouted in java than ImageButton : ImageButton Pilots1 = ( ImageButton ) findViewById ( R . id . It pilots1 ); My question is, which need to do, to subtract my width_of layout and height_of layout for 10dp in java code? Something like this: int Ball = of width1 . getWidth (); int Ball = of height1 . getHeight (); Width = of width - 10dp ; height = of height - 10dp ; So how it can subtract Height and Width for 10dp? [EXTRACT] You can do this for imagebutton . setLayoutParams ( Nine LinearLayout . ...