mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Merge pull request #1369 from misaochan/nearby-fixes
Additional fix for text wrap issue in Nearby
This commit is contained in:
commit
3d11593abd
1 changed files with 5 additions and 10 deletions
|
|
@ -394,11 +394,9 @@ public class NearbyMapFragment extends DaggerFragment {
|
|||
}
|
||||
});
|
||||
|
||||
// Remove texts if it doesnt fit
|
||||
if (wikipediaButtonText.getLineCount() > 1
|
||||
|| wikidataButtonText.getLineCount() > 1
|
||||
|| commonsButtonText.getLineCount() > 1
|
||||
|| directionsButtonText.getLineCount() > 1) {
|
||||
// Remove button text if they exceed 1 line or if internal layout has not been built
|
||||
// Only need to check for directions button because it is the longest
|
||||
if (directionsButtonText.getLineCount() > 1 || directionsButtonText.getLineCount() == 0) {
|
||||
wikipediaButtonText.setVisibility(View.GONE);
|
||||
wikidataButtonText.setVisibility(View.GONE);
|
||||
commonsButtonText.setVisibility(View.GONE);
|
||||
|
|
@ -583,7 +581,7 @@ public class NearbyMapFragment extends DaggerFragment {
|
|||
|
||||
|
||||
/*
|
||||
* Add amnchors back before making them visible again.
|
||||
* Add anchors back before making them visible again.
|
||||
* */
|
||||
private void addAnchorToBigFABs(FloatingActionButton floatingActionButton, int anchorID) {
|
||||
CoordinatorLayout.LayoutParams params = new CoordinatorLayout.LayoutParams
|
||||
|
|
@ -594,7 +592,7 @@ public class NearbyMapFragment extends DaggerFragment {
|
|||
}
|
||||
|
||||
/*
|
||||
* Add amnchors back before making them visible again. Big and small fabs have different anchor
|
||||
* Add anchors back before making them visible again. Big and small fabs have different anchor
|
||||
* gravities, therefore the are two methods.
|
||||
* */
|
||||
private void addAnchorToSmallFABs(FloatingActionButton floatingActionButton, int anchorID) {
|
||||
|
|
@ -651,9 +649,6 @@ public class NearbyMapFragment extends DaggerFragment {
|
|||
DirectUpload directUpload = new DirectUpload(this, controller);
|
||||
storeSharedPrefs();
|
||||
directUpload.initiateGalleryUpload();
|
||||
|
||||
//TODO: App crashes after image upload completes
|
||||
//TODO: Handle onRequestPermissionsResult
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue