Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

布局中如果没有android:id="@id/swipe_target",可以根据顺序判断header、target、footer #138

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ruiaa
Copy link

@ruiaa ruiaa commented Nov 9, 2017

if (mTargetView==null){
switch (childNum){
case 1:{
mTargetView=getChildAt(0);
break;
}
case 2:{
if (mFooterView!=null){
mTargetView=getChildAt(0);
}else {
mHeaderView=getChildAt(0);
mTargetView=getChildAt(1);
}
break;
}
case 3:{
mHeaderView=getChildAt(0);
mTargetView=getChildAt(1);
mFooterView=getChildAt(2);
break;
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant