Skip to content
Snippets Groups Projects
Verified Commit b623f3fb authored by Ruben van Dijk's avatar Ruben van Dijk
Browse files

Added padding.

parent 9008388a
Branches master
No related tags found
No related merge requests found
Pipeline #18046 passed
package nl.rubend.queuetimes
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.Assert.*
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("nl.rubend.queuetimes", appContext.packageName)
}
}
\ No newline at end of file
......@@ -3,11 +3,13 @@ package nl.rubend.queuetimes.data.park
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.absolutePadding
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import kotlinx.datetime.Instant
import kotlinx.serialization.Serializable
import nl.rubend.queuetimes.components.timeView
......@@ -23,7 +25,7 @@ data class Ride(
@Composable
fun compose() {
Row(modifier=if(!is_open) Modifier.background(Color.Red) else Modifier) {
Text(name, overflow= TextOverflow.Ellipsis, modifier=Modifier.weight(1f), maxLines=1)
Text(name, overflow= TextOverflow.Ellipsis, modifier=Modifier.absolutePadding(left = 10.dp).weight(1f), maxLines=1)
Spacer(Modifier)
timeView(wait_time)
// Text("updated at ${ride.last_updated.toLocalDateTime(TimeZone.currentSystemDefault())}")
......
package nl.rubend.queuetimes.data.parks
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.absolutePadding
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.unit.dp
import kotlinx.serialization.Serializable
import nl.rubend.queuetimes.ParkStore
......@@ -22,9 +24,11 @@ data class ParkInfo(
fun compose() {
val store = ParkStore(LocalContext.current)
Text(
modifier=Modifier.clickable {
store.savePark(this)
},
modifier= Modifier
.absolutePadding(left = 10.dp)
.clickable {
store.savePark(this)
},
text=name
)
}
......
package nl.rubend.queuetimes
import org.junit.Test
import org.junit.Assert.*
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment