Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kylecorry31 committed Jun 23, 2022
1 parent c05e928 commit 3e17586
Show file tree
Hide file tree
Showing 12 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class PlaceBeaconFragment : BoundFragment<FragmentCreateBeaconBinding>() {


private fun hasValidName(): Boolean {
return !form.data.name.isNullOrBlank()
return form.data.name.isNotBlank()
}

private fun updateColor() {
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/fragment_camera_input.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/fragment_qr_import_sheet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">

<TextView
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/fragment_scan_text.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/fragment_tool_flashlight.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">

Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/view_multi_unit_input.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/view_unit_input.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/raw/clinometer.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ The distance to an object can be measured if the height of that object is known.

## Determining avalanche risk

Most avalanches occur on slopes between 30° (57%) and 45° (100%). You can use the Clinometer tool in Trail Sense to measure the angle. Just align it to the top of the slope and tap the screen to lock it in. You can then read the avalanche risk. Alternatively, you could use the color bands on the clinometer dial; the red band indicates high avalance risk.
Most avalanches occur on slopes between 30° (57%) and 45° (100%). You can use the Clinometer tool in Trail Sense to measure the angle. Just align it to the top of the slope and tap the screen to lock it in. You can then read the avalanche risk. Alternatively, you could use the color bands on the clinometer dial; the red band indicates high avalanche risk.

Trail Sense uses a general rule of thumb to determine if a slope has avalanche potential, which is limited by your phone's sensors. If you think a slope is unsafe, then try to find an alternate route to avoid it or take precautions.
2 changes: 1 addition & 1 deletion app/src/main/res/raw/tides.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ You can typically find a tide table by searching the Internet for tides in your

### Worldwide
- [tides4fishing](https://tides4fishing.com/)
- [tide-forcast.com](https://www.tide-forecast.com/)
- [tide-forecast.com](https://www.tide-forecast.com/)
- [SHOM](https://maree.shom.fr/)

### Germany
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/raw/using_printed_maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Assuming your map is using a UTM grid and you are certain your current location

3. Taking the easting and northing values obtained in step 2, plot them onto your map by finding the intersection of grid lines that matches up with both. For example: Assuming your map has north facing up, then easting will be listed from left to right and northing from bottom to top. Using the example in step 2, you would first find the 123E grid line (it will be a vertical line, with the number listed along the top or bottom), then find the 234N line (it will be a horizontal line, with the number listed along the left or right). The point where they intersect is 123E 234N.

4. For increased precision, you can divide the grid into 10 (vertically and horizontally). Then take the next digit in your UTM coordinate and move that many 10ths up or right from the interection, depending on if it is the easting or northing value. Repeat this by dividing each 10th into 10s for each digit in your UTM coordinate. For example: you narrowed your location down to the grid having the bottom left corner of 123E 234N. You then divide that grid into 10 equally spaced lines (vertical and horizontal). That means, you need to split the line between 123E and 124E into 10 equal segments (and same for between 234N and 235N). Then take the next digit from your UTM coordinate, for the easting it will be the fourth digit (2) and from the northing it will be the fourth as well (1). Then count that number of lines right or up, for easting you will move 2 lines right from the interesection, and for northing you will move 1 line up. This becomes your new intersection, and your new grid to split will be the grid between the lines you landed on. Keep splitting that smaller grid into smaller sections until you have accurately found your location.
4. For increased precision, you can divide the grid into 10 (vertically and horizontally). Then take the next digit in your UTM coordinate and move that many 10ths up or right from the intersection, depending on if it is the easting or northing value. Repeat this by dividing each 10th into 10s for each digit in your UTM coordinate. For example: you narrowed your location down to the grid having the bottom left corner of 123E 234N. You then divide that grid into 10 equally spaced lines (vertical and horizontal). That means, you need to split the line between 123E and 124E into 10 equal segments (and same for between 234N and 235N). Then take the next digit from your UTM coordinate, for the easting it will be the fourth digit (2) and from the northing it will be the fourth as well (1). Then count that number of lines right or up, for easting you will move 2 lines right from the intersection, and for northing you will move 1 line up. This becomes your new intersection, and your new grid to split will be the grid between the lines you landed on. Keep splitting that smaller grid into smaller sections until you have accurately found your location.

## How to measure distance on a map?

Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/xml/map_preferences.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto">
<PreferenceCategory
app:iconSpaceReserved="false"
app:singleLineTitle="false"
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:7.2.0")
classpath("com.android.tools.build:gradle:7.2.1")
classpath(kotlin("gradle-plugin", version = "1.5.31"))
}
}
Expand Down

0 comments on commit 3e17586

Please sign in to comment.