<com.github.jorgecastilloprz.FABProgressCircle
android:id="@+id/fabProgressCircle"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_alignParentRight="true"
android:layout_marginRight="@dimen/spacing_normal"
android:layout_marginTop="@dimen/spacing_normal"
app:layout_anchor="@id/appbar"
app:reusable="false"
app:layout_anchorGravity="bottom|right|end"
>
<!--Google FAB-->
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab_send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:backgroundTint="@color/md_amber_500"
app:fabSize="normal"
app:borderWidth="0dp"
app:fab_elevation="@dimen/fab_elevation"
/>
</com.github.jorgecastilloprz.FABProgressCircle>
fragment.setRetainInstance(true)
public void sendComment(long postId, String tag, String content) {
getView().showSendCommentProgress();//int this point, rotating screen
CommentService.getInstance().sendComment(postId, tag, content, new SaveCallback() {
@Override public void done(AVException e) {
if (e == null) {
if (isViewAttached()) {
getView().sendCommentSuccessful();
}
} else {
if (isViewAttached()) {
getView().sendCommentFailure(e);
}
}
}
});
}
@Override public void showSendCommentProgress() {
CommentViewState vs = (CommentViewState) getViewState();
vs.setStateLoadingProgress();
mFabProgressCircle.setEnabled(false);
mFabProgressCircle.show();
}
private void addArcView() {
this.setClipChildren(false);
this.progressArc = new ProgressArcView(this.getContext(), this.arcColor, this.arcWidth, this.roundedStroke);
this.progressArc.setInternalListener(this);
this.addView(this.progressArc, new LayoutParams(this.getFabDimension() + this.arcWidth, this.getFabDimension() + this.arcWidth, 17));
}
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.github.jorgecastilloprz.progressarc.ProgressArcView.show()' on a null object reference