Skip to content

Commit

Permalink
Change size of map view. #1
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaelz committed Oct 7, 2017
1 parent b04ab70 commit b13a63d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ abstract class BaseWidgetConfigurationActivity : AppCompatActivity() {
AppWidgetManager.INVALID_APPWIDGET_ID -> finish()
}

mapView = findViewById<View>(R.id.mapView) as MapView
mapView = findViewById<View>(R.id.default_widget_configure_mapView) as MapView
mapView.onCreate(icicle)
mapView.getMapAsync { mapboxMap ->
run {
Expand Down
32 changes: 6 additions & 26 deletions app/src/main/res/layout/activity_base_widget_configuration.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:mapbox="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/coordinator_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
Expand All @@ -11,34 +11,17 @@
android:layout_height="match_parent"
android:orientation="vertical">

<LinearLayout
<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/default_widget_configure_mapView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="fill_horizontal"
android:orientation="vertical"
android:padding="16dp">

<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/widget_configuration_title"
android:textAlignment="center"
android:textSize="18sp" />

<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
android:layout_width="match_parent"
android:layout_height="301dp"
mapbox:mapbox_styleUrl="@string/mapbox_style_mapbox_streets" />

</LinearLayout>
android:layout_height="250dp"
mapbox:mapbox_styleUrl="@string/mapbox_style_mapbox_streets" />

<LinearLayout
android:id="@+id/default_widget_configure_box"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginTop="8dp"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="visible">
Expand All @@ -64,9 +47,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp" />


</LinearLayout>

</LinearLayout>
</android.support.design.widget.CoordinatorLayout>

0 comments on commit b13a63d

Please sign in to comment.