@@ -394,11 +394,9 @@ public void onSlide(@NonNull View bottomSheet, float slideOffset) {
394
394
}
395
395
});
396
396
397
- // Remove texts if it doesnt fit
398
- if (wikipediaButtonText .getLineCount () > 1
399
- || wikidataButtonText .getLineCount () > 1
400
- || commonsButtonText .getLineCount () > 1
401
- || directionsButtonText .getLineCount () > 1 ) {
397
+ // Remove button text if they exceed 1 line or if internal layout has not been built
398
+ // Only need to check for directions button because it is the longest
399
+ if (directionsButtonText .getLineCount () > 1 || directionsButtonText .getLineCount () == 0 ) {
402
400
wikipediaButtonText .setVisibility (View .GONE );
403
401
wikidataButtonText .setVisibility (View .GONE );
404
402
commonsButtonText .setVisibility (View .GONE );
@@ -583,7 +581,7 @@ private void showFAB() {
583
581
584
582
585
583
/*
586
- * Add amnchors back before making them visible again.
584
+ * Add anchors back before making them visible again.
587
585
* */
588
586
private void addAnchorToBigFABs (FloatingActionButton floatingActionButton , int anchorID ) {
589
587
CoordinatorLayout .LayoutParams params = new CoordinatorLayout .LayoutParams
@@ -594,7 +592,7 @@ private void addAnchorToBigFABs(FloatingActionButton floatingActionButton, int a
594
592
}
595
593
596
594
/*
597
- * Add amnchors back before making them visible again. Big and small fabs have different anchor
595
+ * Add anchors back before making them visible again. Big and small fabs have different anchor
598
596
* gravities, therefore the are two methods.
599
597
* */
600
598
private void addAnchorToSmallFABs (FloatingActionButton floatingActionButton , int anchorID ) {
@@ -651,9 +649,6 @@ private void passInfoToSheet(Place place) {
651
649
DirectUpload directUpload = new DirectUpload (this , controller );
652
650
storeSharedPrefs ();
653
651
directUpload .initiateGalleryUpload ();
654
-
655
- //TODO: App crashes after image upload completes
656
- //TODO: Handle onRequestPermissionsResult
657
652
}
658
653
});
659
654
}
0 commit comments