@@ -394,11 +394,9 @@ public void onSlide(@NonNull View bottomSheet, float slideOffset) {
394394 }
395395 });
396396
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 ) {
402400 wikipediaButtonText .setVisibility (View .GONE );
403401 wikidataButtonText .setVisibility (View .GONE );
404402 commonsButtonText .setVisibility (View .GONE );
@@ -583,7 +581,7 @@ private void showFAB() {
583581
584582
585583 /*
586- * Add amnchors back before making them visible again.
584+ * Add anchors back before making them visible again.
587585 * */
588586 private void addAnchorToBigFABs (FloatingActionButton floatingActionButton , int anchorID ) {
589587 CoordinatorLayout .LayoutParams params = new CoordinatorLayout .LayoutParams
@@ -594,7 +592,7 @@ private void addAnchorToBigFABs(FloatingActionButton floatingActionButton, int a
594592 }
595593
596594 /*
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
598596 * gravities, therefore the are two methods.
599597 * */
600598 private void addAnchorToSmallFABs (FloatingActionButton floatingActionButton , int anchorID ) {
@@ -651,9 +649,6 @@ private void passInfoToSheet(Place place) {
651649 DirectUpload directUpload = new DirectUpload (this , controller );
652650 storeSharedPrefs ();
653651 directUpload .initiateGalleryUpload ();
654-
655- //TODO: App crashes after image upload completes
656- //TODO: Handle onRequestPermissionsResult
657652 }
658653 });
659654 }
0 commit comments