mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +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
|
// Remove button text if they exceed 1 line or if internal layout has not been built
|
||||||
if (wikipediaButtonText.getLineCount() > 1
|
// Only need to check for directions button because it is the longest
|
||||||
|| wikidataButtonText.getLineCount() > 1
|
if (directionsButtonText.getLineCount() > 1 || directionsButtonText.getLineCount() == 0) {
|
||||||
|| commonsButtonText.getLineCount() > 1
|
|
||||||
|| directionsButtonText.getLineCount() > 1) {
|
|
||||||
wikipediaButtonText.setVisibility(View.GONE);
|
wikipediaButtonText.setVisibility(View.GONE);
|
||||||
wikidataButtonText.setVisibility(View.GONE);
|
wikidataButtonText.setVisibility(View.GONE);
|
||||||
commonsButtonText.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) {
|
private void addAnchorToBigFABs(FloatingActionButton floatingActionButton, int anchorID) {
|
||||||
CoordinatorLayout.LayoutParams params = new CoordinatorLayout.LayoutParams
|
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.
|
* gravities, therefore the are two methods.
|
||||||
* */
|
* */
|
||||||
private void addAnchorToSmallFABs(FloatingActionButton floatingActionButton, int anchorID) {
|
private void addAnchorToSmallFABs(FloatingActionButton floatingActionButton, int anchorID) {
|
||||||
|
|
@ -651,9 +649,6 @@ public class NearbyMapFragment extends DaggerFragment {
|
||||||
DirectUpload directUpload = new DirectUpload(this, controller);
|
DirectUpload directUpload = new DirectUpload(this, controller);
|
||||||
storeSharedPrefs();
|
storeSharedPrefs();
|
||||||
directUpload.initiateGalleryUpload();
|
directUpload.initiateGalleryUpload();
|
||||||
|
|
||||||
//TODO: App crashes after image upload completes
|
|
||||||
//TODO: Handle onRequestPermissionsResult
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue