Skip to content

Commit

Permalink
Merge pull request #73 from Hamza417/patch-1
Browse files Browse the repository at this point in the history
Update IndexFastScrollRecyclerView.java
  • Loading branch information
myinnos authored Jul 4, 2022
2 parents 1b69de2 + a605907 commit 3563aee
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,10 @@ public IndexFastScrollRecyclerView(Context context, AttributeSet attrs, int defS


private void init(Context context, AttributeSet attrs) {
mScroller = new IndexFastScrollRecyclerSection(context, this);


if (attrs != null) {
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.IndexFastScrollRecyclerView, 0, 0);

if (typedArray != null) {
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.IndexFastScrollRecyclerView);

try {
setIndexTextSize = typedArray.getInt(R.styleable.IndexFastScrollRecyclerView_setIndexTextSize, setIndexTextSize);
mIndexbarWidth = typedArray.getFloat(R.styleable.IndexFastScrollRecyclerView_setIndexbarWidth, mIndexbarWidth);
Expand Down Expand Up @@ -130,7 +128,9 @@ private void init(Context context, AttributeSet attrs) {
} finally {
typedArray.recycle();
}
}

// This line here is neccesary else the attributes won't be updated if a value is passed from XML
mScroller = new IndexFastScrollRecyclerSection(context, this);
}
}

Expand Down Expand Up @@ -403,4 +403,4 @@ public void setIndexBarHighLightTextVisibility(boolean shown) {
public void updateSections() {
mScroller.updateSections();
}
}
}

0 comments on commit 3563aee

Please sign in to comment.