Skip to content
Snippets Groups Projects
Commit 453ff596 authored by Doma Pálvölgyi's avatar Doma Pálvölgyi
Browse files

Added CharacterListActivity.kt

parent 7ac92f27
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,7 @@
<entry key="../../../../layout/compose-model-1640171994534.xml" value="0.1" />
<entry key="../../../../layout/compose-model-1640172762520.xml" value="0.1" />
<entry key="../../../../layout/compose-model-1640173242456.xml" value="0.1" />
<entry key="../../../../layout/compose-model-1640252474731.xml" value="0.41807432432432434" />
<entry key="app/src/main/res/layout/activity_create_character.xml" value="0.16510416666666666" />
<entry key="app/src/main/res/layout/activity_main.xml" value="0.16510416666666666" />
<entry key="app/src/main/res/layout/activity_profile.xml" value="0.165" />
......
......@@ -13,6 +13,17 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.DndSpells">
<activity
android:name=".CharacterListActivity"
android:exported="true"
android:label="@string/title_activity_character_list"
android:theme="@style/Theme.DndSpells.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".SelectSpellsActivity"
android:exported="false"
......
package com.flyinpancake.dndspells
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.material.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import com.flyinpancake.dndspells.ui.components.DndTopBar
import com.flyinpancake.dndspells.ui.theme.DndSpellsTheme
class CharacterListActivity : ComponentActivity() {
@OptIn(ExperimentalMaterialApi::class)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
DndSpellsTheme {
// A surface container using the 'background' color from the theme
Surface(color = MaterialTheme.colors.background) {
BackdropScaffold(appBar = {
DndTopBar("D&D Spellbook - Select a character")
}, backLayerContent = {
Greeting("Android")
}, frontLayerContent = {
Greeting("Android")
}) {
}
}
}
}
}
}
@Composable
fun Greeting(name: String) {
Text(text = "Hello $name!")
}
@Preview(showBackground = true)
@Composable
fun DefaultPreview() {
DndSpellsTheme {
Greeting("Android")
}
}
\ No newline at end of file
......@@ -24,4 +24,5 @@
<string name="filter_spell_level">Filter Spell Level</string>
<string name="spell_name">Spell Name</string>
<string name="you_rolled">You rolled:</string>
<string name="title_activity_character_list">CharacterListActivity</string>
</resources>
\ 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