Updated layout for old androids
This commit is contained in:
parent
e484703e35
commit
813d3638c0
4 changed files with 22 additions and 4 deletions
|
@ -32,6 +32,14 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<fragment
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/ErrorFragment"
|
||||
android:name="net.osmand.plus.dashboard.DashErrorFragment"
|
||||
android:layout_marginTop="@dimen/dashCardMargin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<fragment
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/SearchFragment"
|
||||
|
@ -91,7 +99,7 @@
|
|||
|
||||
<!--To make sure that floating button is always visible-->
|
||||
<View android:layout_width="match_parent"
|
||||
android:layout_height="76dp"
|
||||
android:layout_height="@dimen/dashFABMargin"
|
||||
android:orientation="vertical"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
4
OsmAnd/res/values-v14/sizes.xml
Normal file
4
OsmAnd/res/values-v14/sizes.xml
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="dashFABMargin">76dp</dimen>
|
||||
</resources>
|
|
@ -20,6 +20,7 @@
|
|||
<dimen name="dashAboutTextSize">20sp</dimen>
|
||||
<dimen name="dashCardMargin">4dp</dimen>
|
||||
<dimen name="abp__shadow_height">4dp</dimen>
|
||||
<dimen name="dashFABMargin">0dp</dimen>
|
||||
|
||||
<!-- TextSizes -->
|
||||
<dimen name="showAllButtonTextSize">12sp</dimen>
|
||||
|
|
|
@ -94,10 +94,14 @@ public class MainMenuActivity extends BaseDownloadActivity implements OsmAndLoca
|
|||
if (headerHeight < t - margin){
|
||||
//hiding action bar - showing floating button
|
||||
//getSupportActionBar().hide();
|
||||
if (fabButton != null) {
|
||||
fabButton.showFloatingActionButton();
|
||||
}
|
||||
} else {
|
||||
//getSupportActionBar().show();
|
||||
if (fabButton != null) {
|
||||
fabButton.hideFloatingActionButton();
|
||||
}
|
||||
|
||||
//makes other cards to move on top of the map card to make it look like android animations
|
||||
View fragments = findViewById(R.id.fragments);
|
||||
|
@ -189,8 +193,9 @@ public class MainMenuActivity extends BaseDownloadActivity implements OsmAndLoca
|
|||
startMapActivity();
|
||||
}
|
||||
});
|
||||
}
|
||||
fabButton.hideFloatingActionButton();
|
||||
}
|
||||
|
||||
getLocationProvider().addCompassListener(this);
|
||||
getLocationProvider().registerOrUnregisterCompassListener(true);
|
||||
|
||||
|
|
Loading…
Reference in a new issue