Merge pull request #904 from Bars107/sherpafy
Fixed issues with drawer menu and waypoint reached dialog.
This commit is contained in:
commit
2de8094d48
4 changed files with 37 additions and 17 deletions
|
@ -1,8 +1,29 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" android:keepScreenOn="true">
|
||||
<net.osmand.plus.views.OsmandMapTileView android:id="@+id/MapView" android:layout_width="fill_parent" android:layout_height="fill_parent" android:contentDescription="@string/map_view"/>
|
||||
android:layout_height="fill_parent" android:keepScreenOn="true" android:clipChildren="false">
|
||||
<net.osmand.plus.views.OsmandMapTileView android:id="@+id/MapView" android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:contentDescription="@string/map_view"/>
|
||||
|
||||
</FrameLayout>
|
||||
<ListView android:id="@+id/left_drawer"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="@drawable/divider"
|
||||
android:dividerHeight="1px"/>
|
||||
<LinearLayout android:gravity="bottom"
|
||||
android:orientation="horizontal"
|
||||
android:id="@+id/dialog_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
|
|
|
@ -20,4 +20,10 @@
|
|||
android:choiceMode="singleChoice"
|
||||
android:divider="@drawable/divider"
|
||||
android:dividerHeight="1px"/>
|
||||
<LinearLayout android:gravity="bottom"
|
||||
android:orientation="horizontal"
|
||||
android:id="@+id/dialog_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
|
|
|
@ -739,7 +739,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
mDrawerList.setAdapter(listAdapter);
|
||||
|
||||
if (getMyApplication().getSettings().isLightContentMenu()){
|
||||
mDrawerList.setBackgroundColor(mapActivity.getResources().getColor(R.color.shadow_color));
|
||||
mDrawerList.setBackgroundColor(mapActivity.getResources().getColor(R.color.color_white));
|
||||
} else {
|
||||
mDrawerList.setBackgroundColor(mapActivity.getResources().getColor(R.color.dark_drawer_bg_color));
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.widget.*;
|
||||
import net.osmand.Location;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.data.LocationPoint;
|
||||
|
@ -34,21 +35,13 @@ import android.view.Gravity;
|
|||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
/**
|
||||
*/
|
||||
public class WaypointDialogHelper implements OsmAndLocationListener {
|
||||
private MapActivity mapActivity;
|
||||
private OsmandApplication app;
|
||||
private DrawerLayout mainLayout;
|
||||
private LinearLayout mainLayout;
|
||||
private WaypointHelper waypointHelper;
|
||||
|
||||
public final static boolean OVERLAP_LAYOUT = true; // only true is supported
|
||||
|
@ -60,7 +53,7 @@ public class WaypointDialogHelper implements OsmAndLocationListener {
|
|||
this.app = mapActivity.getMyApplication();
|
||||
waypointHelper = this.app.getWaypointHelper();
|
||||
this.mapActivity = mapActivity;
|
||||
this.mainLayout = (DrawerLayout) mapActivity.findViewById(R.id.drawer_layout);
|
||||
this.mainLayout = (LinearLayout) mapActivity.findViewById(R.id.dialog_layout);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue