mirror of
https://github.com/rt-bishop/Look4Sat.git
synced 2026-10-05 20:27:28 +00:00
Further changes to SettingsFragment.kt
This commit is contained in:
1 parent
a9a4aa9737
commit
7d3d746c4d
13 files changed
+164
-99
No files matched your search
@@ -3,7 +3,7 @@
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/themeAccent"
|
||||
android:pathData="M19.35,10.04C18.67,6.59 15.64,4 12,4 9.11,4 6.6,5.64 5.35,8.04 2.34,8.36 0,10.91 0,14c0,3.31 2.69,6 6,6h13c2.76,0 5,-2.24 5,-5 0,-2.64 -2.05,-4.78 -4.65,-4.96zM17,13l-5,5 -5,-5h3V9h4v4h3z" />
|
||||
<path
|
||||
android:fillColor="@color/themeAccent"
|
||||
android:pathData="M19,9h-4V3H9v6H5l7,7 7,-7zM5,18v2h14v-2H5z" />
|
||||
</vector>
|
||||
@@ -6,15 +6,51 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/location_title"
|
||||
style="@style/SettingsCategory"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/location_title"
|
||||
android:textColor="@color/themeAccent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/location_progress"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/location_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/location_title"
|
||||
app:layout_constraintTop_toTopOf="@+id/location_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/location_lat"
|
||||
style="@style/SettingsText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/location_lat"
|
||||
app:layout_constraintEnd_toStartOf="@+id/location_lon"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintStart_toStartOf="@+id/location_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/location_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/location_lon"
|
||||
style="@style/SettingsText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/location_lon"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/location_lat"
|
||||
app:layout_constraintEnd_toEndOf="@+id/location_progress"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/location_lat" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/location_btn_gps"
|
||||
style="@style/AppButton"
|
||||
@@ -30,7 +66,7 @@
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/location_title" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/location_lat" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/location_btn_qth"
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/other_title"
|
||||
style="@style/SettingsCategory"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textSize="16sp"
|
||||
android:text="@string/other_title"
|
||||
android:textColor="@color/themeAccent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -18,40 +18,36 @@
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/other_switch_utc"
|
||||
style="@style/SettingsText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:minHeight="48dp"
|
||||
android:textSize="16sp"
|
||||
android:text="@string/other_switch_utc"
|
||||
android:textColor="@color/themeLight"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/other_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/other_title" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/other_switch_sweep"
|
||||
style="@style/SettingsText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="48dp"
|
||||
android:textSize="16sp"
|
||||
android:text="@string/other_switch_sweep"
|
||||
android:textColor="@color/themeLight"
|
||||
app:layout_constraintEnd_toEndOf="@+id/other_switch_utc"
|
||||
app:layout_constraintStart_toStartOf="@+id/other_switch_utc"
|
||||
app:layout_constraintTop_toBottomOf="@+id/other_switch_utc" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/other_switch_sensors"
|
||||
style="@style/SettingsText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:minHeight="48dp"
|
||||
android:textSize="16sp"
|
||||
android:text="@string/other_switch_sensors"
|
||||
android:textColor="@color/themeLight"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/other_switch_utc"
|
||||
app:layout_constraintStart_toStartOf="@+id/other_switch_sweep"
|
||||
|
||||
@@ -6,28 +6,25 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tracking_title"
|
||||
style="@style/SettingsCategory"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textSize="16sp"
|
||||
android:text="@string/tracking_title"
|
||||
android:textColor="@color/themeAccent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/tracking_switch"
|
||||
style="@style/SettingsText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:minHeight="48dp"
|
||||
android:textSize="16sp"
|
||||
android:text="@string/tracking_switch"
|
||||
android:textColor="@color/themeLight"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/tracking_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tracking_title" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
|
||||
@@ -6,44 +6,54 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/update_title"
|
||||
style="@style/SettingsCategory"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textSize="16sp"
|
||||
android:text="@string/update_title"
|
||||
android:textColor="@color/themeAccent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/update_progress"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/update_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/update_title"
|
||||
app:layout_constraintTop_toTopOf="@+id/update_title" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/update_btn_web"
|
||||
style="@style/AppButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:drawableStart="@drawable/ic_update_web"
|
||||
android:text="@string/update_web"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/update_btn_file"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/update_btn_file"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintStart_toEndOf="@+id/update_btn_file" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/update_title" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/update_btn_file"
|
||||
style="@style/AppButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:drawableStart="@drawable/ic_update_file"
|
||||
android:text="@string/update_file"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/update_btn_web"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/update_btn_web"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/update_title" />
|
||||
app:layout_constraintStart_toEndOf="@+id/update_btn_web" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -6,39 +6,35 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/warranty_title"
|
||||
style="@style/SettingsCategory"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/warranty_title"
|
||||
android:textColor="@color/themeAccent"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/warranty_thanks"
|
||||
style="@style/SettingsText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/warranty_thanks"
|
||||
android:textColor="@color/themeLight"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/warranty_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/warranty_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/warranty_license"
|
||||
style="@style/SettingsText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/warranty_license"
|
||||
android:textColor="@color/themeLight"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/warranty_thanks"
|
||||
app:layout_constraintStart_toStartOf="@+id/warranty_thanks"
|
||||
|
||||
@@ -49,25 +49,12 @@
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_prefs_data"
|
||||
style="@style/SettingsCard"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/card_prefs_info">
|
||||
|
||||
<include
|
||||
android:id="@+id/prefs_data"
|
||||
layout="@layout/card_prefs_update" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_prefs_location"
|
||||
style="@style/SettingsCard"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/card_prefs_data">
|
||||
app:layout_constraintTop_toBottomOf="@+id/card_prefs_info">
|
||||
|
||||
<include
|
||||
android:id="@+id/prefs_location"
|
||||
@@ -76,12 +63,25 @@
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_prefs_tracking"
|
||||
android:id="@+id/card_prefs_data"
|
||||
style="@style/SettingsCard"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/card_prefs_location">
|
||||
|
||||
<include
|
||||
android:id="@+id/prefs_data"
|
||||
layout="@layout/card_prefs_update" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_prefs_tracking"
|
||||
style="@style/SettingsCard"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/card_prefs_data">
|
||||
|
||||
<include
|
||||
android:id="@+id/prefs_tracking"
|
||||
layout="@layout/card_prefs_tracking" />
|
||||
|
||||
@@ -75,6 +75,8 @@
|
||||
<string name="about_support">Поддержать</string>
|
||||
|
||||
<string name="location_title">Местоположение наземной станции</string>
|
||||
<string name="location_lat">Широта: %.4f°</string>
|
||||
<string name="location_lon">Долгота: %.4f°</string>
|
||||
<string name="location_gps">Данные GPS</string>
|
||||
<string name="location_gps_null">Нет данных геолокации</string>
|
||||
<string name="location_gps_error">Нет разрешения использовать геоданные</string>
|
||||
|
||||
@@ -94,6 +94,8 @@
|
||||
<string name="about_fdroid" translatable="false">F-Droid</string>
|
||||
|
||||
<string name="location_title">Station position update</string>
|
||||
<string name="location_lat">Latitude: %.4f°</string>
|
||||
<string name="location_lon">Longitude: %.4f°</string>
|
||||
<string name="location_gps">From GPS</string>
|
||||
<string name="location_gps_null">No geolocation data</string>
|
||||
<string name="location_gps_error">Check your location permissions</string>
|
||||
|
||||
@@ -86,4 +86,15 @@
|
||||
<item name="cardCornerRadius">8dp</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsText">
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:textColor">@color/themeLight</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsCategory">
|
||||
<item name="android:includeFontPadding">false</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:textColor">@color/themeAccent</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
Reference in new issue
Block a user