Remove unnecessary elements

This commit is contained in:
clement
2024-07-10 18:28:31 +02:00
parent b97d209917
commit 9e37caa4d3
3 changed files with 1 additions and 22 deletions

View File

@@ -55,7 +55,6 @@ class MainActivity : ComponentActivity() {
super.onCreate(savedInstanceState)
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
val dbHelper = DbHelper(this)
isLocationPermissionGranted()
locationManager = getSystemService(Context.LOCATION_SERVICE) as LocationManager
getInstance().load(this, PreferenceManager.getDefaultSharedPreferences(this))
@@ -103,16 +102,6 @@ class MainActivity : ComponentActivity() {
startActivity(intent)
}
val mapsButton = findViewById<Button>(R.id.maps)
mapsButton.setOnClickListener{
val mapIntentUri =
Uri.parse("google.navigation:q=Moutier,+France&waypoints=Cevins%7CAigueblanche")
val mapIntent = Intent(Intent.ACTION_VIEW, mapIntentUri)
mapIntent.setPackage("com.google.android.apps.maps")
startActivity(mapIntent)
}
val loadPathButton = findViewById<Button>(R.id.load_path)
loadPathButton.setOnClickListener {
val intent = Intent(loadPathButton.context, PathToMaps::class.java)

View File

@@ -111,7 +111,7 @@ class PathToMaps: AppCompatActivity() {
}
}
}
db.close()
val mapIntentUri = Uri.parse(uri)
val mapIntent = Intent(Intent.ACTION_VIEW, mapIntentUri)
mapIntent.setPackage("com.google.android.apps.maps")

View File

@@ -10,7 +10,6 @@
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:background="@color/white"
android:elevation="500dp">
<Button
android:id="@+id/addMark"
@@ -39,15 +38,6 @@
android:textColor="@color/black"
android:clickable="true"
android:text="Save Markers" />
<Button
android:id="@+id/maps"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:backgroundTint="@color/white"
android:focusable="true"
android:textColor="@color/black"
android:clickable="true"
android:text="Test Google Maps" />
<Button
android:id="@+id/load_path"
android:layout_width="150dp"