checkpoint
This commit is contained in:
parent
06ca0fd2b3
commit
e96bfac4a9
4 changed files with 92 additions and 78 deletions
|
@ -39,6 +39,8 @@ android {
|
|||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
debug {
|
||||
applicationIdSuffix '.debug'
|
||||
|
||||
// Comment out the below lines if you do not need to test resource shrinking
|
||||
// minifyEnabled true
|
||||
// shrinkResources true
|
||||
|
|
5
app/src/debug/res/values/strings.xml
Normal file
5
app/src/debug/res/values/strings.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- App Name -->
|
||||
<string name="app_name">trkpt.debug</string>
|
||||
</resources>
|
|
@ -30,7 +30,6 @@ import android.provider.DocumentsContract
|
|||
import android.provider.Settings
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.widget.Button
|
||||
import android.widget.Toast
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.preference.EditTextPreference
|
||||
|
@ -190,7 +189,7 @@ class SettingsFragment : PreferenceFragmentCompat(), YesNoDialog.YesNoDialogList
|
|||
{
|
||||
val battery_optimization_button = Preference(context)
|
||||
battery_optimization_button.title = "Disable battery optimization"
|
||||
battery_optimization_button.summary = "If your device kills the app, you can give this a try"
|
||||
battery_optimization_button.summary = "If your device kills the app, you can give this a try."
|
||||
battery_optimization_button.setOnPreferenceClickListener {
|
||||
val i: Intent = Intent(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS).setData(Uri.parse("package:${context.packageName}"))
|
||||
context.startActivity(i)
|
||||
|
|
|
@ -8,10 +8,19 @@
|
|||
tools:context=".MainActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/trackfragment_constraint_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/trackfragment_tools_constraint_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="128dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/selected_trkpt_info"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -31,7 +40,7 @@
|
|||
android:src="@drawable/ic_delete_24dp"
|
||||
android:visibility="gone"
|
||||
app:backgroundTint="@color/default_transparent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/map"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:srcCompat="@drawable/ic_delete_24dp" />
|
||||
|
||||
|
@ -53,52 +62,51 @@
|
|||
android:id="@+id/track_query_start_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="130dp"
|
||||
android:translationX="-150dp"
|
||||
android:translationY="-30dp"
|
||||
android:timePickerMode="spinner"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/track_query_start_date"
|
||||
android:scaleX="0.6"
|
||||
android:scaleY="0.6"
|
||||
/>
|
||||
android:timePickerMode="spinner"
|
||||
android:translationX="-150dp"
|
||||
android:translationY="-30dp"
|
||||
app:layout_constraintStart_toEndOf="@+id/track_query_start_date"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<DatePicker
|
||||
android:id="@+id/track_query_end_date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="130dp"
|
||||
android:translationX="-45dp"
|
||||
android:translationY="-100dp"
|
||||
android:datePickerMode="spinner"
|
||||
android:calendarViewShown="false"
|
||||
app:layout_constraintTop_toBottomOf="@+id/track_query_start_date"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:datePickerMode="spinner"
|
||||
android:scaleX="0.6"
|
||||
android:scaleY="0.6"
|
||||
/>
|
||||
android:translationX="-45dp"
|
||||
android:translationY="-100dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/track_query_start_date" />
|
||||
|
||||
<TimePicker
|
||||
android:id="@+id/track_query_end_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="130dp"
|
||||
android:translationX="-150dp"
|
||||
android:translationY="-100dp"
|
||||
android:timePickerMode="spinner"
|
||||
app:layout_constraintTop_toBottomOf="@+id/track_query_start_time"
|
||||
app:layout_constraintStart_toEndOf="@+id/track_query_start_date"
|
||||
android:scaleX="0.6"
|
||||
android:scaleY="0.6"
|
||||
/>
|
||||
android:timePickerMode="spinner"
|
||||
android:translationX="-150dp"
|
||||
android:translationY="-100dp"
|
||||
app:layout_constraintStart_toEndOf="@+id/track_query_start_date"
|
||||
app:layout_constraintTop_toBottomOf="@+id/track_query_start_time" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<org.osmdroid.views.MapView
|
||||
android:id="@+id/map"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/track_query_end_time"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="54dp"
|
||||
android:contentDescription="@string/descr_map_last_track"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:contentDescription="@string/descr_map_last_track"
|
||||
>
|
||||
app:layout_constraintTop_toBottomOf="@+id/trackfragment_tools_constraint_layout">
|
||||
|
||||
</org.osmdroid.views.MapView>
|
||||
|
||||
|
|
Loading…
Reference in a new issue