я размещаю 36 кнопок по матрице 6х6 на экране. между кнопками остается промежуток-белые полоски. как от них избавиться может кто подскажет? размер картинок в файлах png 66х106
RelativeLayout rl= (RelativeLayout) findViewById(R.id.rl);
for (i=....
{
...
mButton[ind[i]] = new ImageButton(mContext);
mButton[ind[i]].setImageResource(drawableId);
mButton[ind[i]].setLayoutParams(new LinearLayout.LayoutParams(wb, hb));
mButton[ind[i]].setId(drawableId);
mButton[ind[i]].setX(x);
mButton[ind[i]].setY(y);
rl.addView(mButton[ind[i]]);
x += wb; // wb=66
y += hb; // hb=106
......
}
layout.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:id="@+id/rl"
tools:context=".GameActivity"
android:orientation="vertical">
</RelativeLayout>