use of com.litingzhe.justandroid.ui.listandGridView.adapter.CircleAdapter in project JustAndroid by chinaltz.
the class WeChatCircleActivity method initView.
private void initView() {
initUploadDialog();
recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
layoutManager = new LinearLayoutManager(this);
recyclerView.setLayoutManager(layoutManager);
recyclerView.addItemDecoration(new DivItemDecoration(2, true));
recyclerView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if (edittextbody.getVisibility() == View.VISIBLE) {
return true;
}
return false;
}
});
recyclerView.setOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
}
@Override
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
super.onScrollStateChanged(recyclerView, newState);
if (newState == RecyclerView.SCROLL_STATE_IDLE) {
Glide.with(mContext).resumeRequests();
} else {
Glide.with(mContext).pauseRequests();
}
}
});
circleAdapter = new CircleAdapter(this);
recyclerView.setAdapter(circleAdapter);
edittextbody = (LinearLayout) findViewById(R.id.editTextBodyLl);
editText = (EditText) findViewById(R.id.circleEt);
sendIv = (ImageView) findViewById(R.id.sendIv);
sendIv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
}
});
setViewTreeObserver();
}
Aggregations