Skip to content

Commit

Permalink
Merge pull request #1 from Leafly-com/FP/CastException
Browse files Browse the repository at this point in the history
Fix Cast Exception
  • Loading branch information
philipbjorge authored Jun 29, 2016
2 parents e3e4f8f + dc7a610 commit bc45924
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,12 @@ public void unregisterDataSetObserver(DataSetObserver observer) {
}

private FillerView getFillerView(View convertView, ViewGroup parent, View lastViewSeen) {
FillerView fillerView = (FillerView)convertView;
if (fillerView == null) {
FillerView fillerView;

if (convertView instanceof FillerView) {
fillerView = (FillerView)convertView;
}
else {
fillerView = new FillerView(mContext);
}

Expand All @@ -261,8 +265,12 @@ private FillerView getFillerView(View convertView, ViewGroup parent, View lastVi

private HeaderFillerView getHeaderFillerView(int headerPosition, View convertView,
ViewGroup parent) {
HeaderFillerView headerFillerView = (HeaderFillerView)convertView;
if (headerFillerView == null) {
HeaderFillerView headerFillerView;

if (convertView instanceof HeaderFillerView) {
headerFillerView = (HeaderFillerView)convertView;
}
else {
headerFillerView = new HeaderFillerView(mContext);
}

Expand Down

0 comments on commit bc45924

Please sign in to comment.