Skip to content

Commit

Permalink
new feature layer menu dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jclark118 committed Jun 27, 2023
1 parent e1cc3cb commit aa59810
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 88 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1830,15 +1830,15 @@ private void createFeatureOption() {
AlertDialog.Builder dialog = new AlertDialog.Builder(getActivity(), R.style.AppCompatAlertDialogStyle);
dialog.setView(createFeaturesView);

final EditText nameInput = createFeaturesView
final TextInputEditText nameInput = createFeaturesView
.findViewById(R.id.create_features_name_input);
final EditText minLatInput = createFeaturesView
final TextInputEditText minLatInput = createFeaturesView
.findViewById(R.id.bounding_box_min_latitude_input);
final EditText maxLatInput = createFeaturesView
final TextInputEditText maxLatInput = createFeaturesView
.findViewById(R.id.bounding_box_max_latitude_input);
final EditText minLonInput = createFeaturesView
final TextInputEditText minLonInput = createFeaturesView
.findViewById(R.id.bounding_box_min_longitude_input);
final EditText maxLonInput = createFeaturesView
final TextInputEditText maxLonInput = createFeaturesView
.findViewById(R.id.bounding_box_max_longitude_input);
final TextView preloadedLocationsButton = createFeaturesView
.findViewById(R.id.bounding_box_preloaded);
Expand Down
15 changes: 15 additions & 0 deletions mapcache/src/main/res/drawable/outlined_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:color="@color/textLinkColor" android:width="1dp"/>
<corners android:radius="8dp"/>
</shape>
</item>
<item>
<bitmap
android:gravity="end"
android:tint="@color/textPrimaryColor"
android:src="@drawable/ic_keyboard_arrow_down_black_24dp" />
</item>
</layer-list>
108 changes: 45 additions & 63 deletions mapcache/src/main/res/layout/bounding_box.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,90 +14,72 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:textColor="@color/nga_primary_light"
android:textColor="@color/textLinkColor"
android:text="@string/bounding_box_preloaded_label" />

<LinearLayout
<!--Min Lat-->
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/bounding_box_min_latitude_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >

<TextView
android:id="@+id/bounding_box_min_latitude_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/bounding_box_min_latitude_label" />
android:layout_height="wrap_content"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:theme="@style/TextLabel">

<EditText
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/bounding_box_min_latitude_input"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberDecimal|numberSigned"
android:text="@string/bounding_box_default_min_latitude" />
</LinearLayout>
android:textColor="@color/textPrimaryColor"
android:hint="@string/min_lat" />
</com.google.android.material.textfield.TextInputLayout>

<LinearLayout
<!-- Max lat -->
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/bounding_box_max_latitude_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >

<TextView
android:id="@+id/bounding_box_max_latitude_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/bounding_box_max_latitude_label" />
android:layout_height="wrap_content"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:theme="@style/TextLabel">

<EditText
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/bounding_box_max_latitude_input"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberDecimal|numberSigned"
android:text="@string/bounding_box_default_max_latitude" />
</LinearLayout>
android:textColor="@color/textPrimaryColor"
android:hint="@string/max_lat" />
</com.google.android.material.textfield.TextInputLayout>

<LinearLayout
<!-- Min lon -->
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/bounding_box_min_longitude_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >

<TextView
android:id="@+id/bounding_box_min_longitude_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/bounding_box_min_longitude_label" />
android:layout_height="wrap_content"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:theme="@style/TextLabel">

<EditText
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/bounding_box_min_longitude_input"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberDecimal|numberSigned"
android:text="@string/bounding_box_default_min_longitude" />
</LinearLayout>
android:textColor="@color/textPrimaryColor"
android:hint="@string/min_lon" />
</com.google.android.material.textfield.TextInputLayout>

<LinearLayout
<!-- Max lon -->
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/bounding_box_max_longitude_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >

<TextView
android:id="@+id/bounding_box_max_longitude_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/bounding_box_max_longitude_label" />
android:layout_height="wrap_content"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:theme="@style/TextLabel">

<EditText
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/bounding_box_max_longitude_input"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberDecimal|numberSigned"
android:text="@string/bounding_box_default_max_longitude" />
</LinearLayout>

<!--<Button-->
<!--android:id="@+id/bounding_box_preloaded"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="@string/bounding_box_preloaded_label" />-->
android:textColor="@color/textPrimaryColor"
android:hint="@string/max_lon" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>

</ScrollView>
49 changes: 31 additions & 18 deletions mapcache/src/main/res/layout/create_features.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:scrollbars="vertical" >
android:scrollbars="vertical"
style="@style/AppCompatAlertDialogStyle">

<!-- logo and title -->
<LinearLayout
Expand All @@ -23,7 +25,8 @@
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:background="@drawable/material_feature" />
app:tint="@color/textPrimaryColor"
android:src="@drawable/material_feature" />

<TextView
android:id="@+id/new_layer_title"
Expand All @@ -33,26 +36,26 @@
android:layout_alignTop="@+id/alert_logo"
android:layout_marginLeft="16dp"
android:layout_toRightOf="@+id/alert_logo"
android:textColor="@color/textPrimaryColor"
android:text="New Feature Layer" />
</LinearLayout>

<LinearLayout
<!--Name-->
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/create_features_name_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >

<TextView
android:id="@+id/create_features_name_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/create_features_name_label" />
android:layout_height="wrap_content"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:theme="@style/TextLabel">

<EditText
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/create_features_name_input"
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>
android:textColor="@color/textPrimaryColor"
android:hint="@string/hint_name" />
</com.google.android.material.textfield.TextInputLayout>


<include
android:id="@+id/create_features_bounding_box"
Expand All @@ -61,20 +64,30 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
android:orientation="vertical" >

<TextView
android:id="@+id/create_features_geometry_type_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginLeft="8dp"
style="@style/textAppearanceSubtitle2_light_heavy12"
android:text="@string/edit_features_geometry_type_label" />

<Spinner
android:id="@+id/create_features_geometry_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:entries="@array/edit_features_geometry_types"
android:prompt="@string/edit_features_geometry_type_prompt" />
android:theme="@style/TextLabel"
android:background="@drawable/outlined_background"
android:popupBackground="@color/backgroundPrimaryColor"
android:spinnerMode="dropdown"
android:prompt="@string/edit_features_geometry_type_prompt"
/>
</LinearLayout>
</LinearLayout>

Expand Down
6 changes: 5 additions & 1 deletion mapcache/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
<string name="edit_tiles_max_x_label">Max X: </string>
<string name="edit_features_z_label">Z: </string>
<string name="edit_features_m_label">M: </string>
<string name="edit_features_geometry_type_label">Geometry Type: </string>
<string name="edit_features_geometry_type_label">Geometry Type</string>
<array name="edit_features_geometry_types">
<item>GEOMETRY</item>
<item>POINT</item>
Expand Down Expand Up @@ -471,6 +471,10 @@
<string name="deleteActionButton">Delete</string>
<string name="go_to_geopackage">Go to geopackage</string>
<string name="get_started">Get Started</string>
<string name="max_lon">Max Lon</string>
<string name="min_lon">Min Lon</string>
<string name="max_lat">Max Lat</string>
<string name="min_lat">Min Lat</string>


</resources>
2 changes: 1 addition & 1 deletion mapcache/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@
<item name="colorPrimary">@color/textSecondaryColor</item>
<item name="colorOnSurface">@color/textSecondaryColor</item>
<item name="colorOnSecondary">@color/textSecondaryColor</item>

<item name="colorAccent">@color/textSecondaryColor</item>
<item name="android:textColor">@color/textSecondaryColor</item>

</style>

Expand Down

0 comments on commit aa59810

Please sign in to comment.