private void initOnclickListener()
{
LinearLayoutListener linearLayoutListener = new LinearLayoutListener();
mChatLinearLayout.setOnClickListener(linearLayoutListener);
mFindLinearLayout.setOnClickListener(linearLayoutListener);
mContactLinearLayout.setOnClickListener(linearLayoutListener);
}
private class LinearLayoutListener implements OnClickListener
{
@Override
public void onClick(View v)
{
switch (v.getId())
{
case R.id.ll_chat:
mViewPager.setCurrentItem(mFirstPage, true);
break;
case R.id.ll_find:
mViewPager.setCurrentItem(mSecondPage, true);
break;
case R.id.ll_contact:
mViewPager.setCurrentItem(mThirdPage, true);
break;
}
}
}