-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
207 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...d/src/main/java/com/google/android/ground/ui/offlineareas/OfflineAreaListItemViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright 2023 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.android.ground.ui.offlineareas | ||
|
||
import com.google.android.ground.model.imagery.OfflineArea | ||
import com.google.android.ground.ui.common.Navigator | ||
|
||
class OfflineAreaListItemViewModel( | ||
private val navigator: Navigator, | ||
val area: OfflineArea, | ||
val sizeOnDisk: String | ||
) { | ||
val areaName = area.name | ||
|
||
fun onClick() { | ||
navigator.navigate(OfflineAreasFragmentDirections.viewOfflineArea(area.id)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<!-- | ||
~ Copyright 2023 Google LLC | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ https://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="22dp" | ||
android:height="22dp" | ||
android:viewportWidth="22" | ||
android:viewportHeight="22"> | ||
<path | ||
android:pathData="M0,5V3C0,2.167 0.292,1.458 0.875,0.875C1.458,0.292 2.167,-0 3,-0H5V2H3C2.717,2 2.475,2.1 2.275,2.3C2.092,2.483 2,2.717 2,3V5H0ZM3,22C2.167,22 1.458,21.708 0.875,21.125C0.292,20.542 0,19.833 0,19V17H2V19C2,19.283 2.092,19.525 2.275,19.725C2.475,19.908 2.717,20 3,20H5V22H3ZM17,22V20H19C19.283,20 19.517,19.908 19.7,19.725C19.9,19.525 20,19.283 20,19V17H22V19C22,19.833 21.708,20.542 21.125,21.125C20.542,21.708 19.833,22 19,22H17ZM20,5V3C20,2.717 19.9,2.483 19.7,2.3C19.517,2.1 19.283,2 19,2H17V-0H19C19.833,-0 20.542,0.292 21.125,0.875C21.708,1.458 22,2.167 22,3V5H20ZM11,15.3C11.283,14.817 11.567,14.375 11.85,13.975C12.15,13.575 12.442,13.183 12.725,12.8C13.292,12.05 13.742,11.383 14.075,10.8C14.425,10.217 14.6,9.483 14.6,8.6C14.6,7.6 14.25,6.75 13.55,6.05C12.85,5.35 12,5 11,5C10,5 9.15,5.35 8.45,6.05C7.75,6.75 7.4,7.6 7.4,8.6C7.4,9.483 7.567,10.217 7.9,10.8C8.25,11.383 8.708,12.05 9.275,12.8C9.558,13.183 9.842,13.575 10.125,13.975C10.425,14.375 10.717,14.817 11,15.3ZM11,19C10.817,19 10.65,18.95 10.5,18.85C10.367,18.733 10.275,18.592 10.225,18.425C9.858,17.325 9.4,16.4 8.85,15.65C8.3,14.883 7.767,14.158 7.25,13.475C6.75,12.775 6.317,12.058 5.95,11.325C5.583,10.575 5.4,9.667 5.4,8.6C5.4,7.033 5.942,5.708 7.025,4.625C8.108,3.542 9.433,3 11,3C12.567,3 13.892,3.542 14.975,4.625C16.058,5.708 16.6,7.033 16.6,8.6C16.6,9.667 16.417,10.575 16.05,11.325C15.683,12.058 15.242,12.775 14.725,13.475C14.225,14.158 13.7,14.883 13.15,15.65C12.6,16.4 12.142,17.325 11.775,18.425C11.725,18.592 11.625,18.733 11.475,18.85C11.342,18.95 11.183,19 11,19ZM11,10.6C11.55,10.6 12.017,10.408 12.4,10.025C12.8,9.625 13,9.15 13,8.6C13,8.05 12.8,7.583 12.4,7.2C12.017,6.8 11.55,6.6 11,6.6C10.45,6.6 9.975,6.8 9.575,7.2C9.192,7.583 9,8.05 9,8.6C9,9.15 9.192,9.625 9.575,10.025C9.975,10.408 10.45,10.6 11,10.6Z" | ||
android:fillColor="#002108"/> | ||
</vector> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.