lab06
This commit is contained in:
3 files changed
+72
No files matched your search
@@ -12,4 +12,15 @@
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.Comp3717" />
|
||||
|
||||
<activity
|
||||
android:name="ca.bcit.comp3717.lab06.MainActivity"
|
||||
android:exported="true"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/Theme.YourAppTheme">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,53 @@
|
||||
package ca.bcit.comp3717.lab06
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.activity.ComponentActivity
|
||||
import androidx.activity.compose.setContent
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
||||
/**
|
||||
* Braeden Sowinski
|
||||
* A01385066
|
||||
*/
|
||||
|
||||
class MainActivity : ComponentActivity()
|
||||
{
|
||||
override fun onCreate(savedInstanceState: Bundle?)
|
||||
{
|
||||
super.onCreate(savedInstanceState)
|
||||
enableEdgeToEdge()
|
||||
setContent {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.background(Color(0xFF72849a)),
|
||||
verticalArrangement = Arrangement.Center
|
||||
) {
|
||||
topRow(
|
||||
Modifier
|
||||
.weight(4f)
|
||||
.padding(vertical = 100.dp),
|
||||
)
|
||||
middleRow(
|
||||
Modifier
|
||||
.weight(1.3f)
|
||||
.background(Color(0xFF7a55cc))
|
||||
.fillMaxSize(),
|
||||
)
|
||||
bottomRow(
|
||||
Modifier
|
||||
.weight(3f)
|
||||
.fillMaxSize(),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user