|
还有一种比较假的办法,通过设置背影,伪装加粗
android:shadowColor=”#000000″
android:shadowDx=”0.2″ android:shadowDy=”0.0″ android:shadowRadius=”0.2″
效果图看看
2、setBackgroundColor()无效的解决:
设置背景颜色setBackgroundColor(0x222222)是无效的,可以改为:
layout.setBackgroundColor(android.graphics.Color.parseColor("#009999"));
3、java实现android:layout_margin的功能。
如下:
LinearLayout layout= maplayout.get(type);
if(layout!=null){
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.MATCH_PARENT);
lp.setMargins(10, 10, 10, 10);
layout.setLayoutParams(lp);
}