控件记录

1.TextView 设置图片

1.(使用该方法,必须给图片设置宽和高,否则图片是没有效果的)
Drawable drawable = getResources().getDrawable(tv3_left_img);
drawable.setBounds(0, 0, 24, 24);
tv.setCompoundDrawables(drawable, null, null, null);
2.(使用该方法,图片按照默认给的大小设置,无需给其设置狂傲)
tv.setCompoundDrawablesRelativeWithIntrinsicBounds(getResources().getDrawable(tv3_left_img), null,
 null, null);

2.去掉阴影

<ListView

android:layout_width="match_parent"

android:layout_height="match_parent"

android:overScrollFooter="@android:color/transparent"

android:overScrollHeader="@android:color/transparent"

android:overScrollMode="never"

android:scrollbars="none">

<android.support.v7.widget.RecyclerView

android:layout_width="match_parent"

android:layout_height="match_parent"

android:overScrollMode="never"

android:scrollbars="none" />

猜你喜欢

转载自my.oschina.net/u/3309455/blog/1801537