android-notes / android-notes/expandable-recyclerview

子item位置会出现问题

未關閉
#1 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Java
星號
59
分支
40
PR 合併指標
30 天內沒有已合併 PR

描述

/**
* 子item布局的UI设置
*
* @param holder
* @param groupIndex
* @param childIndex
*/
@SuppressLint({"SetTextI18n", "ResourceType"})
@Override
protected void onBindChildViewHolder(ChildHolder holder, int groupIndex, int childIndex) {
RowsBeanX childBean = groupList.get(groupIndex);
holder.errornumber.setText(childBean.errQuestionInfoList.get(childIndex).errCount + "道");
holder.questionname.setText(childBean.errQuestionInfoList.get(childIndex).normalContent);
/**
* 最原始的版本
*/
if (childIndex == 0) {
holder.stringview.setVisibility(View.VISIBLE);
} else {
holder.stringview.setVisibility(View.GONE);
}
// 当前的位置
if (childIndex == childBean.errQuestionInfoList.size()-1) {
Log.i("子item位置", ":子item位置" + childIndex);
holder.childbackground.setBackgroundResource(R.drawable.openhome_childlast_shape); // 设置边框下部分圆滑
}
}

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。