public void setSelectedTextView(TextView textView) {
mSelected = textView;
// tint dropdown arrow icon
Drawable[] drawables = mSelected.getCompoundDrawables();
Drawable right = drawables[2];
TypedArray ta = mSelected.getContext().getTheme().obtainStyledAttributes(
new int[]{R.attr.album_element_color});
int color = ta.getColor(0, 0);
ta.recycle();
right.setColorFilter(color, PorterDuff.Mode.SRC_IN);
mSelected.setVisibility(View.GONE);
mSelected.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int itemHeight = v.getResources().getDimensionPixelSize(R.dimen.album_item_height);
mListPopupWindow.setHeight(
mAdapter.getCount() > MAX_SHOWN_COUNT ? itemHeight * MAX_SHOWN_COUNT
: itemHeight * mAdapter.getCount());
mListPopupWindow.show();
}
});
mSelected.setOnTouchListener(mListPopupWindow.createDragToOpenListener(mSelected));
}
AlbumsSpinner.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:Matisse
作者:
评论列表
文章目录